juju sync-tools fails with windows streams

Bug #1442719 reported by Alexander List
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
juju-core
Won't Fix
High
Unassigned

Bug Description

Environment:

Ubuntu Server 14.04.2 LTS amd64 as MAAS region/cluster controller, and the host used to deploy OpenStack.

Installed juju 1.22 because I need to support ppc64el agents

ii juju-core 1.22.1-0ubuntu1~0.IS.14.04 amd64 Juju is devops distilled - client
ii maas 1.5.4+bzr2294-0ubuntu1.3 all MAAS server all-in-one metapackage

Old version: agent-version: 1.20.11.1

1.22 is required because it's the first released/stable versio that has this bug fixed:
https://bugs.launchpad.net/juju-core/+bug/1420049

The env was created using --upload-tools. I am trying to update the tools using sync-tools.

This works until it hits windows ...

({"Tools":null,"DisableSSLHostnameVerification":false,"Error":{"Message":"cannot get environment config: invalid series \"win2012\"","Code":""}})

WORK AROUND:
get a local copy of the streams, delete the *win*tgz agents, regenerate streams, and finally sync the local stream to the env: something like:
    juju sync-tools --destination tmpstreams/ --stream <released|proposed>
    rm tmpstreams/<released|proposed>/*win*.tgz
    juju metadata generate-tools
    juju sync-tools --source tmpstreams --stream <released|proposed>
    juju upgrade-juju

Curtis Hovey (sinzui)
Changed in juju-core:
status: New → Triaged
importance: Undecided → High
tags: added: sync-tools windows
Changed in juju-core:
milestone: none → 1.24-alpha1
Revision history for this message
Curtis Hovey (sinzui) wrote :

with win* series are hard coded into juju since Ubuntu will never list them in /usr/share/distro-info/ubuntu.csv. The effect env is
    agent-version: 1.20.11.1
which doesn't know about any win versions.

So. we need a way to upgrade the server without using sync-tools, then after the upgrade, run sync-tools

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

Speculating on IRC We think the we can get a local copy of the streams, delete the *win*tgz agents, regenerate streams, and finaly sync the local stream to the en
    juju sync-tools --destination tmpstreams/ --stream <released|proposed>
    rm tmpstreams/<released|proposed>/*win*.tgz
    juju metadata generate-tools
    juju sync-tools --source tmpstreams --stream <released|proposed>
    juju upgrade-juju

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

This issue only affect 1.20.x upgrades to 1.21 or 1.22.

Revision history for this message
Alexander List (alexlist) wrote :

Confirming workaround: getting a local copy of the streams, deleting win agents and metadata, regenerating metadata, and uploading tools from local copy worked.

Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 1.24-alpha1 → 1.25.0
Ian Booth (wallyworld)
summary: - juju sync-tools fails
+ juju sync-tools fails with windows streams
Curtis Hovey (sinzui)
no longer affects: juju-core/1.24
Changed in juju-core:
status: Triaged → Won't Fix
milestone: 1.25.0 → none
description: updated
Revision history for this message
David Ames (thedac) wrote :

Curtis,

We are running into this bug on ServerStack.

Unfortunately, the workaround is not working in our case

The following is done:
    juju sync-tools --destination tmpstreams/ --stream <released|proposed>
    rm tmpstreams/<released|proposed>/*win*.tgz
    juju metadata generate-tools
    juju sync-tools --source tmpstreams --stream <released|proposed>

But when attempting to upgrade juju cannot find the tools

ubuntu@churel:~$ juju upgrade-juju
ERROR no more recent supported versions available
ubuntu@churel:~$ juju upgrade-juju --version="1.22.8"
ERROR no matching tools available
ubuntu@churel:~$ juju upgrade-juju --version="1.22.6"
ERROR no matching tools available

Any hints welcome.

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

Hi David.

You may need to set the tools-metadata-url (1.20-) or agent-metadata-url (1.21+), and you certainly must if --upload-tools was ever used (it disables upgrades)
   juju set-env tools-metadata-url=<url to /tools>

Since sync-tools placed the agents in a private container, you need to workout the location of the container. For example, I used swift or the horizon dashboard to find my juju-dist container that I placed testing tools in.
   https://swift.canonistack.canonical.com/v1/AUTH_526ad877f3e3464589dc1145dfeaac60/juju-dist/testing/tools

It might be faster to just copy to local synced tools dirs to a public accessible container, then
    juju set-env tools-metadata-url=<url to /tools>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.