Bug 2928 - httpd startup while httpd-perl running may lead to confusion
Summary: httpd startup while httpd-perl running may lead to confusion
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: apache (show other bugs)
Version: unstable
Hardware: all Linux
: P2 normal
Assignee: Alexander Bokovoy
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-02 17:51 MSD by Michael Shigorin
Modified: 2005-08-30 02:28 MSD (History)
13 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Shigorin 2003-09-02 17:51:17 MSD
if httpd-perl starts by itself, it binds to :80;
subsequent attempt to start vanilla httpd will tell us "OK" but not start it.

well httpd-perl *will* serve the requests, but the message is confusing:
"service httpd status" will tell it's down, and /etc/httpd/conf/httpd.conf
changes won't do any difference.

should we check httpd-perl running in /etc/initd.d/httpd::start() ?
should we then do something to httpd-perl and restart it after httpd start?
or notify the administrator and fail?
Comment 1 Michael Shigorin 2003-09-03 15:23:00 MSD
done like this:

start()
{
        if [ "$1" != "again" ]; then
                if status --pidfile "$PERLPIDFILE" --expect-user root \
                          --expect-user root -- httpd-perl >&/dev/null; then
                        echo "Warning: httpd-perl is already running, check
'service httpd-perl extendedstatus'"
                        passed "httpd-perl already running"
                fi
        fi
        start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" \
                --expect-user root --name libhttpd.ep -- httpd
        RETVAL=$?
        return $RETVAL
}

stop()
{       
        stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" \
                --expect-user root --name libhttpd.ep -- httpd
        if [ "$1" != "nocheck" -a -f "$PERLPIDFILE" ]; then                    
                echo "Warning: httpd-perl is running, check 'service httpd-perl
extendedstatus'"
                passed "httpd-perl already running"
        fi
        RETVAL=$?
        return $RETVAL
}

restart()
{       
        stop nocheck
        conftest || exit $?
        start again
}

First implementation (involving e.g. httpd-perl stop when httpd is stopped and
so on) is now considered as too non-modifiable by local administrator who can
e.g. port-separate the instances and thus not need the chain restarts.
Comment 2 Michael Shigorin 2003-09-04 15:27:46 MSD
* Wed Sep 03 2003 Michael Shigorin <mike@altlinux.ru> 1.3.28rusPL30.18-alt2
- httpd.init.Sisyphus now checks for some situations involving httpd-perl
  when silent breakage could occur and issues warnings (#2928)
Comment 3 Michael Shigorin 2005-08-24 23:00:38 MSD
rolled back in 1.3.33-alt3 (along with something like a fix, see #4994)
Comment 4 Michael Shigorin 2005-08-30 02:19:48 MSD
closing
Comment 5 Michael Shigorin 2005-08-30 02:28:40 MSD
closing