leafwiz | Hey there. I have a daemon with a init script that seems not to work properly. Its the smokeping package. When I do a smokeping stop the service is still running | 15:41 |
---|---|---|
leafwiz | I would expect it to log a termination to syslog | 15:41 |
leafwiz | Not sure what is wrong. the pid file seems fine | 15:43 |
leafwiz | when I give a stop command I get an output that it is stopping but nothing in syslog | 15:44 |
gnarface | did you run it as root or as a regular user? | 15:46 |
gnarface | and by "smokeping stop" you mean "/etc/init.d/smokeping stop" right? | 15:46 |
leafwiz | gnarface . I ran it as root, and yes, /etc/init.d/smokeping stop | 15:52 |
gnarface | you said nothing in syslog, did you also check daemon.log? | 15:54 |
leafwiz | gnarface: it is the same there | 16:16 |
gnarface | hmm, can't be sure what's going wrong sorry | 16:18 |
gnarface | which release are you on? | 16:18 |
gnarface | leafwiz: which release are you on? is this chimaera? | 16:26 |
leafwiz | gnarface: i'm on stable | 16:27 |
gnarface | was it an upgrade or a fresh install? | 16:27 |
leafwiz | I think it was a fresh install. But it has been autoupdating a while now | 16:28 |
gnarface | there's some bugs on bugs.debian.org related to upgrades from the previous release, i wonder if it could be related | 16:29 |
leafwiz | okay. yeah, I can do a fresh install on a system. And reinstall smokeping. | 16:30 |
gnarface | well, it might not come to that, just check those bugs and see if the config mangling happened to your configs too | 16:30 |
leafwiz | Because it seems like a obvious fault so yeah. prob something wrong with my system | 16:30 |
gnarface | it's probably also something much easier to fix than a full reinstall | 16:30 |
gnarface | i'm not making any allegations i'm just guessing still | 16:31 |
leafwiz | Sure, yeah. I don't want to do a full install on my prod system. I have a vmware at home I can do a test install on | 16:31 |
gnarface | did it ever work right or is this the first time you've tried to stop it? | 16:32 |
gnarface | there also might be something obvious if you look at the script itself, maybe related to missing some package | 16:32 |
leafwiz | The thing is. I started smokeing in debug mode, and then it might change fileownerships | 16:34 |
gnarface | hmm, i don't know enough about it to know for sure | 16:35 |
gnarface | i was just thinking that maybe it does some check assuming some shell tool is installed but gets a false positive because it's not installed | 16:35 |
gnarface | but if it used to stop right then probably not | 16:36 |
leafwiz | https://paste.pics/3e2786fcede8e8c98a68d486fbfa012b | 16:38 |
leafwiz | So I see output from the log_daemon_msg, but it seems the start-stop-daemon does not wortk | 16:38 |
gnarface | i'm not gonna click on that sorry, but i'll take your word for it | 16:41 |
gnarface | if you paste the init script at paste.debian.net i'll take a look and see if i get any ideas | 16:41 |
leafwiz | aha.. yeah. sorry. Just my copy paste did't work from vim. | 16:44 |
gnarface | highlight + middle-click paste didn't work? | 16:45 |
gnarface | paste.debian.net will allow you to select a file | 16:46 |
leafwiz | Just when I\m in vim there is issues. | 16:46 |
leafwiz | root@gnafle:/etc/smokeping/config.d# start-stop-daemon --oknodo --stop --pidfile /var/run/smokeping/smokeping.pid --exec /usr/sbin/smokeping --signal 15 | 16:46 |
leafwiz | No /usr/sbin/smokeping found running; none killed. | 16:46 |
leafwiz | I ran the command manually | 16:46 |
leafwiz | root@gnafle:/etc/smokeping/config.d# ps aux | grep smoke | 16:46 |
leafwiz | smokepi+ 25979 0.0 0.2 98644 36068 ? Ss 15:39 0:00 /usr/bin/perl /usr/sbin/smokeping --config=/etc/smokeping/config | 16:46 |
leafwiz | smokepi+ 25980 0.0 0.2 98644 37524 ? S 15:39 0:00 /usr/sbin/smokeping [IRTT] | 16:46 |
leafwiz | smokepi+ 25981 0.0 0.2 98644 37716 ? S 15:39 0:00 /usr/sbin/smokeping [FPing] | 16:46 |
leafwiz | root 26649 0.0 0.0 14160 9312 pts/1 S+ 16:35 0:00 vi /etc/init.d/smokeping | 16:47 |
gnarface | careful, don't get hit by the flood protect | 16:47 |
gnarface | you can just /msg me stuff like that if you have to | 16:47 |
leafwiz | yeah, was about to ask.. nyes. Okay. But there is the lines | 16:47 |
gnarface | and the pid file you say is present and has the right pid? | 16:48 |
leafwiz | jupp | 16:48 |
gnarface | seems weird | 16:48 |
gnarface | i wonder if it's a bug in start-stop-daemon | 16:48 |
gnarface | i would be tempted to just hack the script and replace that with a call to killall | 16:49 |
leafwiz | mm.. so maybe the start-stop-daemon expects /usr/sbin/smokeping ,and it sees /usr/bin/perl as well | 16:49 |
leafwiz | heh.. yeah | 16:49 |
gnarface | but /usr/sbin/smokeping has to be there doesn't it? make sure it's there | 16:49 |
leafwiz | But I could also hack the script by putting in /usr/bin/perl | 16:49 |
leafwiz | in the daemon path | 16:50 |
leafwiz | naah. that did't work. | 16:51 |
leafwiz | jupp, a killall would prob work.. ;) | 16:52 |
leafwiz | a killall didn't work.. but a kil $(cat pidfile) did work. | 16:55 |
gnarface | killall didn't work?!?! | 16:56 |
gnarface | now something seems really weird | 16:56 |
leafwiz | nope.. | 16:56 |
gnarface | one thing... do you have "chimaera" in your sources.list or actually the word "stable" instead? | 16:56 |
leafwiz | I just get a "no process found" | 16:57 |
leafwiz | I think its because it is started as a perl process | 16:57 |
gnarface | maybe | 16:57 |
leafwiz | smokepi+ 27086 0.0 0.2 98616 36056 ? Ss 16:56 0:00 /usr/bin/perl /usr/sbin/smokeping --config=/etc/smokeping/config | 16:57 |
gnarface | is the perl process the one whose pid goes in the pid file? | 16:58 |
leafwiz | I have the word `stable' | 16:58 |
gnarface | so i have another theory | 16:58 |
gnarface | if you had the word stable in there since the last release, and you've had auto-updates happening, you might be experiencing problems with an incomplete upgrade | 16:58 |
leafwiz | aha.. maybe. | 16:59 |
leafwiz | I run apt update && apt upgrade in a crontab | 16:59 |
gnarface | since the release changed from beowulf to chimaera, but the auto-update thingy might not actually do a dist-upgrade | 16:59 |
gnarface | try "apt-get update && apt-get --no-install-recommends upgrade && apt-get --no-install-recommends dist-upgrade" | 17:00 |
leafwiz | one packaged wanted to be updated | 17:00 |
gnarface | look like anything relevant to this? | 17:01 |
leafwiz | coontainerd.io , been running docker on int | 17:01 |
leafwiz | no | 17:01 |
gnarface | bummer | 17:01 |
leafwiz | yeah.. Well. I managed to hack it at least. | 17:01 |
leafwiz | Can be something to do with killall not working | 17:01 |
gnarface | hang out, maybe someone else around here has an idea what's really going on | 17:02 |
leafwiz | Sure. yeah. | 17:02 |
gnarface | if you're up for burning more time on it, it would be valuable to know if this is also misbehaving the same way on debian stable | 17:03 |
gnarface | if it's not, then we should escalate here | 17:04 |
leafwiz | Sure, I could check when I get home. I don't have any debian stable available here. | 17:08 |
gnarface | it's not like a big deal, especially if you have a solution that works for you for now, but something broken with init stuff that's not broken the same way in debian will get attention here faster | 17:10 |
gnarface | especially if it's in the stable release | 17:10 |
leafwiz | yeah, I suspect it might be a systemv issue only | 17:10 |
leafwiz | But it will be interesting to see. I will check it up when I'm home. | 17:10 |
golinux | https://www.devuan.org/os/releases | 17:35 |
golinux | Read the section "Codenames or suites?" | 17:36 |
golinux | leafwiz: ^^^ | 17:36 |
rwp | golinux, leafwiz is no longer in the channel but I installed smokeping and will confirm there is a bug and it does not stop correctly. | 20:10 |
rwp | I'll see if I can't chase it down... | 20:10 |
golinux | rwp: He was here when I posted that. | 20:28 |
leafwiz | Hey. Earlier I chatted about the init script in smokeping package does not work. I have tried on my homesystem that was installed a month ago. Stable. Same result | 20:43 |
leafwiz | Or the script is unable to stop the smokeping daemon | 20:43 |
gnarface | it has been independently confirmed moments ago, leafwiz | 20:43 |
rwp | Hi leafwiz. I installed smokeping here and will confirm there is a bug in the init script and it does not kill things properly. | 20:43 |
leafwiz | Cool. Good to hear. So people know about it. | 20:44 |
rwp | I'll dig into it a little big more here in a bit. It's definitely a Debian upstream problem. | 20:44 |
leafwiz | Ah. Misread, moments ago. But that it also good. :) | 20:44 |
rwp | However... It's in an init script. So... I am not optimistic about Debian being receptive to a fix there. | 20:45 |
leafwiz | mm.. yeah, that is my feeling as well. | 20:45 |
leafwiz | But does devuan maintain inits scripts themself? | 20:45 |
leafwiz | Oh well. We will see how it develops. hope for the best | 20:47 |
leafwiz | Maybe some init lovers will give it the good graces | 20:48 |
gnarface | there's some forked packages that might have inits i think, and there's also a separate package of missing init scripts around here somewhere too | 20:51 |
gnarface | the preference would be for debian to fix it if they will though | 20:51 |
leafwiz | Its strange. Even though the pid file has the correct pid, and the daemon has the correct fullpath name the start-stop-daemon says "No /usr/sbin/smokeping found running; none killed." | 20:58 |
gnarface | it might be checking the name and finding /usr/bin/perl, you might be right about that | 21:00 |
gnarface | the pid in the file is the one pointing to the perl process that launches it, isn't it? | 21:01 |
leafwiz | well.. in work I got the path of the perl process, and then the smokepingscript , but at home, with both stable devuan, I only get the path of the smokeping script | 21:02 |
leafwiz | but it is a /usr/bin/perl script | 21:02 |
leafwiz | So I'm unsure of how the system handles that type of programs. | 21:03 |
leafwiz | I also tried to feed the start-stop-daemon with the correct user since it runs under the user `smokeping' but no go | 21:04 |
gnarface | hmm, i wonder if --ppid would work | 21:05 |
gnarface | for parent process pid | 21:05 |
gnarface | i'm just looking at the man page for ideas | 21:05 |
gnarface | maybe there's just a forgotten flag or something | 21:06 |
leafwiz | start-stop-daemon --oknodo --stop --retry 3 --pidfile $PIDFILE --exec /usr/bin/perl --signal 15 | 21:06 |
leafwiz | This worked, or killed it | 21:06 |
gnarface | ah, --exec, good call | 21:07 |
leafwiz | Jupp. Just copied from the init file | 21:07 |
leafwiz | but yeah, my suspicions was on the process-name | 21:07 |
leafwiz | Okay, so the init script needs to be changed to: start-stop-daemon --oknodo --stop --retry 3 --pidfile $PIDFILE --signal 15 -u smokeping | 21:10 |
leafwiz | "Don't use --exec $DAEMON when stopping, as this doesn't work if you're trying to stop the daemon after having replaced the executable as part of" | 21:11 |
leafwiz | https://serverfault.com/questions/706018/whats-the-proper-what-to-terminate-a-script-using-start-stop-daemon | 21:11 |
leafwiz | the start-stop will complain if you don't add the user option. | 21:11 |
leafwiz | And you should not use the --exec when dealing with scripts | 21:11 |
leafwiz | Or this is the correct version I would say: | 21:14 |
leafwiz | start-stop-daemon --oknodo --stop --retry 3 --quiet --pidfile $PIDFILE --user $DAEMON_USER --signal 15 | 21:14 |
leafwiz | Jupp. All good now. | 21:16 |
leafwiz | http://sprunge.us/0X6s0t | 21:21 |
leafwiz | The init script | 21:22 |
leafwiz | gnarface: are you able to confirm it? | 21:24 |
leafwiz | And then the question is how do we send this patch to the correct people | 21:25 |
leafwiz | I have never done something like this | 21:25 |
gnarface | file it at bugs.devuan.org i would say | 21:32 |
gnarface | fix seems logical, i'm sure rwp can verify | 21:33 |
leafwiz | "Also remember that bugs in unforked packages (those that Devuan uses directly from Debian) should usually be reported to Debian's BTS unless you think you have found a Devuan specific problem. " | 21:37 |
leafwiz | So this is an unforked package I assume. So I can report to BTS | 21:37 |
gnarface | well that's probably true i guess | 21:37 |
gnarface | forgot about that part | 21:38 |
gnarface | they're probably just gonna remove it from the package though | 21:38 |
leafwiz | The init script? | 21:40 |
gnarface | yea | 21:41 |
leafwiz | Well. Maybe they won't if I supply a patch | 21:41 |
gnarface | worth a try | 21:41 |
leafwiz | ubs.. I used the reportbug tool, and it send the bugreport to devuan. Oh well. They will prob forward it for me, or something :) | 22:16 |
leafwiz | Another thing. Why is it that so many distributions with debian is using the driver name as the device name for the nic ? In stead of eth0 or wlan0 ? What is it that one gains by doing this? | 22:23 |
leafwiz | Or some distribution, but happily not Devuan | 22:24 |
gnarface | i think they're just trying to be annoying actually but the excuse is that it's for disambiguation | 22:25 |
gnarface | bsd does something similar | 22:25 |
leafwiz | I ran into this in work. Trying to help a field technician, and he had to type in that long nic name in a console terminal. was a bit annoying | 22:25 |
leafwiz | They succeed in being annoying, because the crappy nic name was so long! Like a hex password.. >P | 22:26 |
leafwiz | :P | 22:26 |
leafwiz | I complained to debian to day.. And they gave me a long list, but I dunno. That list was written with quite the attitude. | 22:27 |
leafwiz | So I didn't read it | 22:27 |
leafwiz | (or the list was not long. It was a list with some topics) | 22:27 |
leafwiz | Oh well. I just hope Devuan is able to maintain the classic naming scheme. | 22:28 |
leafwiz | Its one of those things I like with linux | 22:28 |
leafwiz | Like the two things that I liked with linux when I was a yungster was the systemv startup scripts, everything is a file. And the simple naming conventions for the hw devices. That was for me quite impressive. | 22:30 |
gnarface | there's a kernel command-line parameter you can set to change it if you need to | 22:30 |
leafwiz | yeah, and that is nice. Its just that I miss those simple and nice names in default install. | 22:31 |
leafwiz | Its fine. I have devuan. | 22:33 |
wikan | hi, is anyone using lxc under devuan? | 22:50 |
wikan | it is even possible to use unprivigeled containers? | 22:50 |
gnarface | not sure, but maybe check the forum while you wait for someone here who knows | 22:51 |
wikan | well i browse internet now | 22:52 |
wikan | systemd is a fucking cancer | 22:52 |
wikan | well i found something... | 22:54 |
wikan | great | 23:15 |
wikan | lxc doesnt work | 23:15 |
gnarface | qemu works | 23:17 |
wikan | but slower | 23:19 |
gnarface | with kvm it's pretty fast | 23:20 |
wikan | if you have cpu that suuport virtualization | 23:20 |
wikan | i am too old i think | 23:21 |
wikan | fuck, i must drop every software i use | 23:21 |
gnarface | linux-vservers maybe? | 23:21 |
wikan | what it is? | 23:22 |
gnarface | kernel level para-virtualization, it used to be part of debian a long time ago until it was pulled, but with some effort (custom kernel patch+build) you can get it working again | 23:26 |
wikan | i read about it | 23:26 |
wikan | well i quit this shit | 23:26 |
gnarface | it's a good choice if you don't have hardware virtualization acceleration and only need to support linux guests | 23:26 |
wikan | it is annoying if you do something and someone tells you to fuck yourself | 23:27 |
wikan | non stop something changes | 23:28 |
wikan | i thought the arguments of commands is the max I can expect | 23:28 |
wikan | but as i see... one update and you are fucked | 23:28 |
rwp | leafwiz, gnarface, I see lots of discussion so I assume the problem is resolved without reading it in detail. | 23:44 |
brocashelm | someone was having a bad day... | 23:57 |
Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!