Service deploy with a maas-tags constraint fails

Bug #1119671 reported by Michael Jeanson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyjuju
Fix Released
Critical
Kapil Thangavelu
0.6
Fix Released
Critical
Martin Packman

Bug Description

Using juju 0.6.0.1+bzr614-0juju2~precise1, deploying a service when specifying a maas-tags constraint will fail with the following error :

adminccs@maaster01:~$ juju deploy --constraints "maas-tags=vt" nova-compute
2013-02-08 14:03:24,803 INFO Searching for charm cs:precise/nova-compute in charm store
2013-02-08 14:03:25,651 INFO Connecting to environment...
2013-02-08 14:03:26,446 INFO Connected to environment.
2013-02-08 14:03:26,464 INFO Using cached charm version of nova-compute
2013-02-08 14:03:27,092 ERROR descriptor 'issuperset' requires a 'set' object but received a 'str'

The problem seems to be at the machine assignment stage, commenting the constraint test in the assign_to_machine function is my current workaround :

--- service.py.orig 2013-02-08 14:07:34.509537377 -0500
+++ /usr/lib/python2.7/dist-packages/juju/state/service.py 2013-02-08 14:08:27.109536444 -0500
@@ -974,10 +974,10 @@
         """
         constraints = yield self.get_constraints()
         machine_constraints = yield machine_state.get_constraints()
- if not machine_constraints.can_satisfy(constraints):
- log.warning(
- "Unit %s assigned to machine %s with incompatible constraints",
- self.unit_name, machine_state.id)
+ #if not machine_constraints.can_satisfy(constraints):
+ # log.warning(
+ # "Unit %s assigned to machine %s with incompatible constraints",
+ # self.unit_name, machine_state.id)

         def assign_unit(topology):
             self._check_valid_in(topology)

Related branches

Revision history for this message
Szilard Novaki (novaki) wrote :

I also found that and managed to fix it. It was a typo, for details see:
http://bazaar.launchpad.net/~novaki/juju/maas-tags-fix/revision/616?start_revid=616

Created a merge request:
https://code.launchpad.net/~juju/juju/trunk/+merge/148640

Changed in juju:
importance: Undecided → Critical
status: New → In Progress
Revision history for this message
Kapil Thangavelu (hazmat) wrote :

could either of you add the output of juju deploy -v which includes the traceback. Can you confirm that you have juju-origin: ppa specified for the maas environment?

The suggested fix in #1 doesn't pass the unit tests. I'm having trouble reproducing this error in unit tests and i wonder if the issue is related to a version mismatch (hence the juju-origin_ question).

Changed in juju:
status: In Progress → Incomplete
status: Incomplete → In Progress
assignee: nobody → Kapil Thangavelu (hazmat)
Revision history for this message
Kapil Thangavelu (hazmat) wrote :

reproduced, fix forthcoming.

Revision history for this message
Kapil Thangavelu (hazmat) wrote :

Szilard's fix in #1 was indeed correct, i fixed the broken test and added another test to verify the behavior.

Changed in juju:
milestone: none → 0.7
Changed in juju:
milestone: 0.7 → 0.6.1
status: In Progress → Fix Committed
Revision history for this message
Szilard Novaki (novaki) wrote :

It's broken again with r617, but now it fails during provisioning. I've fixed it here:
http://bazaar.launchpad.net/~novaki/juju/maas-tags-fix/revision/617

I didn't create a merge request this time as I didn't rebase my branch to trunk (don't know how to do it in bzr).

Revision history for this message
Kapil Thangavelu (hazmat) wrote :

there's another merge proposal already in progress to resolve this... https://code.launchpad.net/~hazmat/juju/maas-with-tags/+merge/149586

Changed in juju:
milestone: 0.6.1 → none
milestone: none → 0.6.1
Martin Packman (gz)
Changed in juju:
milestone: 0.6.1 → 0.7
Martin Packman (gz)
Changed in juju:
status: Fix Committed → 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.