/srv/irclogs.ubuntu.com/2012/02/15/#edubuntu.txt

=== Rondom_ is now known as Rondom
alkisgstgraber: ping, whenever you're ready for some nbd configuration chat.. :)12:56
=== sagaci_ is now known as sagaci
stgraberalkisg: ok, give me 10 minutes to catch up on what happened during the night ;)14:04
alkisg:)14:04
alkisgI decided to not wait for the chat, to push the changes, and if you don't like them we can just revert them14:04
alkisgThe idea is that 2 configuration files will be static, /etc/nbd-server/config and /etc/nbd-server/conf.d/swap.conf14:05
alkisg...and will be generated the first time ltsp-update-image is ran, and after that the nbd-server will be started14:05
alkisgWe could ship them with the ltsp package as conffiles as well if we wanted14:06
alkisg(although it'd make more sense for the nbd package to ship the /etc/nbd-server/config file itself)14:06
stgraberalkisg: why do we need to touch /etc/nbd-server/config?14:09
alkisgstgraber: it doesn't exist by default, does it?14:09
alkisgAh, nbd-server doesn't have a default includedir directive14:09
alkisgSo it ships an /etc/nbd-server/conf.d dir without using it14:09
alkisgAnd we need to put an includedir directive for nbd-server to start at all14:09
alkisgAt least that's what strace and the man page told me14:10
stgraberalkisg: can't you just copy /usr/share/nbd-server/nbd-server.conf.tmpl ?14:11
stgraberalkisg: 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 .d14:12
alkisgstgraber: and the swap.conf too, and start nbd-server14:12
alkisgI already put the code for those in ltsp-update-image14:12
stgraberright14:13
alkisgSo I only need to put the `cp`, ok14:13
alkisgstgraber: a policy problem though14:13
alkisgWe shouldn't have static filenames in /tmp14:13
alkisgAnd I'm using /tmp/nbd-swap/XXX, static names14:13
alkisg...because nbdrootd doesn't run as root, and can't create them in /var/run/ or elsewhere14:14
stgraberright, doesn't seem too bad though14:14
alkisgOK, let's leave it that way, if vagrantc has a better idea we can update it14:15
stgraberalkisg: 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 case14:15
alkisgstgraber: 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
stgraberalkisg: not that I can see, we mostly have ltsp- in the share name but that's not necessarily the case14:16
stgraberalkisg: easiest would be to md5sum /usr/share/nbd-server/nbd-server.conf.tmpl and /etc/nbd-server/config14:16
stgraberalkisg: 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
alkisgHmm that will be annoying, on every ltsp-update-image, if the user puts something else in his config14:17
alkisgBetter check the file date and ask?14:17
alkisgOr at least grep for ltsp inside that file, and issue a warning with big letters14:18
stgraberalkisg: well, we could make the check a bit clever and ask only if:14:18
stgraberalkisg: /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 exist14:18
stgraberso that should only do it the first time the user runs ltsp-update-image then14:19
stgraberas after that we'll have the ltsp file in con.d14:19
stgraber*conf.d14:19
alkisgstgraber: I thought /etc/nbd-server/conf.d/swap.conf would be a better name.. more generic than ltsp14:19
alkisgI'm using that in the current code14:20
stgraberalkisg: well, that's for the swap but what are you using for the root device?14:20
alkisgThe name of the image14:20
alkisgE.g. i386.img => ltsp_i386.conf14:20
alkisgltsp_amd64.conf etc14: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
stgraberok, so have ltsp-update-image look for the ltsp_$arch.conf one14:21
alkisgWhy not swap.conf, which is static?14:22
alkisgarch will vary on each ltsp-update-image call, if the user has many chroots...14:22
alkisgso he'll get prompted many times14:22
stgraberhmm, right, I'm just trying to think how people will remove the swap stuff14:23
alkisgWe can easily have an /etc/ltsp/nbdswapd.conf option to disable swap14:24
alkisgWithout removing that file14:24
stgraberok, so if we have an option of disabling swap without removing swap.conf, we can indeed check for swap.conf14:25
stgraberI'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
alkisgThe manpage says that the nbd-server prerun script can deny the image serving14:25
stgraberI guess ltsp_swap.conf would actually be easier for packagers, that way when purging ltsp we could rm /etc/nbd/config/ltsp_*14:26
alkisgWe can also just put it as a conffile in the ltsp package14:27
alkisgAnd another way to disable it is to just empty it14:27
alkisgOr to comment out the lines14:27
alkisgWe can also say so in the file header14:27
alkisgIt'll even be preserved on package upgrades, etc14:27
stgraberwell, 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
stgraberalkisg: ok, why don't we:14:29
stgraber - ship /etc/nbd-server/conf.d/ltsp_swap.conf in the package as conffile14:29
stgraber - have ltsp-update-image look for /etc/nbd-server/.ltsp_converted14:30
* alkisg likes nbdswapd.conf a bit better14: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_converted14:30
alkisgBetter yet, let's pretend to keep a backup of the old file :D14:31
alkisgInstead of touching14:31
alkisgSo, /etc/nbd-server/config.ltsp_converted14:31
stgraberwe could move /etc/nbd-server/config to /etc/nbd-server/config.before-ltsp14: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
alkisgThe only bad thing is that the user won't be able to get rid of that file without getting the prompt again14:32
stgraberbut 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 it14:33
alkisgstgraber: why don't we do the rename in postinst?14:33
alkisgCheck the version being upgraded, and if it's the last shipped ltsp, do it14:34
alkisgI have some code in epoptes.postinst doing that14:34
stgraberbecause we don't run ltsp-update-image in postinst, so that'd break people's system on upgrade14:34
alkisgJust a rename14:34
alkisgmv /etc/nbd-server/config /etc/nbd-server/config.ltsp-backup14:34
alkisgThen ltsp-update-image will create a new one14:35
alkisg(whenever the user calls it)14:35
stgraberhmm, 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
alkisgHehe true14:36
alkisgSo we'll need to tag a new version, and use dpkg --compare-versions against that14:36
stgraberyeah14:37
stgraberwell, I could check for -gt 5.2.16+14:38
stgraberor actually -gt 5.2.16+bzrXXXX where XXXX is when we finish the conf.d changes14:38
stgraberso even PPA packages will work14:38
alkisgNice14:40
kleewyckWhat's the current method or installing LTSP on Edubuntu? Just use the normal Edubuntu DVD then install ltsp on top?16:15
alkisgstgraber: 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 time17:20

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