Comment 1 for bug 1585289

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This bug is expensive.

This week it caused a lot of trouble again:
- CI jobs failing all over the place during the weekend
- time spent to triage. Bug filed: https://bugs.launchpad.net/landscape/+bug/1606220
- autopilot all of a sudden started grabbing *random* nodes from MAAS for cloud deployments, even though it was told to grab specific nodes
- we had to introspect the raw juju api calls on the wire
- there we saw that we were requesting the right nodes, but juju was telling MAAS to grab random ones
- lots of heads were scratched
- finally the developer saw that it was a mistake in landscape where juju2 api syntax was being used against juju1. This is the fix:
- "ToMachineSpec":
- {"Directive": u"maas-name",
- "Scope": "uuid1"}}]}
+ "Placement": {
+ u"Directive": u"maas-name",
+ u"Scope": u"uuid1"}}]}

So this bug here exists in juju1 as well: the api just swallows things and ignores what it doesn't like.

This it the call we were making against juju1:
Jul 25 20:54:20 job-handler-1 INFO ANDREAS JUJU request {'Request': 'AddMachines', 'Params': {'MachineParams': [{'ToMachineSpec': {'Scope': u'863cb02c-035f-4f80-8e65-4cfeb4b7c2b6', 'Directive': u'node-13.vmwarestack'}, 'Jobs': ['JobHostUnits']}]}, 'Type': 'Client', 'RequestId': 2}

MAAS got requests like these (clock about 3min ahead of juju's):
Jul 25 20:57:15 maaslds maas.api: [INFO] Request from user andreas to acquire a node with constraints <QueryDict: {u'agent_name': [u'4219a16c-72d1-4b34-83aa-70c655bd2f97'], u'zone': [u'zone-1']}>

And this is the response we got from juju:
Jul 25 20:54:22 job-handler-1 INFO ANDREAS JUJU response {u'RequestId': 2, u'Response': {u'Machines': [{u'Machine': u'1', u'Error': None}]}}

No error. The outcome? Random nodes being grabbed in MAAS :)