=== Rondom_ is now known as Rondom [12:56] stgraber: ping, whenever you're ready for some nbd configuration chat.. :) === sagaci_ is now known as sagaci [14:04] alkisg: ok, give me 10 minutes to catch up on what happened during the night ;) [14:04] :) [14:04] I decided to not wait for the chat, to push the changes, and if you don't like them we can just revert them [14:05] The idea is that 2 configuration files will be static, /etc/nbd-server/config and /etc/nbd-server/conf.d/swap.conf [14:05] ...and will be generated the first time ltsp-update-image is ran, and after that the nbd-server will be started [14:06] We could ship them with the ltsp package as conffiles as well if we wanted [14:06] (although it'd make more sense for the nbd package to ship the /etc/nbd-server/config file itself) [14:09] alkisg: why do we need to touch /etc/nbd-server/config? [14:09] stgraber: it doesn't exist by default, does it? [14:09] Ah, nbd-server doesn't have a default includedir directive [14:09] So it ships an /etc/nbd-server/conf.d dir without using it [14:09] And we need to put an includedir directive for nbd-server to start at all [14:10] At least that's what strace and the man page told me [14:11] alkisg: can't you just copy /usr/share/nbd-server/nbd-server.conf.tmpl ? [14:12] alkisg: so basically checking if /etc/nbd-server/config exists, if it does, don't do anything (we don't want to touch existing files), if it doesn't, then copy /usr/share/nbd-server/nbd-server.conf.tmpl to /etc/nbd-server/config and add the LTSP stuff in .d [14:12] stgraber: and the swap.conf too, and start nbd-server [14:12] I already put the code for those in ltsp-update-image [14:13] right [14:13] So I only need to put the `cp`, ok [14:13] stgraber: a policy problem though [14:13] We shouldn't have static filenames in /tmp [14:13] And I'm using /tmp/nbd-swap/XXX, static names [14:14] ...because nbdrootd doesn't run as root, and can't create them in /var/run/ or elsewhere [14:14] right, doesn't seem too bad though [14:15] OK, let's leave it that way, if vagrantc has a better idea we can update it [14:15] alkisg: one more case we need to deal with sadly, is the case where we already have an ltsp generated /etc/nbd-server/config, and overwrite it in that case [14:16] stgraber: does that have static content, something we can grep to see if we need to overwrite it? [14:16] * alkisg was still on 10.04 until a few months ago... [14:16] alkisg: not that I can see, we mostly have ltsp- in the share name but that's not necessarily the case [14:16] alkisg: easiest would be to md5sum /usr/share/nbd-server/nbd-server.conf.tmpl and /etc/nbd-server/config [14:17] alkisg: if they don't match, ask if we should override it (and mention that you have to, if you're upgrading from an older LTSP) [14:17] Hmm that will be annoying, on every ltsp-update-image, if the user puts something else in his config [14:17] Better check the file date and ask? [14:18] Or at least grep for ltsp inside that file, and issue a warning with big letters [14:18] alkisg: well, we could make the check a bit clever and ask only if: [14:18] alkisg: /etc/nbd-server/config exists and doesn't match /usr/share/nbd-server/nbd-server.conf.tmpl and /etc/nbd-server/conf.d/ltsp doesn't exist [14:19] so that should only do it the first time the user runs ltsp-update-image then [14:19] as after that we'll have the ltsp file in con.d [14:19] *conf.d [14:19] stgraber: I thought /etc/nbd-server/conf.d/swap.conf would be a better name.. more generic than ltsp [14:20] I'm using that in the current code [14:20] alkisg: well, that's for the swap but what are you using for the root device? [14:20] The name of the image [14:20] E.g. i386.img => ltsp_i386.conf [14:20] ltsp_amd64.conf etc [14:21] (at least that's what I was planning to, I can't run ltsp-update-image currently and I didn't do any testing) [14:21] ok, so have ltsp-update-image look for the ltsp_$arch.conf one [14:22] Why not swap.conf, which is static? [14:22] arch will vary on each ltsp-update-image call, if the user has many chroots... [14:22] so he'll get prompted many times [14:23] hmm, right, I'm just trying to think how people will remove the swap stuff [14:24] We can easily have an /etc/ltsp/nbdswapd.conf option to disable swap [14:24] Without removing that file [14:25] ok, so if we have an option of disabling swap without removing swap.conf, we can indeed check for swap.conf [14:25] I'm still not sure if I prefer swap.conf or ltsp_swap.conf, considering that as you just pointed out, the config of the swap stuff is in /etc/ltsp/ and the swap stuff is shipped with ltsp ;) [14:25] The manpage says that the nbd-server prerun script can deny the image serving [14:26] I guess ltsp_swap.conf would actually be easier for packagers, that way when purging ltsp we could rm /etc/nbd/config/ltsp_* [14:27] We can also just put it as a conffile in the ltsp package [14:27] And another way to disable it is to just empty it [14:27] Or to comment out the lines [14:27] We can also say so in the file header [14:27] It'll even be preserved on package upgrades, etc [14:28] well, no, because if we make it a conf file, we can't use it to know if /etc/nbd-server/config has been updated... [14:29] alkisg: ok, why don't we: [14:29] - ship /etc/nbd-server/conf.d/ltsp_swap.conf in the package as conffile [14:30] - have ltsp-update-image look for /etc/nbd-server/.ltsp_converted [14:30] * alkisg likes nbdswapd.conf a bit better [14:30] (although that will have the same name as /etc/ltsp/nbdswapd.conf, so never mind :D) [14:30] - if it's not there, then prompt the user and copy /usr/share/nbd-server/nbd-server.conf.tmpl over /etc/nbd-server/config, then touch .ltsp_converted [14:31] Better yet, let's pretend to keep a backup of the old file :D [14:31] Instead of touching [14:31] So, /etc/nbd-server/config.ltsp_converted [14:32] we could move /etc/nbd-server/config to /etc/nbd-server/config.before-ltsp [14:32] (.ltsp_converted sounds like it's the file being used by nbd, .before-ltsp makes it clear it's a backup) [14:32] The only bad thing is that the user won't be able to get rid of that file without getting the prompt again [14:33] but then we need to also do the md5sum because people will likely remove /etc/nbd-server/config.before-ltsp when doing some cleanup and we don't want to remove it [14:33] stgraber: why don't we do the rename in postinst? [14:34] Check the version being upgraded, and if it's the last shipped ltsp, do it [14:34] I have some code in epoptes.postinst doing that [14:34] because we don't run ltsp-update-image in postinst, so that'd break people's system on upgrade [14:34] Just a rename [14:34] mv /etc/nbd-server/config /etc/nbd-server/config.ltsp-backup [14:35] Then ltsp-update-image will create a new one [14:35] (whenever the user calls it) [14:36] hmm, right, I can do that, it's not really clean and some people will complain, but the rest of LTSP is even more hackish usually, so ... [14:36] Hehe true [14:36] So we'll need to tag a new version, and use dpkg --compare-versions against that [14:37] yeah [14:38] well, I could check for -gt 5.2.16+ [14:38] or actually -gt 5.2.16+bzrXXXX where XXXX is when we finish the conf.d changes [14:38] so even PPA packages will work [14:40] Nice [16:15] What's the current method or installing LTSP on Edubuntu? Just use the normal Edubuntu DVD then install ltsp on top? [17:20] stgraber: that pad.ubuntu.com is very annoying, it needs authentication every few hours, and it doesn't even get me to the correct page after the authentication, etc... we should use pad.ubuntu-uk.org next time