Bug#969372: INFO: Bug#969372: uwsgi-emperor: SysV init script does nothing

2020-12-23 Thread Sam
Thanks Houben, I appreciate your efforts!

Sam

Quoting Rens Houben (2020-12-22 16:07:00)
> Hello,
> 
> I've come across the same bug while trying to set up a new service at work.
> 
> After some digging (we've currently got a mishmash of Jessie and Buster
> systems, not all of them have been upgraded yet) I discovered that the init
> script, such as it is, is identical in all versions, and it is not actually 
> the
> problem.
> 
> Running the init script manually gave the following output:
> 
> rhouben@networking-lab-rh:/var/log/uwsgi$ sudo  /etc/init.d/uwsgi-emperor 
> start
> [ ok ] Starting uwsgi-emperor (via systemctl): uwsgi-emperor.service.
> 
> 
> ... Whereas on a system still running Jessie I got:
> shadur@radius-srv-dc25:~$ sudo /etc/init.d/uwsgi-emperor restart
> [] Restarting uWSGI Emperor server: uwsgi[uWSGI] getting INI configuration
> from /etc/uwsgi-emperor/emperor.ini
> setting capability setgid [6]
> setting capability setuid [7]
> . ok
> 
> 
> The issue arose because the init script isn't so much a script as it's a set 
> of
> variables plugged into the init.d helper scripts, and /those/ have changed
> drastically from Jessie to Buster and onwards to call systemctl -- but in
> uwsgi-emperor's case there doesn't appear to /be/ a systemd service file to
> call on, so it quietly fails and does nothing at all.
> 
> I'm currently writing at least a rudimentary systemd service file for
> uwsgi-emperor to see if that makes it work; I can share it once I finish if
> you'd like.
> 
> --Rens Houben.
> 
> 
> 
> SYSTEMEC BV
> 
> Marinus Dammeweg 25, 5928 PW Venlo
> Postbus 3290, 5902 RG Venlo
> Industrienummer: 6817
> Nederland
> 
> T: 077-3967572 (Support)
> K.V.K. nummer: 12027782 (Venlo)
> 
> Neem een kijkje op onze vernieuwde website
> 
> Systemec Datacenter Venlo, Nettetal en Düsseldorf
> 
> ISO/IEC 27001:2017 gecertificeerd door
> Digitrust, registratienummer DGT2020092101
> NEN 7510-01:2017 gecertificeerd door
> Digitrust, registratienummer DGTN2020092101
> 
> Systemec Helpdesk  Helpdesk
> 
> Aanmelden nieuwsbrief  Aanmelden nieuwsbrief
> 
> Volg ons op: Systemec Twitter Systemec Facebook Systemec Linkedin Systemec
> Youtube
> 


signature.asc
Description: signature


Bug#969372: [pkg-uWSGI-devel] Bug#969372: INFO: Bug#969372: uwsgi-emperor: SysV init script does nothing

2020-12-23 Thread Jonas Smedegaard
Quoting Rens Houben (2020-12-22 18:35:52)
> Okay, this is quick-and-dirty because I didn't have a great deal of time and 
> I'm not /that/ great with systemd service files to begin with.
> 
> ---
> [Unit]
> Description=uWSGI Emperor
> After=syslog.target
> 
> [Service]
> ExecStart=/usr/bin/uwsgi --ini /etc/uwsgi-emperor/emperor.ini
> RuntimeDirectory=uwsgi
> Restart=always
> KillSignal=SIGQUIT
> Type=notify
> StandardError=syslog
> NotifyAccess=all
> 
> [Install]
> WantedBy=multi-user.target
> 
> There's serious room for improvement there -- the usual way for 
> running the Emperor is in Tyrant mode and setting it to retain 
> setuid/setguid capabilities before switching down to a 
> non-privileged user; I think it would be possible to assign 
> it those capabilities in the service file and start it unprivileged 
> otherwise, but I'm not good enough to bash that out safely.
> 
> Hope this helps, and thanks for the excellent job you guys do,


Thanks!

What I still don't understand is why, when systemd file is missing, it 
does not automatically fallback to use sysv - I thought that would 
happen generally in Debian (and that adding systemd file therefore 
should be only an improvement, not crucial).


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

signature.asc
Description: signature


Bug#969372: INFO: Bug#969372: uwsgi-emperor: SysV init script does nothing

2020-12-22 Thread Rens Houben
Okay, this is quick-and-dirty because I didn't have a great deal of time and 
I'm not /that/ great with systemd service files to begin with.

---
[Unit]
Description=uWSGI Emperor
After=syslog.target

[Service]
ExecStart=/usr/bin/uwsgi --ini /etc/uwsgi-emperor/emperor.ini
RuntimeDirectory=uwsgi
Restart=always
KillSignal=SIGQUIT
Type=notify
StandardError=syslog
NotifyAccess=all

[Install]
WantedBy=multi-user.target

There's serious room for improvement there -- the usual way for 
running the Emperor is in Tyrant mode and setting it to retain 
setuid/setguid capabilities before switching down to a 
non-privileged user; I think it would be possible to assign 
it those capabilities in the service file and start it unprivileged 
otherwise, but I'm not good enough to bash that out safely.

Hope this helps, and thanks for the excellent job you guys do,

--Rens.


Processed: Re: [pkg-uWSGI-devel] Bug#969372: INFO: Bug#969372: uwsgi-emperor: SysV init script does nothing

2020-12-22 Thread Debian Bug Tracking System
Processing control commands:

> tags -1 +help
Bug #969372 {Done: Jonas Smedegaard } [uwsgi-emperor] 
uwsgi-emperor: SysV init script does nothing
Added tag(s) help.

-- 
969372: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=969372
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#969372: [pkg-uWSGI-devel] Bug#969372: INFO: Bug#969372: uwsgi-emperor: SysV init script does nothing

2020-12-22 Thread Jonas Smedegaard
Control: tags -1 +help

Quoting Rens Houben (2020-12-22 10:07:00)
> The issue arose because the init script isn't so much a script as it's 
> a set of variables plugged into the init.d helper scripts, and /those/ 
> have changed drastically from Jessie to Buster and onwards to call 
> systemctl -- but in uwsgi-emperor's case there doesn't appear to /be/ 
> a systemd service file to call on, so it quietly fails and does 
> nothing at all.
> 
> I'm currently writing at least a rudimentary systemd service file for 
> uwsgi-emperor to see if that makes it work; I can share it once I 
> finish if you'd like.

That would be quite helpful indeed.

  - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

signature.asc
Description: signature


Bug#969372: INFO: Bug#969372: uwsgi-emperor: SysV init script does nothing

2020-12-22 Thread Thomas Goirand
On 12/22/20 10:07 AM, Rens Houben wrote:
> I'm currently writing at least a rudimentary systemd service file for
> uwsgi-emperor to see if that makes it work; I can share it once I finish
> if you'd like.
> 
> --Rens Houben.

Hi Rens,

Thanks for your reply and sharing of your investigations.

Very much, sharing your .service file would be helpful. None of the
UWSGI maintainers are currently using the emperor mode.

Cheers,

Thomas Goirand (zigo)



Bug#969372: INFO: Bug#969372: uwsgi-emperor: SysV init script does nothing

2020-12-22 Thread Rens Houben
Hello,

I've come across the same bug while trying to set up a new service at work.

After some digging (we've currently got a mishmash of Jessie and Buster 
systems, not all of them have been upgraded yet) I discovered that the init 
script, such as it is, is identical in all versions, and it is not actually the 
problem.

Running the init script manually gave the following output:

rhouben@networking-lab-rh:/var/log/uwsgi$ sudo  /etc/init.d/uwsgi-emperor start
[ ok ] Starting uwsgi-emperor (via systemctl): uwsgi-emperor.service.


... Whereas on a system still running Jessie I got:
shadur@radius-srv-dc25:~$ sudo /etc/init.d/uwsgi-emperor restart
[] Restarting uWSGI Emperor server: uwsgi[uWSGI] getting INI configuration 
from /etc/uwsgi-emperor/emperor.ini
setting capability setgid [6]
setting capability setuid [7]
. ok


The issue arose because the init script isn't so much a script as it's a set of 
variables plugged into the init.d helper scripts, and /those/ have changed 
drastically from Jessie to Buster and onwards to call systemctl -- but in 
uwsgi-emperor's case there doesn't appear to /be/ a systemd service file to 
call on, so it quietly fails and does nothing at all.

I'm currently writing at least a rudimentary systemd service file for 
uwsgi-emperor to see if that makes it work; I can share it once I finish if 
you'd like.

--Rens Houben.



SYSTEMEC BV


Marinus Dammeweg 25, 5928 PW Venlo
Postbus 3290, 5902 RG Venlo
Industrienummer: 6817
Nederland

T: 077-3967572 (Support)
K.V.K. nummer: 12027782 (Venlo)


Neem een kijkje op onze vernieuwde website

[Systemec Datacenter Venlo, Nettetal en D?sseldorf]


ISO/IEC 27001:2017 gecertificeerd door
Digitrust, registratienummer DGT2020092101
NEN 7510-01:2017 gecertificeerd door
Digitrust, registratienummer 
DGTN2020092101


[Systemec Helpdesk]  
Helpdesk


[Aanmelden nieuwsbrief]  Aanmelden 
nieuwsbrief


Volg ons op: [Systemec Twitter]   [Systemec 
Facebook]   [Systemec Linkedin] 
  [Systemec Youtube]