|
Bugzilla – Full Text Bug Listing |
| Summary: | rcapache2 graceful not working with systemd | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 12.1 | Reporter: | Christoph Obexer <cobexer> |
| Component: | Release Notes | Assignee: | Ruediger Oertel <ro> |
| Status: | RESOLVED FIXED | QA Contact: | Stephan Kulow <coolo> |
| Severity: | Critical | ||
| Priority: | P5 - None | CC: | fcrozat, ke, per, ro, werner |
| Version: | Beta 1 | Flags: | coolo:
SHIP_STOPPER+
|
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: | patch to not redirect non-standard command to systemd | ||
Unfortunately, systemctl only supports "standard" parameters (see http://www.freedesktop.org/wiki/Software/systemd/Incompatibilities ) you can bypass this by using : cd /etc/init.d/ ./rcapache2 <your_command> still a few points:
* the help output tells me something that is not true
(in the example /usr/sbin/rcapache2 does _not_ accept the arguments given)
* not sure i understand systemd right but:
systemd would work without the /etc/init.d things entirely right?
so the hack that makes it work with all the legacy things that like
scripts to start/stop services in /etc/init.d/* does not pass parameters
it (the _hack_) does not understand?
the hack currently checks $0, add checks for the command too and all will be fine,
and the help command of every service should also include a note about what systemd hacked into the invocation of the init script so that people that try to figure out why something does not work have a chance to succeed.
rc* scripts are SUSE specific and are just symlink to initscripts.. redirection of initscripts (either called by /etc/init.d/* or rc*) through systemd is needed so service are properly managed by systemd. I'm not sure to understand what you are suggesting. > rc* scripts are SUSE specific and are just symlink to initscripts.. yes i know > redirection of initscripts (either called by /etc/init.d/* or rc*) through > systemd is needed so service are properly managed by systemd. hmm i player around a little and i see your problem now if the command restarts apache then systemd thinks its dead,... > I'm not sure to understand what you are suggesting. every command unknown to systemd should be passed to the init script in the same way "cd /etc/init.d; ./apache2 configtest" is handled; at least for 12.1. probably with a big fat warning that what the user is trying to do might cause problems and probably with a link to a wiki article or other documentation describing the problems. the problems with virtualbox and vmware(IIRC) are two examples of why this is important. given we know these problems exist ignoring them now is bad for openSuSE as a whole HTH I need to document this to release notes, indeed. One of you, please to provide a draft for the release notes. I could be misreading this, but does this mean that the expected sysvinit compatibility doesn't exist after all? (http://lists.opensuse.org/archive/opensuse-factory/2010-11/msg00552.html) Can't we change the redirection, so it's only called for standard arguments? I guess we could.. patch welcome from bash experts. File to patch : /etc/rc.status (in aaa_base). Standard commands : start stop reload restart try-restart force-reload status carefull with status, because it might not output the same as sysv. I really hope "non standard" commands will not restart services, otherwise, it will create issue with systemd. Created attachment 459150 [details]
patch to not redirect non-standard command to systemd
please test this patch, it should not redirect non standard commands, when used through rc*
adding werner, since he is aaa_base maintainer > maintainer aaa_base bugowner of Base:System/aaa_base -- ro@suse.com *** Bug 721980 has been marked as a duplicate of this bug. *** Here is my propsal; please review: <title>systemd: Supplying Service Start-up Parameters</title> <para> <command>systemctl</command> only supports "standard" parameters (see <ulink url="http://www.freedesktop.org/wiki/Software/systemd/Incompatibilities"/>). </para> <para> You can bypass this limitation by calling the start-up script directly, for example: </para> <screen> cd /etc/init.d ./apache2 <your_parameters> </screen> sounds good; although it might be less needed if we apply the patch to aaa_base. But it is still a good idea to document this "new" behaviour. Rudi, please review the patch request 89594 for factory patch looks fine for me. This is now in the RN (if you do not need it or want it differently, please re-open):
<sect3 id="sec.121.systemd-ctl">
<title>systemd: Supplying Service Start-up Parameters</title>
<para>
<command>systemctl</command> only supports "standard" parameters
(see <ulink
url="http://www.freedesktop.org/wiki/Software/systemd/Incompatibilities"/>).
</para>
<para>
You can bypass this new behavior by calling the start-up script
directly, for example:
</para>
<screen>cd /etc/init.d
./apache2 <your_parameters>
</screen>
</sect3>
Karl, could you add to the releases notes : you can bypass this new behavior by calling the startup script directly, for example : cd /etc/init.d ./apache2 or by enabling environment variable SYSTEMD_NO_WRAP : SYSTEMD_NO_WRAP=1 /etc/init.d/apache2 |
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 systemd makes custom operations of init scripts impossible to use: ------------------------------ christoph-game:~ # rcapache2 Usage: /usr/sbin/rcapache2 <command> <server flags> where <command> is one of: start - start httpd startssl - start httpd with -DSSL stop - stop httpd (sending SIGTERM to parent) try-restart - stop httpd and if this succeeds (i.e. if it was running before), start it again. status - check whether httpd is running restart - stop httpd if running; start httpd restart-graceful - stop httpd gracefully if running; start httpd reload|graceful - do a graceful restart by sending a SIGUSR1, or start if not running stop-graceful - stop httpd (sending SIGWINCH to parent) configtest - do a configuration syntax test extreme-configtest - try to run httpd as nobody (detects more errors by actually loading the configuration, but cannot read SSL certificates) probe - probe for the necessity of a reload, give out the argument which is required for a reload. (by comparing conf files with pidfile timestamp) full-server-status - dump a full status screen; requires lynx or w3m and mod_status enabled server-status - dump a short status screen; requires lynx or w3m and mod_status enabled help - this screen optional server flags are passed through to httpd. ------------------------------------------------------ most of them fail as systemd does not know them, i suppose <server flags> would not reach the apache init script either but haven't tested that. Reproducible: Always Steps to Reproduce: 1. run rcapache2 graceful 2. 3. Actual Results: Unknown operation graceful Expected Results: christoph-game:~ # /tmp/fu-systemd/apache2 graceful Reload httpd2 (graceful restart) done making a symlink in /tmp as per my above sample does provide access to functionality unknown by systemd. systemd must pass any unknown operations down to the original init script + any unknown parameters