/srv/irclogs.ubuntu.com/2014/03/11/#maas.txt

Lord_Set2Hello00:23
=== Lord_Set2 is now known as Lord_Set
bigjoolshi00:30
Lord_SetHow are things going bihjools?01:03
=== CyberJacob is now known as CyberJacob|Away
bigjoolsbusy busy busy01:20
Lord_SetAny update on the MAAS issue with enlistment? Or do you have an eta?01:22
bigjoolsI'm in the middle of a fix01:22
bigjoolsjust testing something out01:22
Lord_SetAwesome you rock01:22
Lord_SetIf you want me to do some testing as well let me know01:22
bigjoolsyup01:30
bigjoolsLord_Set: try this package https://launchpad.net/~maas-maintainers/+archive/experimental/+build/580053201:55
bigjoolsit's got a change that's not landed in trunk yet so is highly experimental but seems to work for me locally01:55
mwhudsonif i was to try to set up a MAAS that had a bunch of real arm server nodes and virtual machines enlisted, could i make that work?02:09
mwhudsonor would i just go insane and fall into the sea?02:09
bigjoolsmwhudson: no reason why it won't work02:10
mwhudsoncool02:10
bigjoolsthere's a section in the docs for setting up VMs02:10
mwhudsonit was more the highly heterogeneous nature that worried me02:10
bigjoolsmaas doesn't care what it is02:11
bigjoolsit's an equal opportunities provisioner02:11
mwhudson:)02:11
Lord_SetBigjools: How much testing have you done with ARM machines such as Raspberry Pi? Or some of it's more powerful cousins out there?02:11
mwhudsoni've run it on highbank before now02:12
bigjoolswell there just happens to be the right man here :)02:12
mwhudsonLord_Set: you need remote, well, management of some kind02:12
mwhudsoni guess you could have rpi and a pdu02:13
Lord_SetThe team here came up with a great concept we want to build using arm machines for super high density... like 30+ machines per 2U of space.02:13
mwhudsonLord_Set: where is "here"?02:13
Lord_SetI am the lead network and systems engineer of a few "connected" startups.02:13
Lord_SetSame owner and CEO/CIO started a bunch of companies that each complement each other infrastructure wise.02:14
Lord_SetWe are using Ubuntu Server, MAAS, and Juju as the core of our infrastructure for deployment over geographically disjoint locations.02:15
Lord_SetWe are pushing a handful of our services and platform live this week.02:16
mwhudsoncool :)02:18
mwhudsonhave you seen hp's moonshot?02:19
jtvbigjools: I didn't notice earlier because my connection to the board was broken, but you're doing "Hook power_types registry to rpc call" while I'm doing "Registry for power types."05:37
bigjoolsjtv: argh05:37
jtvI expect quite a bit of overlap.05:38
bigjoolsI am doing that too05:38
bigjoolscurrently fighting tests05:38
bigjoolsregistry bit is easy05:38
bigjoolsbut I am having trouble stopping the test data leaking out of the test in the singletons05:38
jtvThe way I did it, JSON_POWER_TYPE_PARAMETERS contained only the fields.05:38
jtvOne thing we can always do is start out by patching each registry to contain a copy of its original contents.05:39
bigjoolsthat's what I am doing05:40
bigjoolshang on let me show you a diff05:40
bigjoolsjtv: https://code.launchpad.net/~julian-edwards/maas/power-registry/+merge/21034305:40
bigjoolsjtv: the Mocks added in the tests leak out so I am not restoring state properly05:42
bigjoolsI can see why05:42
bigjoolsjust need to fix it and then it's done.  how far did you get?05:42
jtvWrote and initialised the registry, pared down JSON_POWER_TYPE_PARAMETERS to list just the fields, made the RPC function compose its answer based on the registry, added a module of functions-to-patch-out-RPC-calls, and was fixing up tests because the global data structure that the MAASServerTestCase patch depended on no longer existed.05:44
bigjoolsmine is done05:45
bigjoolsummm05:45
bigjoolsI didn't remove or change JSON_POWER_TYPE_PARAMETERS05:45
bigjoolsit can stay as it is, surely?05:45
jtvCan, but probably shouldn't.05:46
bigjoolswhy?05:46
jtvI didn't find any good place to put the whole thing — it was too much for the driver's __init__.py, even though it's really just another "built-in" list; and power_schema.py should be about the JSON schema, not the core definition of built-in power types.05:47
jtvSo I figured power_schema.py should know the fields, but the names/descriptions belonged in a "builtin_power_types" list in driver.05:48
bigjoolslet's move it in a separate branch - since mine is done and working shall we use it and then yours can be a bout moving the struct around?05:48
jtvSure.  I'm already doing part of it in a separate branch.05:48
jtvBy the way, can't you just use self.patch to override the registry during testing?05:48
bigjoolsok feel free to review that MP05:48
bigjoolsno,  because it's a global05:48
bigjoolsyou have to modify its content05:49
bigjoolsnot its reference05:49
jtvYes, but patching it would let you do either, right?05:49
jtv"Replace with a copy, and restore after the test."05:49
bigjoolsit didn't work with patch05:50
bigjoolsthat's all I know05:50
bigjoolsand I thnk it's because the registry classes keep a reference to the old object05:50
bigjoolsand patch just replaces the reference with a new one but doesn't help with things that already took a reference05:51
jtvRight, I was thinking more along the lines of patching the classes.05:51
bigjoolsyou can't do that05:51
bigjoolsthey don't have anything to patch05:51
jtvYes you can.  Python.  :)05:51
bigjoolsyou have to patch the global05:51
jtvYes, but what if you replaced the double "global _registry" with a single class variable?05:52
bigjoolsjust so we can use patch?05:53
bigjoolsnot really worth it IMO05:53
jtvOK05:53
bigjoolsI mean, feel free to disagree :)05:53
jtvDon't want to slow this down with bikeshedding.05:53
bigjoolsgood man05:54
jtvLies.05:54
jtvOne thing that bothered me a bit about the Registry class is that entries are not keyed on names.05:54
jtvIt's probably nothing, but I do wonder if anything could go wrong with poorly written drivers, e.g. ones that might re-register new versions of what was meant to be the same object on every call or something.05:57
bigjoolshopefully that will be weeded out in tests05:58
jtvIt's the sort of thing that's hard to test well though.  And on the other end, I guess one thing we'll be doing a lot is look up items by name.06:00
jtvSo a dict keyed on name would seem to make sense.06:00
=== CyberJacob|Away is now known as CyberJacob
bigjoolswell the registries are just lists06:02
bigjoolsI don;t mind making them dicts06:02
jtvI think we'd find it more natural in the end.06:03
bigjoolsok let's do a separate change for that06:03
jtvOK.06:03
jtvI'm reviewing your branch.06:03
bigjoolscheers06:03
jtvThere's something in TestRegistry.setUp that I don't understand: how does _registry.update(...) delete items that have been added during tests?06:04
jtvAh, I see now.06:04
bigjoolsit turns out using Mock as a dummy resource in the registries was a great thing - it weeded out leakage06:05
jtvIt's because the tests never actually add any keys to that dict.06:05
bigjoolsMock can't be serialised in the rpc06:05
jtvAh good.06:05
bigjoolsargh let me fix that06:05
bigjoolsjust needs a clear() first06:05
jtvThat'd do it.06:05
jtvAlso, may I recommend dict.copy() or perhaps even deepcopy()?06:05
jtvBecause items() no longer returns a list in python 3.06:06
* jtv watches diff update06:06
bigjoolspushed06:06
bigjoolsoh06:06
bigjoolsok I'll change it again...06:06
bigjoolsdeepcopy is needed I think06:06
bigjoolsmmm or is it06:06
jtvWould be more thorough.06:07
jtvAnd this is not the test-case base class or anything, so no need to worry about the added cost.06:07
bigjoolspushed again with a copy(), it will be enough just to keep a reference06:07
jtvCome on, Launchpad, it's been seconds!  Where is my update?06:08
jtvAh, there it is.06:08
bigjoolsshame not many people get to see the longpoll06:08
jtvWith the added clear() in tearDown, it's finally worth having a tearDown in the first place.  :)06:08
bigjoolsaaye06:09
bigjoolstests all pass anyway :)06:09
jtvI mean, compared to just adding a cleanup in setUp.06:09
jtvApproved with comments.  :-P06:10
bigjoolsyes06:10
bigjoolsnaturally06:10
bigjoolsjtv: what is wrong with my commit message!06:10
jtv!?  Just now I saw the green link with "Set a commit message."06:11
ubot5jtv: I am only a bot, please don't think I'm intelligent :)06:11
jtvShut up, bot.06:11
bigjoolsI prob set it after you loaded the page06:11
jtvAh, I guess that part doesn't refresh.06:11
jtvMore longpoll!06:11
bigjoolsyou missed two bird of paradise flowers coming out by hours...06:12
Lord_SetSo question. How far out would a feature of MAAS to be able set static dhcp leases?06:15
bigjoolsLord_Set: it already has that06:15
Lord_SetReally? It is a CLI function or only possible by manually adding servers?06:16
bigjoolsas soon as maas sees the lease, it writes a host{} map to the config06:17
jtvYou can't control the leases though.06:17
Lord_SetHmm interesting. Ive had leases drop more than once and IPs change on me.06:17
jtvExcept perhaps by editing the config...  I don't recall whether we have proper support for that.06:17
jtvIPs should normally only change if either:06:17
jtv1. You run out of addresses in the DHCP range, or06:17
Lord_SetWhat is the default lease time?06:17
jtv2. The second DHCP request looks like it comes from a different machine.06:18
jtvThe leases last forever.06:18
Lord_SetInteresting. Once I redeploy MAAS after the current issues have been fixed I will do some in depth testing with it.06:18
bigjoolsjtv: can you remember where the simplestreams index lives?06:27
jtvbigjools: not off the top of my head, no.06:29
* jtv digs in scripts06:29
bigjoolsI see it06:30
jtvOK06:30
bigjoolsthanks, you reminded me it's in mie06:31
bigjoolsjtv: BootImage has a have_image() which is only called from tests AFAICS06:33
jtvYup, looks like.06:34
bigjoolsI'm adding label to the BootImage model06:35
bigjoolsalso I would love it if we could fix the "ctrl-c only pretends to stop tests" thing :(06:41
lifelessjtv: addCleanup is way better than teardown, if your test classes have it :>06:56
jtvHi lifeless.  Yes, but it gets a bit uglier with multiple consecutive statements.06:56
lifelessjtv: how so?06:58
jtvIf you need to execute multiple consecutive statements in the cleanup, you must either define a function anyway (reducing the advantage over writing a tearDown) or add them separately and worry about the ordering.07:00
lifelessjtv: by ordering, you mean the LIFO nature ?07:02
jtvYes.07:03
lifelessinteresting feedback07:06
lifelessmost folk I know just addCleanup adjacent or before the thing that needs cleanup07:07
lifelessso its very contextual and needs little thought07:07
bigjoolslifeless: : it's normally fine indeed, but gets unwieldy if you start needing more than a basic lambda07:08
lifelessbigjools: can you link me an example of such?07:09
bigjoolsI can't07:09
lifelessheh, np - I'm just interested in seeing places it falls down (so I can consider how to make it better)07:10
bigjoolsbut one sec07:10
bigjoolslifeless: https://code.launchpad.net/~julian-edwards/maas/power-registry/+merge/210343 line 61 of the diff07:11
jtvI was going to say "use addCleanup instead," and then we found that it needed an additional statement.07:12
bigjoolsexachary07:13
lifelessbigjools: isn't that just07:15
lifelessself.addCleanup(_registry.update, self.saved_registry)07:16
lifelessself.addCleanup(_registry.clear)07:16
lifeless?07:16
lifelessgiven that tearDown may fail to run at all...07:16
bigjoolsyes but as I said it's unwieldy07:16
bigjoolsand depends on pop ordering, so reads weirder!07:16
bigjoolsif I could add everything in a single call it would look nicer07:17
lifelessa list in FILO order it would reverse for you ?07:17
bigjoolsmebbe, yeah.  a list of calls07:18
bigjoolswhen does tearDown fail to run?07:18
lifelessif setUp fails for any reason07:19
lifeless(and also tearDown doesn't run the remaineder if part of tearDown fails)07:20
lifelessso, def addCleanups(self, cleanups_list): for cleanup, in reversed(cleanups_list): self.addCleanup(cleanup etc07:29
jtvWould the list really be easier to read than a function though?07:30
jtvSimple enough if the calls take no arguments, but otherwise...07:30
lifelessjtv: it would have the property of running every element in it07:30
lifelessjtv: which is equivalent to deeply nested try:finally: in a function07:30
lifelessjtv: which you need for correctness in most end of test code, but is often skipped07:31
bigjoolslifeless: I would need to think about what reads the clearest I think07:32
bigjoolsjtv: dammit, will need to implement tftp path changes for the boot images already because of tests, those damn tests....!07:33
* bigjools eats07:33
jtvDoes it make sense to hook the boot-images registry to RPC at this stage?  Given that we already have an API for this, I mean.08:14
jtvWouldn't it make more sense to slip the driver API in underneath the existing metadataserver API?08:23
Lord_SetWhat is the status of the current MAAS build?08:37
bigjoolsit ought to work08:39
Lord_SetAwesome08:39
Lord_SetWill give it a try in my test racks here08:40
bigjoolsjtv: I am only putting the "label" part in the path08:40
Lord_SetHave you guys seen an issue where trusty will sometimes freeze during boot while mounting the swap?08:42
Lord_SetIt randomly happens on all my servers08:42
bigjoolsno, you need to ask in #ubuntu-server about that09:13
melmothhola maas people ! can someone confirm that /var/log/maas/rsyslog/* logs fils are only filled when the nodes are being installed. And untouched after installation ?09:52
melmoth(well, confirm or correct :-) )09:52
rbasakmelmoth: AIUI, after installation you're in control via whatever stack you have deployed. Eg. use the rsyslog charm.11:53
rbasakmelmoth: at that point you're in juju territory really, rather than maas.11:53
melmothok, the customer is using rsyslog with rsyslog-forxarder charm11:53
rbasak(same with your question the other day about relations)11:53
melmothhe just asked confirmation those file are only generated during installation, now i can confirm.Thanks11:54
melmothrbasak the relation issue is escalated, there s is something obviously broken and i dont undertand what11:54
rbasakWell, that's to the best of my knowledge. I'm not really an expert in this area.11:54
=== zchander is now known as zchander_
=== matsubara is now known as matsubara-afk
=== sputnik1_ is now known as sputnik13net
=== matsubara-afk is now known as matsubara
tych0hi bigjools, did you get a chance to look at that lxc power thing yesterday?18:52
kentbis /etc/maas/preseeds/enlist the place to override and enlisting / commissioning node from using archive.ubuntu.com during the enlist/commission phase?  I'd like to use my local mirror instead.18:56
=== zchander is now known as zchander__
bigjoolstych0: sorry no I got sidetracked22:24
tych0bigjools: no worries22:24
bigjoolsand why on earth is kentb trying to hack preseeds to set the archive proxy22:25
bigjoolstych0: looking now22:25
tych0because he wants to use his local mirror instaed :-)22:27
bigjoolswell there is a setting for this in the config page22:27
bigjoolstych0: ok so this is your change? http://bazaar.launchpad.net/~tycho-s/maas/lxc-power/revision/2040#etc/maas/templates/power/lxc.template22:28
tych0bigjools: yeah22:28
tych0well, there are a few22:29
tych0that whole branch's diff22:29
bigjoolswell the template22:29
bigjoolswhat was getting quoted?22:29
tych0{{preseed}}22:29
tych0ends up as22:29
tych0'#cloud-config ...'22:29
tych0instead of just #cloud-config22:29
bigjoolsit's probably the code22:29
bigjoolstempita won;t do that22:30
tych0oh22:30
bigjoolsit might be using a repr somewhere perhaps22:30
tych0so you think whatever get_preseed returns is bad?22:30
tych0ah22:30
tych0or that22:30
bigjoolsit's possible22:30
bigjoolsstick a breakpoint in22:30
tych0i'm not calling repr anywhere22:30
bigjoolsor hack some code to write its contents to a /tmp/ file22:31
tych0well, the other problem is that the maas dev environment didn't work22:31
tych0i got some big logs22:31
bigjoolsyay22:31
bigjoolsit works fine here, what are you doing? :)22:31
tych0http://paste.ubuntu.com/7050909/22:31
tych0and stuff when i ran it22:31
tych0just via 'make run'22:31
bigjoolsdid you make syncdb?22:32
tych0i can't remember, so probably not22:32
bigjoolsalso, write a test to check your preseed22:32
bigjoolswell, template output22:32
tych0yeah, i just wanted to get it to work first :-)22:32
bigjoolstsk22:32
bigjoolstests first22:32
bigjoolshonestly, it's quicker if you write tests as you write the code22:33
tych0fair enough22:33
bigjoolsTDD :)22:33
tych0yeah, i mostly just have used languages with compilers in the past22:34
tych0i know that makes me a heretic22:34
* tych0 ducks22:34
tych0anyway, i'm off for a quick break before sprint dinner22:34
tych0i promise i will write some tests before i make an MP :-)22:35
bigjoolscompilers can deal with tests too :)22:35
* bigjools did C++ for more years than I care to recall22:36
roaksoax_bigjools: howdy! It is not possible to specify user data to the MAASDataSource to execute custome stuff post install..is it?22:42
bigjoolsno idea off hand22:42
bigjoolsthat's a cloud-init function isn;t it?22:43
roaksoax_bigjools: yes and now. Cloud-init gets user-data from the MAAS data source and executes. But if I wanted to execute custom stuff, we really can't22:43
bigjoolsoh so you want to put more stuff in?22:43
roaksoax_bigjools: yep22:44
bigjoolsok I don;t know without looking22:44
bigjoolslet me check quickly22:44
roaksoax_cool, thjanks!22:44
bigjoolsI *thought* that this was all passed through on the API request to start a machine22:45
bigjoolsit's what juju does22:45
bigjoolsyeah it's a parametert user_data for Node.start()22:46
roaksoax_bigjools: cool, so I can technically tell maas to do it via the api22:46
bigjoolsyes just not in the UI22:47
bigjoolsweb UI22:47
roaksoax_bigjools: yeah, and has to be base6422:49
roaksoax_ok cool thanks!22:49
bigjoolscorrect22:49

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