[03:12] jtv: around yet? [03:25] smoser: ubuntu releases support works successfully :D [04:11] roaksoax: \o/ [05:15] Hi roaksoax -- sorry I missed you [06:07] bigjools: "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:08] jtv: it is also racy [06:08] it;s really not hard to check first [06:08] two lines of omshell [06:08] The omshell part is easy. See above. [06:09] Wait, I have an idea. [06:09] But it's ugly. [06:09] it's all easy [06:09] I don;t understand your reticence [06:09] but perhaps I am missing something you've seen [06:10] Well there's no conditionals in omshell. [06:10] So we can't keep sending one chunk of omshell code the way we're doing. [06:10] you don't need to do it all in omshell [06:10] That's what I'm saying. [06:11] If we want to check first, we can't keep sending one chunk of omshell code the way we're doing. [06:11] so what's the problem with that? [06:11] you run it once and then possibly again [06:11] That we've been patching omshell a lot in tests. [06:13] I can give it a try. It's definitely not impossible, just breaking something we've been making assumptions about. [06:14] I can't see why it won't work, although it will require more mocking for tests [06:15] It's definitely not impossible. [06:15] I guess that's the best I can get out of you :) [06:15] It's something I've been noticing this week: a lot of communication has been breaking down. [06:17] All 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] ok [06:17] let's reqind [06:17] rewind even [06:17] rescind? [06:18] maybe :) [06:18] remind. [06:18] the error message that you check for, let's see if you can make it appear for other scenarios [06:18] if it doesn't, then your original code is good IMO [06:18] what other scenarios? comms fail, syntax error, etc [06:19] fsetpos failure in a trace file. [06:19] (Seriously! I have no idea why that generates that same error) [06:20] whut? [06:20] Yeah. :( [06:20] no, I mean what are you doing, I don't understand [06:20] I went through the dhcp source to find other things that might generate this same error. [06:21] And there were a few, in code paths that I _think_ we're not exercising. [06:21] ok [06:21] I have one thing I can try. [06:21] Hi rvba! [06:21] if that's the case we are probably safe [06:21] Hi jtv, hi bigjools. [06:22] however, did you check what errors omshell generates itself? [06:22] morning rvba [06:22] bigjools: yes, I did — it's all the same codebase, so I just grepped the whole thing. [06:22] ah ok [06:23] jtv: in that case you have convinced me that your existing change is good [06:23] does it work in practice? [06:23] When I tried it manually in omshell, yes. [06:23] cool [06:23] I appreciate your critical probing; I wish I could give easy absolute certainties about that codebase. :/ [06:24] yeah I know :/ [06:24] glad you appreciate it, not trying to be difficult, honest! [06:24] "Uh, trying?" :) [06:24] :p [06:25] It's good code for its era, actually. Clay pots, numeric error codes... [06:25] Makes me appreciate python all the more. === lifeless_ is now known as lifeless [11:20] roaksoax: 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.dhcpd [11:37] roaksoax: Still have to set up the custom dhcpd instance though, with its own config file etc. [12:13] jtv, are you there? [12:14] so, thinking about apparmor [12:14] is there any reason that maas should write that ? rather than packaging? [12:14] the reason i ask is that I think it might just be easier all around if [12:14] hi smoser [12:15] a.) 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 like [12:15] b.) in quantal apparmor.d we get such a thing included. [12:15] Sure, if you can swing it, for both precise and quantal. [12:15] ie, in quantal we'll modify usr.sbin.dhcpd profile to have that include. [12:16] then maas packaging can write the file in both cases. the only difference is we have to update that local file in precise. [12:16] it just seemed strange to write it in maas source code. its really packaging that caused this pain :) [12:16] Ohhh, right, I see. [12:17] Well the maas code is only to manage the extension to the local file. [12:17] right. but even that seems wierd. [12:17] It could easily contain just the #include. [12:17] i dont want to stop this from moving forward. [12:17] but that seemed a bit less in trusive [12:18] and it really seems wierd to me to have a daemon writing apparmor config [12:18] Either way it's going to be done in packaging, of course. [12:18] interesting... [12:18] if there were an apparmor profile for maas [12:18] it probably would *not* allow it to write/modify files in /etc/maas/apparmor.d [12:18] It's not the daemon writing there — it's just a piece of python that the installation scripts can call. [12:18] because if it did... that'd be like allowing full exploit and defeat of apparmor [12:19] hm.. [12:19] oh well. [12:19] i think i'll just table my thoguhts for now. [12:20] At this point, I'd rather have them soon so I can move forward a bit more before the night is over! [12:20] Er... did that come out weird? [12:21] What I mean is, I'm hoping to get a bit more done tonight. [12:23] me too [12:23] So I'd very much like these thoughts resolved. [12:29] smoser: 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:30] i think for precise we have to modify that file (the local) [12:30] there is no other way. [12:30] Agreed. But how do we modify it? [12:30] i think if it works, it makes sense to reduce your management of a common file [12:31] by using "#include" [12:31] right? [12:31] Right. [12:31] I just didn't want to assume that we can just append that to the file and never look back. [12:31] right [12:31] For example, we don't want to leave a broken #include around after you purge the config. [12:32] yeah, i dont know how it handles that. and packaging on removal would have to handle removal of that if missing files cause apparmor to choke [12:32] roaksoax, what do you think ? [12:33] it seems more proper to me for packaging to basically handle apparmor [12:33] FWIW with my code it'd be easy to disable that bit we add. [12:33] Packaging scripts would _call_ my code, obviously. [12:36] well, they could, yeah. [12:36] i'll wait to see what roaksoax thinks. [12:36] OK [12:36] it really does to me seem like packaing's problem. [12:36] Yes — I'm just providing a tool for it to use. [12:51] smoser: I'm going to go out for dinner now. I may be some time. [14:03] smoser: i'm fine with that, is the same thing done with bind [14:04] jtv: is the change in question make the change in the apparmor profile, or will we have to do it (in packaging)? [14:04] rvba: around? [14:36] rvba: let me know when around [14:45] roaksoax: I'm there but I'm otp [14:46] rvba: ok, no worries, let me know when you're done :) [14:57] ok. [14:58] i have a thoguht. [14:58] thell me how stupid this is. [14:58] in commissioning environment (and enlistment) [14:58] there is basically no way in to the image. [14:58] and when it fails, its a PITA to debug [14:58] so i'm thinking i will do: [14:58] if we take the failure case... [14:59] right now we print a message, sleep 60 seconds, poweroff [14:59] instead, we could [14:59] enable a password (possibly random), give a message, and say "if you do not login in the next X seconds, you will be powered off" [15:01] smoser: yeah that could work for debugging purposes [15:02] smoser: so, during enlistment, I waas thinking how to we chose what release to use? [15:09] http://paste.ubuntu.com/1190988/ [15:09] roaksoax, what do you mean choose? [15:13] smoser: so, while working on adding other ubuntu releases support [15:13] smoser: enlistment now requires you to tell what release to use for the enlisted system [15:13] smoser: so, how can we effectively chose what ubuntu releaswe to use [15:14] i'm confused. [15:14] you mean as in which ephemeral image to boot ? [15:14] smoser: no, it will boot in precise ephemeral image [15:15] smoser: but when you enlist the node itself [15:15] ok (that is a separate issue) [15:15] you're saying when i enlist a system, i have to chose the operating system that will be installd on it? [15:15] that is broken [15:15] badly broken [15:15] smoser: yes and no (that's one of the things I want to discuss with rvba) [15:16] smoser: but, as it stands now, I need to specify the ubuntu release to use [15:56] random 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 ? [16:02] roaksoax: all right, I'm there. Sorry for the delay. [16:02] rvba: no worries :) [16:03] rvba: 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 default [16:04] rvba: so in modes/node.py I did this: [16:04] os_release = CharField( max_length=10, choices=UBUNTU_RELEASE_CHOICES, blank=False, default=UBUNTU_RELEASE.precise) [16:04] which means that it should never be blank basically [16:04] right? [16:05] now, in forms.py I initially had this: [16:05] right [16:05] os_release = forms.ChoiceField( choices=UBUNTU_RELEASE_CHOICES, required=False, initial=UBUNTU_RELEASE.precise, error_messages={'invalid_choice': INVALID_UBUNTU_RELEASE_MESSAGE}) [16:05] err [16:05] Note that 'blank' is purely validation-related. [16:05] s/False/True [16:05] so I had the above with s/False/True, then enlistment failed because we were not specifying the releas [16:06] eso I changed it to required=False, and then enlistment no longer complained about not specifying release [16:06] but there was this: [16:06] ValidationError: {'release': [u'This field cannot be blank.']} [16:06] which means it was related to the blank=False [16:06] yep [16:06] so my question is, shouldn't the initil= and/or default= have set the release? [16:08] Well, that is indeed confusing stuff in Django. [16:08] The initial=xxx stuff let's you create a form with initial values. [16:08] As in an HTML form. [16:08] but that's all it will do. [16:09] So in the API were we're simply using forms for validating stuff, that won't be taken in to account. [16:10] rvba: right, but what about the default= on node.py [16:10] rvba: or better yet, how do you think this problme should be addressed? [16:11] roaksoax: the form should be responsible for setting the default. Let me find an example. [16:13] roaksoax: 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] roaksoax: that's in src/maasserver/forms.py [16:14] rvba: right, that's exactly where I ws looking [16:14] rvba: but then again, that's particularly for mac address isn't it? [16:14] roaksoax: yes [16:14] roaksoax: shouldn't the default come from a global config setting? [16:15] Rather than being hardcoded I mean. [16:15] rvba: yeah but if we do that, someone can simply set a non-supported release [16:15] rvba: but for now I'm just doing a first step [16:15] on getting this to work [16:15] rvba: and thinking that the default should be "precise" [16:16] The setting could be a dropdown menu with only the valid options. [16:16] rvba: right, that's what it is [16:16] So only supported releases would be in there right? [16:16] rvba: yes [16:16] rvba: everything seems to be working as expected but enlistment [16:17] rvba: so that's why I was wondering where should a default value be set [16:18] roaksoax: also, maybe you should allow Null value in there. If this field is null, then is means to use the default distrib. [16:18] s/distrib/release/ [16:18] rvba: os_release = CharField( [16:18] max_length=10, choices=UBUNTU_RELEASE_CHOICES, null=True, [16:18] blank=True, default=UBUNTU_RELEASE.precise) [16:18] If someone changes the default release, then all the nodes without a specific release set will use the new default transparently. [16:20] rvba: right, so that would technically fix it? [16:20] roaksoax: yes. [16:20] roaksoax: but I would be in favor of default=None [16:20] rvba: http://pastebin.ubuntu.com/1191126/ [16:21] Then if you want to change the default, change the global setting. [16:21] rvba: but default=None is no release being set [16:21] rvba: meaning the node will have os_release = None [16:22] rvba: each node should have a release [16:22] it is just as the architecture [16:22] roaksoax: yeah, and we would simply add a small get_os_release method which would return the default setting in that case. [16:22] IMHO [16:22] That method would be used to decide which release should be used. [16:22] rvba: that would be in node.py? [16:23] roaksoax: yes, soemthing like http://paste.ubuntu.com/1191129/ [16:24] s/get_or_release/get_os_release/ [16:24] rvba: right, ok cool, I'll first test the null change stuff and see what happens and then will look into the rest [16:25] roaksoax: ok [16:25] rvba: thought, default should probably be distro-info --stable [16:25] rvba: that's what I was thinking to do instead of UBUNTU_RELEASE.precise [16:26] to simply use UBUNTU_RELEASE.default = distro-info --stable [16:26] roaksoax: 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] rvba: right, ok so I'll first get this working [16:26] and then we can improve the default release [16:27] and setting option [16:27] Sounds like a plan. [16:33] rvba: btw.. preseed.py would look similar too: http://paste.ubuntu.com/1191157/ (i need to updated it first though) [16:36] roaksoax: makes sense. [16:48] rvba: where does the dev inst/home/roaksoax/Desktop/project/maas-whole/maas/bin/maas createsuperuser [16:48] sorry [16:48] errr [16:52] rvba: 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 node [16:52] rvba: where is that? [16:53] roaksoax: the js code uses ./src/maasserver/templates/maasserver/snippets.html to create that form [16:53] rvba: so that should also be updated then? [16:53] roaksoax: yes [16:53] rvba: ok good to know [16:54] rvba: and what about the label it will use, it shoes as "Os release" [16:54] and I'd like to use just "release" [16:54] roaksoax: use label="xx" on the CharField [16:55] rvba: ok cool thanks [16:55] np [16:59] rvba: so that also needs a migration? [17:00] or needs ot be part of the migration [17:00] roaksoax: if you're changing a model, then there is a migration. I recommend having one migration per change. [17:01] rvba: gotcha, thenaks [17:43] rvba: so do yo think it is a good idea to UBUNTU_RELEASE.default be obtained form a setting and then use that instead? [17:48] roaksoax: 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:50] rvba: ok cool [20:27] I 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:29] the 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?