<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Apr 8, 2015 at 3:24 PM, John Meinel <span dir="ltr"><<a href="mailto:john@arbash-meinel.com" target="_blank">john@arbash-meinel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><span style="font-size:12.8000001907349px">upgrade step "set AvailZone in instanceData" failed: no instances found seems suspicious.</span><br><div><span style="font-size:12.8000001907349px">What version of MAAS are you running?</span></div><div><span style="font-size:12.8000001907349px">It is possible that it would come before MAAS availability zones?</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">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.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">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.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">John</span></div><div><span style="font-size:12.8000001907349px">=:-></span></div><div><span style="font-size:12.8000001907349px"><br></span></div></div><div class=""><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 8, 2015 at 4:49 AM, Joshua Randall <span dir="ltr"><<a href="mailto:josh.randall@genomicsltd.com" target="_blank">josh.randall@genomicsltd.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">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?<br>
<br>
`juju status` shows the following error:<br>
> environment: maas<br>
> machines:<br>
>   "0":<br>
>     agent-state: error<br>
>     agent-state-info: 'upgrade to 1.22.0 failed (giving up): set AvailZone in instanceData:<br>
>       no instances found'<br>
>     agent-version: 1.22.0<br>
> ...<br>
<br>
While '/var/log/juju/machine-0.log’ on machine 0 has:<br>
> 2015-04-08 00:03:16 DEBUG juju.provider.maas environprovider.go:32 opening environment "maas".<br>
> 2015-04-08 00:03:16 ERROR juju.upgrade upgrade.go:134 upgrade step "set AvailZone in instanceData" failed: no instances found<br>
> 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<br>
> 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"}]}}<br>
> 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<br>
> 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":"<br>
> error","Info":"upgrade to 1.22.0 failed (will retry): set AvailZone in instanceData: no instances found","Data":null}]}}<br>
<br>
I would very much appreciate any pointers in the right direction on how to go about resolving this… any ideas?<br></blockquote></div></div></div></div></blockquote><div><br></div><div>I'd want to hear from others on this matter, as my experience with repairing upgrades is limited.</div><div>I recommend you don't take any action on the following immediately, until others have weighed in.</div><div><br></div><div>John figured that the error you've got could be related to having containers in the environment.</div><div>Unfortunately it appears that the upgrade step doesn't work if there are any containers, as it</div><div>mistakenly thinks they're MAAS machines (and is rightly told that they don't exist in MAAS). It'd</div><div>be great to get confirmation that you do have containers in your environment.</div><div><br></div><div>Now, this could be repaired without *too* much trouble I think. That upgrade step is the last one</div><div>to upgrade to 1.22 completely. So, options are:</div><div> 1. Hand-edit the agent's config file so it thinks it's finished upgrading.</div><div> 2. Fix Mongo so the upgrade step thinks it has nothing to do.</div><div> 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:</div><div>         <a href="https://bugs.launchpad.net/juju-core/+bug/1441478">https://bugs.launchpad.net/juju-core/+bug/1441478</a></div><div><br></div><div><div>#1 will work, but will mean that you'll have no availability-zone information in your instances.</div><div>I'm not sure if that'd cause any immediate problems (Eric?), but it will mean that charms won't</div><div>be able to take advantage of that information.</div></div><div><br></div><div>#2 would be preferable; this would involve opening the Juju state database with the mongo</div><div>shell, and updating all documents in the "instancedata" collection so that they have "availzone"</div><div>fields.</div></div></div><div class="gmail_extra"><br></div><div class="gmail_extra">Cheers,</div><div class="gmail_extra">Andrew</div></div>