juju-deployer/jujuclient incompatibility with 1.21.3
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | juju-core |
High
|
Frank Mueller | ||
| | 1.22 |
Medium
|
Frank Mueller | ||
Bug Description
I've started seeing this problem since 1.21.3 was released - things where OK with 1.21.1.
$ juju-deployer -c basic-next.yaml -S -d -L
2015-02-25 08:43:17 [DEBUG] deployer.cli: Using runtime GoEnvironment on maas
2015-02-25 08:43:17 [INFO] deployer.cli: Using deployment basic
2015-02-25 08:43:17 [INFO] deployer.cli: Starting deployment of basic
2015-02-25 08:43:17 [DEBUG] deployer.import: Getting charms...
2015-02-25 08:43:17 [DEBUG] deployer.charm: Cache dir /home/shared/
2015-02-25 08:43:17 [DEBUG] deployer.deploy: Resolving configuration
2015-02-25 08:43:17 [DEBUG] deployer.env: Connecting to environment...
2015-02-25 08:43:18 [DEBUG] deployer.env: Connected to environment
2015-02-25 08:43:18 [INFO] deployer.import: Deploying services...
2015-02-25 08:43:18 [DEBUG] deployer.import: <deployer.
Traceback (most recent call last):
File "/usr/local/
load_
File "/usr/local/
run()
File "/usr/local/
importer.
File "/usr/local/
self.
File "/usr/local/
env_status = self.env.status()
File "/usr/local/
return self.client.
File "/usr/local/
return StatusTranslato
File "/usr/local/
self._unit(d)
File "/usr/local/
for p in ports:
TypeError: 'NoneType' object is not iterable
Related branches
- David Britton: Approve on 2015-02-25
-
Diff: 15 lines (+3/-2)1 file modifiedjujuclient.py (+3/-2)
| James Page (james-page) wrote : | #1 |
| Changed in juju-core: | |
| milestone: | none → 1.21.4 |
| status: | New → Triaged |
| importance: | Undecided → Critical |
| Martin Packman (gz) wrote : | #2 |
Two watcher related changes in since 1.21.1
<https:/
<https:/
Seems the megawatcher that python-jujuclient uses has a backwards incompatible change.
| tags: | added: api network regression |
| James Page (james-page) wrote : | #3 |
Confirming that the client version is 1.21.3, using juju-deployer as installed using pip (should be up-to-date).
Specifically I'm using the branch lp:openstack-charm-testing (0mq.yaml) but any deployer configuration should do the same.
| Dimiter Naydenov (dimitern) wrote : | #4 |
I can't reproduce this with 1.21.3 or 1.22-beta4 in a freshly bootstrapped environment. I also asked frankban to do a separate test with juju-quickstart which uses the same 4.3.0 version of python-jujuclient. I quadruple-checked both fixes mentioned in comment #2 have actually landed and are inside the release package for 1.21.3 in the stable ppa. Can we have some debug logs from the juju machine 0 ? Inside the machine log (at DEBUG level) it will become apparent if the megawatcher's UnitInfo change it sends has the Ports and PortRanges set as per the fixes.
| Ryan Beisner (1chb1n) wrote : | #5 |
We saw the same breakage throughout OpenStack charm testing CI. Here's the patch i'm rolling out in UOSCI for the time being. It gets deployer working again. http://
# FYI, version info:
jenkins@
juju-core:
Installed: 1.21.3-
Candidate: 1.21.3-
Version table:
*** 1.21.3-
500 http://
100 /var/lib/
1.
500 http://
1.
500 http://
jenkins@
juju-deployer:
Installed: 0.4.3-0ubuntu1~
Candidate: 0.4.3-0ubuntu1~
Version table:
*** 0.4.3-0ubuntu1~
500 http://
100 /var/lib/
0.3.6-0ubuntu2 0
500 http://
jenkins@
python-jujuclient:
Installed: 0.18.4-5
Candidate: 0.18.4-5
Version table:
*** 0.18.4-5 0
500 http://
100 /var/lib/
0.
500 http://
| Jason Hobbs (jason-hobbs) wrote : | #6 |
This is affecting OIL - it's causing every single OIL deployment to fail.
| tags: | added: oil |
| Dimiter Naydenov (dimitern) wrote : | #7 |
I've confirmed the 1.21.3 amd64 release for trusty in the stable ppa has the expected features (e.g. https:/
I did an experiment with that same build, bootstrapping a local environment and adding a few ubuntu units, one juju-gui. Then monitored the logs as I made changes to open/close ports. The results confirm both "Ports" and "PortRanges" fields of the "Deltas" reported by the AllWatcher are either populated or empty, but never "null".
| Changed in juju-core: | |
| status: | Triaged → Incomplete |
| tags: | added: cts |
| Edward Hope-Morley (hopem) wrote : | #8 |
Why is this Incomplete? I am also hitting this issue and the problem and I am running 1.21.3
| tags: | added: openstack uosci |
| Changed in juju-core: | |
| status: | Incomplete → New |
| Curtis Hovey (sinzui) wrote : | #9 |
We cannot re-produce this issue. Which versions of juju-deployer, python-jujuclient, and python-
| Changed in juju-core: | |
| status: | New → Triaged |
| status: | Triaged → Incomplete |
| Jason Hobbs (jason-hobbs) wrote : | #10 |
Here's the versions:
juju-deployer 0.4.3-0ubuntu1~
python-jujuclient 0.18.4-5 Python API client for juju-core
python-websocket 0.18.0-
| Changed in juju-core: | |
| status: | Incomplete → New |
| Edward Hope-Morley (hopem) wrote : | #11 |
FWIW the linked patch fixes this problem and broken juju debug-log for me.
Versions:
juju-deployer: 0.4.3-0ubuntu1~
python-jujuclient: 0.18.4-3
python-websocket: 0.18.0-
| Jason Hobbs (jason-hobbs) wrote : | #12 |
As requested, here is machine-0.log at DEBUG level:
| Dimiter Naydenov (dimitern) wrote : | #13 |
OK, now we're getting somewhere! Thanks for the logs Jason!
I can indeed see there's a Ports: null, PortRanges: null in the Deltas reported by AllWatcher. In one case only - unit nova-compute/0, for which I can previously see an error: 2015-02-25 21:23:01 ERROR juju.state.unit unit.go:648 unit nova-compute/0 cannot get assigned machine: unit "nova-compute/0" is not assigned to a machine
But later it gets assigned to machine 4. So the problem seems a minor issue - race condition between a new unit getting created for a service and assigning it to a machine. Because port ranges are associated with machines, not units anymore, having null Ports and PortRanges makes sense in this case. This is easily fixable by just lying - i.e. returning empty ports and ranges lists when in fact there are none associated yet (i.e. in PR #1595 that fixed the other cases we should in both cases in updated() ensure if info.Ports has length of 0, set it to an empty slice).
However, this issue at first glance, should be happening much less frequently than it is in practise. Either the deployer is too quick to check the status after adding the nova-compute service (and before its first unit is assigned), or juju's watcher is reporting it too early (and not handling the Ports / PortRanges case being nil) - most likely the latter, as juju should be resilient against this.
This affects 1.21, 1.22 and 1.23 equally.
| Changed in juju-core: | |
| status: | New → Triaged |
| Changed in juju-core: | |
| milestone: | 1.21.4 → 1.23 |
| importance: | Critical → High |
| Kapil Thangavelu (hazmat) wrote : Re: [Bug 1425435] [NEW] juju-deployer/jujuclient incompatibility with 1.21.3 | #14 |
Deployer functional test should have been in core release Qa tests A long
time ago
On Wednesday, February 25, 2015, Curtis Hovey <email address hidden> wrote:
> ** Changed in: juju-core
> Milestone: 1.21.4 => 1.23
>
> ** Changed in: juju-core
> Importance: Critical => High
>
> ** Changed in: juju-core/1.23
> Status: New => Triaged
>
> ** Changed in: juju-core/1.22
> Status: New => Triaged
>
> ** Changed in: juju-core/1.23
> Importance: Undecided => Medium
>
> ** Changed in: juju-core/1.22
> Importance: Undecided => Medium
>
> --
> You received this bug notification because you are subscribed to juju-
> core.
> https:/
>
> Title:
> juju-deployer/
>
> To manage notifications about this bug go to:
> https:/
>
| Curtis Hovey (sinzui) wrote : | #15 |
As 1.22 is stablising and there is a work around for jujuclient. Engineers will fix the issue in 1.23 and 1.22.
| Darryl Weaver (dweaver) wrote : | #16 |
We are also seeing the same issue with our Orange Box demos.
We use the juju stable PPA and upgrading to 1.21.3, breaks our openstack deployments.
If I manually downgrade to 1.21.1 again, the deployments work again.
| tags: | added: orange-box |
| Darryl Weaver (dweaver) wrote : | #17 |
I am using the packages upgraded from the Juju stable PPA.
i.e.:
juju-core 1.21.3-
juju-deployer 0.4.3-0ubuntu1~
python-jujuclient 0.18.4-5
websocket-client 0.18.0-
I have the option to downgrade to juju-core version 1.20.11, but we were already using 1.21.
How do I get back to a working state using the package manager?
| Andres Rodriguez (andreserl) wrote : | #18 |
This has affected OIL and has completely broken our environment. This should be marked as Critical!
| Dimiter Naydenov (dimitern) wrote : | #19 |
Fix for 1.22 landed with https:/
| Changed in juju-core: | |
| status: | Triaged → In Progress |
| assignee: | nobody → Frank Mueller (themue) |
| no longer affects: | juju-core/1.23 |
| Changed in juju-core: | |
| status: | In Progress → Fix Committed |
| Changed in juju-core: | |
| status: | Fix Committed → Fix Released |
| Changed in juju-core: | |
| milestone: | 1.23 → 1.23-beta1 |


Seems related to bug 1420403