/srv/irclogs.ubuntu.com/2013/08/20/#maas.txt

jam /wave05:15
bigjoolsjam: so we have someone who can't get constraints working on precise05:15
bigjoolsthey are using pyjuju with latest maas05:15
bigjoolsapparently not even mem= works05:16
bigjoolsand given that I realised I don't know much about the work you did I figured I'd better catch up :)05:16
bigjoolsso jtv was telling me that he thinks there's a job that runs after every tag change on a node, is that right?05:17
jtvNot _quite_ what I said.  :)05:18
jtvA job that _needs_ to run before new tags can be taken into use.05:18
bigjoolsmeh05:18
jtvIt matters because I'm not sure it wasn't a manual step.05:19
bigjoolsok05:19
jambigjools: if you do a change on tags, it fires off a job that gets run by all of the cluster workers05:20
bigjoolsjam: I thought you ran the tag jobs on the region worker?05:20
jamto evaluate the hardware characteristics.05:20
jambigjools: my MaaS terminology is a bit out of date, I imagine.05:20
jamThere was 1 central place, and N subset workers, right?05:20
bigjoolsyes05:20
jamthis is done on the N05:21
bigjools1 region, many clusters05:21
bigjoolsah ok05:21
bigjoolsso was anything you added done in the region?~05:21
jamso that when you have 200,000 machines, each cluster only does 4k (or whatever) hardware jobs.05:21
bigjoolsindeed05:21
jambigjools: I believe when adding a single machine it is evaluated by the region against all existing tags.05:21
bigjoolsok05:22
jamhowever, if mem= isn't working, my guess is that our rules for pulling memory out of lshw characteristics is failing.05:22
jamwe had that problem at least 1 time before05:22
jamon arm, I think05:22
bigjoolsso what is the best way of debugging this:05:22
bigjoolssomeone is defining a new tag to match certain machines. querying the tag in the api returns the machines correctly, but juju deploy with the "maas-tag" constraint doesn't work05:23
bigjoolsbut then they also said the mem= tag was not matching correctly, so something is really hosed05:23
bigjoolssee https://bugs.launchpad.net/ubuntu/+source/maas/+bug/121417205:24
ubot5Launchpad bug 1214172 in maas (Ubuntu) "juju/MAAS Tag constraints do not work in Precise" [Critical,New]05:24
jambigjools: so from what I saw with "maas-cli api tags nodes ram512" it looks like the tags themselves are getting applied to nodes.05:25
bigjoolsyep05:26
bigjoolswhen they deploy with mem=3435973836805:26
jamso I can still see "mem=" being broken for other reasons (digging into the code now to remind myself where things are defined)05:26
bigjoolsjuju shows mem=34359738368.005:26
bigjoolswhich is suspicious05:26
bigjools(that's from get-constraints)05:27
* bigjools considers running tcpdump to see the actual requests05:29
kurt_bigjools: while working with juju today, we discovered the squid proxy on the cluster controller is missing one of the repositories.  Is that a known problem?05:30
kurt_roaksoax figured it out05:30
bigjoolsthe clusters don't have proxies, only the region IIRC05:31
kurt_ok, fair enough, let me restate - the region controller :)05:31
bigjoolsthat's a packaging thing, so it's roaksoax's domain :)05:31
kurt_i c05:31
kurt_ok05:31
* bigjools volleys back to roaksoax. 15 love.05:32
bigjoolswell put it like this, there's no squid set up in maas upstream05:32
bigjoolsdid you manage to fix it locally?05:33
kurt_lol05:33
kurt_we did, but I do think it needs to be updated in whatever packages for the installer.  403 errors abound05:33
bigjoolsmight just be the squid-deb-proxy package05:34
bigjoolswhich release?05:34
kurt_and I thought it was a skillful punt :D05:34
kurt_precise05:34
bigjoolsartful :)05:34
bigjoolsand you're downloading packages for precise or...?05:34
kurt_actually, I'm my platform in quantal, but the images are precise05:35
jambigjools: so the xpath to determine how much memory we have is: http://bazaar.launchpad.net/~maas-maintainers/maas/trunk/view/head:/src/maasserver/models/node.py#L38905:35
jambigjools: and for mem=34359738368.0 it shouldn't actually be a problem, given: http://bazaar.launchpad.net/~maas-maintainers/maas/trunk/view/head:/src/maasserver/models/node_constraint_filter.py#L3205:37
jamwe cast to float, and then ciel and cast back to int.05:37
jambigjools: so to detect what mem we are setting for the nodes, you could do a DB query, or maybe that is exposed on the Node object (in the views)05:38
jambigjools: yeah, the node_view.html template has "node.memory" MB there05:39
jamhmmm....05:39
jamlooks like we are saving the memory in MB into the DB05:39
jamso integer MB05:39
jamso the query would need to be: juju deploy --mem=512 for 512MB of memory?05:39
jambigjools: ^^ ?05:39
jamThat doesn't explain why MaaS tag isn't working05:40
jamthough05:40
jtvjam: I had a faint memory of an upgrade breaking all this once...  Probably of some third-party dependency.  Can't find a bug for it though.05:46
bigjoolsjam: sorry distracted by the gardener05:47
bigjoolsjam: good point on the mem constraint05:48
jambigjools: I don't need to know :)05:48
bigjoolsjam: haha :)05:48
bigjoolsI have someone in top dressing.  does that make it any muddier? :)05:49
bigjoolsjam: so if the lshw's mem output is not getting parsed correctly, that self-tag thing they did wouldn't even work would it?05:54
bigjoolsso the parsing is probably ok05:54
jambigjools: so the easy check is for them to go to the Node page and see what it says the node has for memory. The only difference I can see between their tag constraint and our mem parser is that we enforce "units=bytes"05:55
jamso say their LSHW didn't have a units field at all05:56
bigjoolsah05:56
jamand then some other random stuff about bank, etc. But I think that was just to add more matches, rather than more filtering.05:56
jtvI don't know how pyjuju does it, but I think juju-core has a back-off path for when no available image can match the constraints.05:57
jtvAny chance that it might be saying "no way I can get 34359738368 MB of memory, but let's try again and be less picky"?05:58
jtv(Tying into the difference in memory units there)05:58
jtvAlthough if that were the case, I don't suppose it'd affect custom tags...06:00
jamjtv: I would have thought pyjuju would just refuse to deploy a machine until it finally found one that matched. (aka never)06:00
jambecause it was just picky like that06:00
jam(hence why we had a lot of old problems with maas-name, IIRC)06:00
jtvI'm looking it up in the code, just in case.06:01
bigjoolsok06:02
jtvIt does look a lot as if ServiceUnitState.assign_to_unused_machine won't notice if no machines satisfy constraints, and just return the last candidate it looked at.  But that may still go through another filtering pass later.06:05
bigjoolsI replied to that email asking if they were using matching units06:10
bigjoolsalso advised that mem= needs MB!06:11
bigjoolslet's see how that works out06:11
bigjoolsjuju needs to document this better I suspect06:11
bigjoolsour docs all round are weak :(06:11
jtvYeah.  AFAICT, if you asked pyjuju for an outrageous amount of memory that no machine actually had, it'd just give you an arbitrary available machine.06:12
jtv(As you might well do if you thought you were specifying memory in bytes but Juju interpreted the number as megabytes)06:12
jtvIt's something I ranted about in a review very recently actually: failure to extract search/filter function.06:13
bigjoolsthat, err, sucks :/06:26
jtvRather.  It's an implicit outcome of the loop, not an explicitly visible possibility in the code.  One of those reasons why I recommend extracting search/filter functions.06:28
jtvSometimes people deal with it by writing the "oh I've found it, now do my business and return" part *in the body of the search loop*, which avoids the implicit bad result but makes the code worse in every other way.06:29
=== robbiew1 is now known as robbiew
roaksoaxrvba: ping14:33
roaksoaxrvba: has maas' apache2 config changed in any way?14:33
=== freeflying is now known as freeflying_away
=== freeflying_away is now known as freeflying
=== kentb is now known as kentb-out
=== freeflying is now known as freeflying_away
=== freeflying_away is now known as freeflying

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!