availability zone not set

Bug #1546790 reported by Katherine Cox-Buday
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Anastasia
juju-core
Fix Released
High
Anastasia
1.25
Fix Released
High
Anastasia

Bug Description

Reported on behalf of a user. Original bug here: https://github.com/juju/juju/issues/4452

When deploying on the latest juju stable release of 1.25.3 on ec2 in my python hook code I'm running the following code and it's showing None as the return value:
```
    az_info = os.environ.get('JUJU_AVAILABILITY_ZONE')
    log("AZ Info: " + az_info)
```
The ec2 region that I'm deploying on is us-west-2
In my juju status output I'm seeing the following for the machine:
```
31 started 1.25.3 54.213.132.207 i-eb50d82c trusty arch=amd64 cpu-cores=1 cpu-power=300 mem=3840M root-disk=8192M availability-zone=us-west-2b
```
I looked into the Go code and it appears that it's querying and setting the environment variable.
I also dropped into the install debug hook and tried to echo $JUJU_AVAILABILITY_ZONE and that also showed nothing. I think this is a bug but I'm not certain.

Revision history for this message
Chris Holcombe (xfactor973) wrote :

Here's the debug log of the ceph charm deployment: https://gist.github.com/cholcombe973/87089c093005eb37101a

Changed in juju-core:
status: New → Triaged
importance: Undecided → High
milestone: none → 1.25.5
Revision history for this message
Ian Booth (wallyworld) wrote :

The availability zone comes from what's recorded against the machine to which the unit is assigned. Can we get a mongo dump of the machine collection to inspect?

Changed in juju-core:
assignee: nobody → Anastasia (anastasia-macmood)
status: Triaged → In Progress
Revision history for this message
Chris Holcombe (xfactor973) wrote :

Yeah no problem. I'll upload it tomorrow

Revision history for this message
Chris Holcombe (xfactor973) wrote :
Revision history for this message
Anastasia (anastasia-macmood) wrote :

I have reproduced this on my environment.

We are not populating hook context. I have a fix and will propose it shortly.

Revision history for this message
Anastasia (anastasia-macmood) wrote :
Revision history for this message
Chris Holcombe (xfactor973) wrote : Re: [Bug 1546790] Re: availability zone not set

Awesome! Glad I'm not crazy :) Woo

On 03/02/2016 06:14 AM, Anastasia wrote:
> I have reproduced this on my environment.
>
> We are not populating hook context. I have a fix and will propose it
> shortly.
>

Changed in juju-core:
status: In Progress → Fix Committed
Revision history for this message
Cheryl Jennings (cherylj) wrote :

This was included in 1.25.4

Changed in juju-core:
status: Fix Committed → Fix Released
status: Fix Released → Fix Committed
milestone: 1.25.5 → 2.0-beta2
no longer affects: juju-core/2.0
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
Revision history for this message
Ryan Beisner (1chb1n) wrote :

Note: we are blocked on some deliverable work where the MAAS provider is required, and we're not able to observe MAAS zones in juju 1.25.3 or proposed 1.25.4 via JUJU_AVAILABILITY_ZONE.

affects: juju-core → juju
Changed in juju:
milestone: 2.0-beta2 → none
milestone: none → 2.0-beta2
Changed in juju-core:
assignee: nobody → Anastasia (anastasia-macmood)
importance: Undecided → High
status: New → Fix Released
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.