/srv/irclogs.ubuntu.com/2012/09/07/#maas.txt

roaksoaxjtv: around yet?03:12
roaksoaxsmoser: ubuntu releases support works successfully :D03:25
bigjoolsroaksoax: \o/04:11
jtvHi roaksoax -- sorry I missed you05:15
jtvbigjools: "seeing if an object exists" in omshell will complicate our code, in that we need to send partial input, evaluate output, then decide what input to send next.  My original delete-first approach looks much simpler.06:07
bigjoolsjtv: it is also racy06:08
bigjoolsit;s really not hard to check first06:08
bigjoolstwo lines of omshell06:08
jtvThe omshell part is easy.  See above.06:08
jtvWait, I have an idea.06:09
jtvBut it's ugly.06:09
bigjoolsit's all easy06:09
bigjoolsI don;t understand your reticence06:09
bigjoolsbut perhaps I am missing something you've seen06:09
jtvWell there's no conditionals in omshell.06:10
jtvSo we can't keep sending one chunk of omshell code the way we're doing.06:10
bigjoolsyou don't need to do it all in omshell06:10
jtvThat's what I'm saying.06:10
jtvIf we want to check first, we can't keep sending one chunk of omshell code the way we're doing.06:11
bigjoolsso what's the problem with that?06:11
bigjoolsyou run it once and then possibly again06:11
jtvThat we've been patching omshell a lot in tests.06:11
jtvI can give it a try.  It's definitely not impossible, just breaking something we've been making assumptions about.06:13
bigjoolsI can't see why it won't work, although it will require more mocking for tests06:14
jtvIt's definitely not impossible.06:15
bigjoolsI guess that's the best I can get out of you :)06:15
jtvIt's something I've been noticing this week: a lot of communication has been breaking down.06:15
jtvAll I wanted to say is: we've been making a lot of assumptions about how we run omshell, and so this change may involve a lot of test changes.  That's the reason for my reticence.  I can try it, but I needed to discuss alternatives first.06:17
bigjoolsok06:17
bigjoolslet's reqind06:17
bigjoolsrewind even06:17
jtvrescind?06:17
bigjoolsmaybe :)06:18
jtvremind.06:18
bigjoolsthe error message that you check for, let's see if you can make it appear for other scenarios06:18
bigjoolsif it doesn't, then your original code is good IMO06:18
bigjoolswhat other scenarios? comms fail, syntax error, etc06:18
jtvfsetpos failure in a trace file.06:19
jtv(Seriously!  I have no idea why that generates that same error)06:19
bigjoolswhut?06:20
jtvYeah.  :(06:20
bigjoolsno, I mean what are you doing, I don't understand06:20
jtvI went through the dhcp source to find other things that might generate this same error.06:20
jtvAnd there were a few, in code paths that I _think_ we're not exercising.06:21
bigjoolsok06:21
jtvI have one thing I can try.06:21
jtvHi rvba!06:21
bigjoolsif that's the case we are probably safe06:21
rvbaHi jtv, hi bigjools.06:21
bigjoolshowever, did you check what errors omshell generates itself?06:22
bigjoolsmorning rvba06:22
jtvbigjools: yes, I did — it's all the same codebase, so I just grepped the whole thing.06:22
bigjoolsah ok06:22
bigjoolsjtv: in that case you have convinced me that your existing change is good06:23
bigjoolsdoes it work in practice?06:23
jtvWhen I tried it manually in omshell, yes.06:23
bigjoolscool06:23
jtvI appreciate your critical probing; I wish I could give easy absolute certainties about that codebase.  :/06:23
bigjoolsyeah I know :/06:24
bigjoolsglad you appreciate it, not trying to be difficult, honest!06:24
jtv"Uh, trying?"  :)06:24
bigjools:p06:24
jtvIt's good code for its era, actually.  Clay pots, numeric error codes...06:25
jtvMakes me appreciate python all the more.06:25
=== lifeless_ is now known as lifeless
jtvroaksoax: I've got a change up for review that will manage the discussed extension to dhcpd's apparmor profile.  We'll have to run that when we set up our dhcpd, and direct its output into /etc/apparmor.d/local/usr.sbin.dhcpd11:20
jtvroaksoax: Still have to set up the custom dhcpd instance though, with its own config file etc.11:37
smoserjtv, are you there?12:13
smoserso, thinking about apparmor12:14
smoseris there any reason that maas should write that ? rather than packaging?12:14
smoserthe reason i ask is that I think it might just be easier all around if12:14
jtvhi smoser12:14
smosera.) in precise, we add 1 line in packaging to the local/usr.sbin.dhcpd that says "include /etc/maas/apparmor.d/usr.sbin.dhcpd" or the like12:15
smoserb.) in quantal apparmor.d we get such a thing included.12:15
jtvSure, if you can swing it, for both precise and quantal.12:15
smoserie, in quantal we'll modify usr.sbin.dhcpd profile to have that include.12:15
smoserthen maas packaging can write the file in both cases. the only difference is we have to update that local file in precise.12:16
smoserit just seemed strange to write it in maas source code. its really packaging that caused this pain :)12:16
jtvOhhh, right, I see.12:16
jtvWell the maas code is only to manage the extension to the local file.12:17
smoserright. but even that seems wierd.12:17
jtvIt could easily contain just the #include.12:17
smoseri dont want to stop this from moving forward.12:17
smoserbut that seemed a bit less in trusive12:17
smoserand it really seems wierd to me to have a daemon writing apparmor config12:18
jtvEither way it's going to be done in packaging, of course.12:18
smoserinteresting...12:18
smoserif there were an apparmor profile for maas12:18
smoserit probably would *not* allow it to write/modify files in /etc/maas/apparmor.d12:18
jtvIt's not the daemon writing there — it's just a piece of python that the installation scripts can call.12:18
smoserbecause if it did... that'd be like allowing full exploit and defeat of apparmor12:18
smoserhm..12:19
smoseroh well.12:19
smoseri think i'll just table my thoguhts for now.12:19
jtvAt this point, I'd rather have them soon so I can move forward a bit more before the night is over!12:20
jtvEr... did that come out weird?12:20
jtvWhat I mean is, I'm hoping to get a bit more done tonight.12:21
smoserme too12:23
jtvSo I'd very much like these thoughts resolved.12:23
jtvsmoser: if you feel the approach is wrong, it's better if you say so now than to wait until we're committed.  If you feel it's OK to append and #include to the local apparmor file, without managing custom settings in there, I can scuttle my branch to support the latter.12:29
smoseri think for precise we have to modify that file (the local)12:30
smoserthere is no other way.12:30
jtvAgreed.  But how do we modify it?12:30
smoseri think if it works, it makes sense to reduce your management of a common file12:30
smoserby using "#include"12:31
smoserright?12:31
jtvRight.12:31
jtvI just didn't want to assume that we can just append that to the file and never look back.12:31
smoserright12:31
jtvFor example, we don't want to leave a broken #include around after you purge the config.12:31
smoseryeah, i dont know how it handles that. and packaging on removal would have to handle removal of that if missing files cause apparmor to choke12:32
smoserroaksoax, what do you think ?12:32
smoserit seems more proper to me for packaging to basically handle apparmor12:33
jtvFWIW with my code it'd be easy to disable that bit we add.12:33
jtvPackaging scripts would _call_ my code, obviously.12:33
smoserwell, they could, yeah.12:36
smoseri'll wait to see what roaksoax thinks.12:36
jtvOK12:36
smoserit really does to me seem like packaing's problem.12:36
jtvYes — I'm just providing a tool for it to use.12:36
jtvsmoser: I'm going to go out for dinner now.  I may be some time.12:51
roaksoaxsmoser: i'm fine with that, is the same thing done with bind14:03
roaksoaxjtv: is the change in question make the change in the apparmor profile, or will we have to do it (in packaging)?14:04
roaksoaxrvba: around?14:04
roaksoaxrvba: let me know when around14:36
rvbaroaksoax: I'm there but I'm otp14:45
roaksoaxrvba: ok, no worries, let me know when you're done :)14:46
smoserok.14:57
smoseri have a thoguht.14:58
smoserthell me how stupid this is.14:58
smoserin commissioning environment (and enlistment)14:58
smoserthere is basically no way in to the image.14:58
smoserand when it fails, its a PITA to debug14:58
smoserso i'm thinking i will do:14:58
smoserif we take the failure case...14:58
smoserright now we print a message, sleep 60 seconds, poweroff14:59
smoserinstead, we could14:59
smoserenable a password (possibly random), give a message, and say "if you do not login in the next X seconds, you will be powered off"14:59
roaksoaxsmoser: yeah that could work for debugging purposes15:01
roaksoaxsmoser: so, during enlistment, I waas thinking how to we chose what release to use?15:02
smoserhttp://paste.ubuntu.com/1190988/15:09
smoserroaksoax, what do you mean choose?15:09
roaksoaxsmoser: so, while working on adding other ubuntu releases support15:13
roaksoaxsmoser: enlistment now requires you to tell what release to use for the enlisted system15:13
roaksoaxsmoser: so, how can we effectively chose what ubuntu releaswe to use15:13
smoseri'm confused.15:14
smoseryou mean as in which ephemeral image to boot ?15:14
roaksoaxsmoser: no, it will boot in precise ephemeral image15:14
roaksoaxsmoser: but when you enlist the node itself15:15
smoserok (that is a separate issue)15:15
smoseryou're saying when i enlist a system, i have to chose the operating system that will be installd on it?15:15
smoserthat is broken15:15
smoserbadly broken15:15
roaksoaxsmoser: yes and no (that's one of the things I want to discuss with rvba)15:15
roaksoaxsmoser: but, as it stands now, I need to specify the ubuntu release to use15:16
melmothrandom question of the day: if iwas to deploy a nova-compute servoce on the node running zookeeper (just for the sake of not wasting hardware), would i regret it ?15:56
rvbaroaksoax: all right, I'm there.  Sorry for the delay.16:02
roaksoaxrvba: no worries :)16:02
roaksoaxrvba: ok so basically, the problme is that during enlistment we don't have to specify a release, but we always want it to set one by default16:03
roaksoaxrvba: so in modes/node.py I did this:16:04
roaksoaxos_release = CharField( max_length=10, choices=UBUNTU_RELEASE_CHOICES, blank=False, default=UBUNTU_RELEASE.precise)16:04
roaksoaxwhich means that it should never be blank basically16:04
roaksoaxright?16:04
roaksoaxnow, in forms.py I initially had this:16:05
rvbaright16:05
roaksoaxos_release = forms.ChoiceField( choices=UBUNTU_RELEASE_CHOICES, required=False, initial=UBUNTU_RELEASE.precise, error_messages={'invalid_choice': INVALID_UBUNTU_RELEASE_MESSAGE})16:05
roaksoaxerr16:05
rvbaNote that 'blank' is purely validation-related.16:05
roaksoaxs/False/True16:05
roaksoaxso I had the above with s/False/True, then enlistment failed because we were not specifying the releas16:05
roaksoaxeso I changed it to required=False, and then enlistment no longer complained about not specifying release16:06
roaksoaxbut there was this:16:06
roaksoaxValidationError: {'release': [u'This field cannot be blank.']}16:06
roaksoaxwhich means it was related to the blank=False16:06
rvbayep16:06
roaksoaxso my question is, shouldn't the initil= and/or default= have set the release?16:06
rvbaWell, that is indeed confusing stuff in Django.16:08
rvbaThe initial=xxx stuff let's you create a form with initial values.16:08
rvbaAs in an HTML form.16:08
rvbabut that's all it will do.16:08
rvbaSo in the API were we're simply using forms for validating stuff, that won't be taken in to account.16:09
roaksoaxrvba: right, but what about the default= on node.py16:10
roaksoaxrvba: or better yet, how do you think this problme should be addressed?16:10
rvbaroaksoax: the form should be responsible for setting the default.  Let me find an example.16:11
rvbaroaksoax: if you look at WithMACAddressesMixin which is a mixin used to extend node-adding forms, you'll see that in save(), we set the default hostname if the one provided is the empty string.16:13
rvbaroaksoax: that's in src/maasserver/forms.py16:13
roaksoaxrvba: right, that's exactly where I ws looking16:14
roaksoaxrvba: but then again, that's particularly for mac address isn't it?16:14
rvbaroaksoax: yes16:14
rvbaroaksoax: shouldn't the default come from a global config setting?16:14
rvbaRather than being hardcoded I mean.16:15
roaksoaxrvba: yeah but if we do that, someone can simply set a non-supported release16:15
roaksoaxrvba: but for now I'm just doing a first step16:15
roaksoaxon getting this to work16:15
roaksoaxrvba: and thinking that the default should be "precise"16:15
rvbaThe setting could be a dropdown menu with only the valid options.16:16
roaksoaxrvba: right, that's what it is16:16
rvbaSo only supported releases would be in there right?16:16
roaksoaxrvba: yes16:16
roaksoaxrvba: everything seems to be working as expected but enlistment16:16
roaksoaxrvba: so that's why I was wondering where should a default value be set16:17
rvbaroaksoax: also, maybe you should allow Null value in there.  If this field is null, then is means to use the default distrib.16:18
rvbas/distrib/release/16:18
roaksoaxrvba:     os_release = CharField(16:18
roaksoax        max_length=10, choices=UBUNTU_RELEASE_CHOICES, null=True,16:18
roaksoax        blank=True, default=UBUNTU_RELEASE.precise)16:18
rvbaIf someone changes the default release, then all the nodes without a specific release set will use the new default transparently.16:18
roaksoaxrvba: right, so that would technically fix it?16:20
rvbaroaksoax: yes.16:20
rvbaroaksoax: but I would be in favor of default=None16:20
roaksoaxrvba: http://pastebin.ubuntu.com/1191126/16:20
rvbaThen if you want to change the default, change the global setting.16:21
roaksoaxrvba:  but default=None is no release being set16:21
roaksoaxrvba: meaning the node will have os_release = None16:21
roaksoaxrvba: each node should have a release16:22
roaksoaxit is just as the architecture16:22
rvbaroaksoax: yeah, and we would simply add a small get_os_release method which would return the default setting in that case.16:22
roaksoaxIMHO16:22
rvbaThat method would be used to decide which release should be used.16:22
roaksoaxrvba: that would be in node.py?16:22
rvbaroaksoax: yes, soemthing like http://paste.ubuntu.com/1191129/16:23
rvbas/get_or_release/get_os_release/16:24
roaksoaxrvba: right, ok cool, I'll first test the null change stuff and see what happens and then will look into the rest16:24
rvbaroaksoax: ok16:25
roaksoaxrvba: thought, default should probably be distro-info --stable16:25
roaksoaxrvba: that's what I was thinking to do instead of UBUNTU_RELEASE.precise16:25
roaksoaxto simply use UBUNTU_RELEASE.default = distro-info --stable16:26
rvbaroaksoax: we can initialize it with that but then if we make it a configuration option it will be in the hands of the user.16:26
roaksoaxrvba: right, ok so I'll first get this working16:26
roaksoaxand then we can improve the default release16:26
roaksoaxand setting option16:27
rvbaSounds like a plan.16:27
roaksoaxrvba: btw.. preseed.py would look similar too: http://paste.ubuntu.com/1191157/ (i need to updated it first though)16:33
rvbaroaksoax: makes sense.16:36
roaksoaxrvba: where does the dev inst/home/roaksoax/Desktop/project/maas-whole/maas/bin/maas createsuperuser16:48
roaksoaxsorry16:48
roaksoaxerrr16:48
roaksoaxrvba: one more thing, when I click on "Add Node" on the WebUI I can't see the ubuntu release options, but I can when editing the node16:52
roaksoaxrvba: where is that?16:52
rvbaroaksoax: the js code uses ./src/maasserver/templates/maasserver/snippets.html to create that form16:53
roaksoaxrvba: so that should also be updated then?16:53
rvbaroaksoax: yes16:53
roaksoaxrvba: ok good to know16:53
roaksoaxrvba: and what about the label it will use, it shoes as "Os release"16:54
roaksoaxand I'd like to use just "release"16:54
rvbaroaksoax: use label="xx" on the CharField16:54
roaksoaxrvba: ok cool thanks16:55
rvbanp16:55
roaksoaxrvba: so that also needs a migration?16:59
roaksoaxor needs ot be part of the migration17:00
rvbaroaksoax: if you're changing a model, then there is a migration.  I recommend having one migration per change.17:00
roaksoaxrvba: gotcha, thenaks17:01
roaksoaxrvba: so do yo think it is a good idea to UBUNTU_RELEASE.default be obtained form a setting and then use that instead?17:43
rvbaroaksoax: it allows someone to 'upgrade' the default used without having to mass-change the onfirmation stored on the nodes themselves so yeah, I think that's a good idea.17:48
roaksoaxrvba: ok cool17:50
tsandallI created a VirtualBox VM and enlisted with my MAAS server. The node shows up as Declared on the MAAS 'nodes' page. When I try to boot the VM for the first time though it acquires a DHCP lease, and it looks like PXE starts before hitting an error: "Boot sector signature not found" and then dropping to a boot: prompt.20:27
tsandallthe pxelinux.cfg filef for the VM's MAC doesn't reference any of the precise images, instead it's referencing chain.c32, is that correct?20:29

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