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