On Wed, Apr 8, 2015 at 3:24 PM, John Meinel <j...@arbash-meinel.com> wrote:

> upgrade step "set AvailZone in instanceData" failed: no instances found
> seems suspicious.
> What version of MAAS are you running?
> It is possible that it would come before MAAS availability zones?
>
> Certainly we couldn't really find 0 instances in MAAS because the machine
> this is running on has to be at least one of them.
>
> Unfortunately a few people are on vacation this week in preparation for
> our sprint next week, but hopefully we can still get ahold of the people
> who were working on this upgrade step.
>
> John
> =:->
>
>
> On Wed, Apr 8, 2015 at 4:49 AM, Joshua Randall <
> josh.rand...@genomicsltd.com> wrote:
>
>> I ran `juju upgrade-juju` today to upgrade a MAAS environment to Juju
>> version 1.22.0 and now `juju status` says that the upgrade has failed (and
>> thus we have limited access to the state server since an upgrade is in
>> progress). What can I do to manually complete the upgrade?
>>
>> `juju status` shows the following error:
>> > environment: maas
>> > machines:
>> >   "0":
>> >     agent-state: error
>> >     agent-state-info: 'upgrade to 1.22.0 failed (giving up): set
>> AvailZone in instanceData:
>> >       no instances found'
>> >     agent-version: 1.22.0
>> > ...
>>
>> While '/var/log/juju/machine-0.log’ on machine 0 has:
>> > 2015-04-08 00:03:16 DEBUG juju.provider.maas environprovider.go:32
>> opening environment "maas".
>> > 2015-04-08 00:03:16 ERROR juju.upgrade upgrade.go:134 upgrade step "set
>> AvailZone in instanceData" failed: no instances found
>> > 2015-04-08 00:03:16 ERROR juju.cmd.jujud upgrade.go:360 upgrade from
>> 1.21.1 to 1.22.0 for "machine-0" failed (will retry): set AvailZone in
>> instanceData: no instances found
>> > 2015-04-08 00:03:16 DEBUG juju.apiserver apiserver.go:265 <- [3]
>> machine-0
>> {"RequestId":22,"Type":"Machiner","Request":"Life","Params":{"Entities":[{"Tag":"machine-0"}]}}
>> > 2015-04-08 00:03:16 DEBUG juju.apiserver apiserver.go:272 -> [3]
>> machine-0 410.699us
>> {"RequestId":22,"Response":{"Results":[{"Life":"alive","Error":null}]}}
>> Machiner[""].Life
>> > 2015-04-08 00:03:16 DEBUG juju.apiserver apiserver.go:265 <- [3]
>> machine-0
>> {"RequestId":23,"Type":"Machiner","Request":"SetStatus","Params":{"Entities":[{"Tag":"machine-0","Status":"
>> > error","Info":"upgrade to 1.22.0 failed (will retry): set AvailZone in
>> instanceData: no instances found","Data":null}]}}
>>
>> I would very much appreciate any pointers in the right direction on how
>> to go about resolving this… any ideas?
>>
>
I'd want to hear from others on this matter, as my experience with
repairing upgrades is limited.
I recommend you don't take any action on the following immediately, until
others have weighed in.

John figured that the error you've got could be related to having
containers in the environment.
Unfortunately it appears that the upgrade step doesn't work if there are
any containers, as it
mistakenly thinks they're MAAS machines (and is rightly told that they
don't exist in MAAS). It'd
be great to get confirmation that you do have containers in your
environment.

Now, this could be repaired without *too* much trouble I think. That
upgrade step is the last one
to upgrade to 1.22 completely. So, options are:
 1. Hand-edit the agent's config file so it thinks it's finished upgrading.
 2. Fix Mongo so the upgrade step thinks it has nothing to do.
 3. Wait for a fix to Juju. I'm not sure how long that'll take, as we're
all about to travel. I've just filed:
         https://bugs.launchpad.net/juju-core/+bug/1441478

#1 will work, but will mean that you'll have no availability-zone
information in your instances.
I'm not sure if that'd cause any immediate problems (Eric?), but it will
mean that charms won't
be able to take advantage of that information.

#2 would be preferable; this would involve opening the Juju state database
with the mongo
shell, and updating all documents in the "instancedata" collection so that
they have "availzone"
fields.

Cheers,
Andrew
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju

Reply via email to