Comment 6 for bug 1396981

Revision history for this message
Curtis Hovey (sinzui) wrote :

We need to discuss who is affected by this issue to decide which team makes a fix where.

We froze index.json to point to the coloned released product file because juju 1.21 writes index2.json. Both index files would point to the *same* released product file. This ensure old juju found the current products and only saw the released versions.

As of 1.22 the two indexes no longer point to the same file, so we see an upgrade error. If this change was in production, users will be told that 1.22 doesn't exist (volatile streams, like testing and weekly see a shasum error because of rewites)

If this is just a Canonical problem, the qa team can change the index.json to point to the dashed product file. This is not trivial because multiples jujus are creating streams in testing and *production*, a fix requires that us to force old juju product file to take the name of the new juju files. Maybe we just want to ensure anything creating a dashed product file will also create coloned version too for upgrade purposes.

This might be a problem for enterprises with private streams. If an enterprise is on 1.20 and chooses to skip 1.21, jumping to 1.22, they cannot upgrade without changes to their scripts or manual intervention. 1.20 still sees the coloned released product file which was not updated with the new agents. Someone must rewite index.json or copy the dashed file over the coloned file.

But this is a different problem for an enterprise migrating from --upload-tools to private streams. they never had an index.json. In this case, the fix is to create an index.json. If index2.json has one stream, listed, the enterprise just copies index.json to index2.json. If there are more streams in index2.json, surgery is needed on the json to remove the extra entries.

Also consider that the inverse is also an issue, when old juju regenerates streams *after* new juju created streams, the new juju will have a stale streams. New juju wont see the new product file :(

So, generate-tool will need to create a backward compatible index.json to point to the new product file will allow new juju to remain compatible with juju 1.18 and 1.20. A compatible index.json only contains the "released" stanza and product file. No other stanzas.

Or revert this change. Solve the file name on windows could be accommodate be escaping.