Commit 735250d3 authored by Leigh Stoller's avatar Leigh Stoller

Switch to graceful restart of apache instead of killing it outright, so

that backend processes in flight do not get killed in their tracks. This
might not work right, but elabinelab testing does not tell me much, lets
see how it goes.
parent 3b4626e7
#!/usr/bin/perl -w
#
# Copyright (c) 2011-2016 University of Utah and the Flux Group.
# Copyright (c) 2011-2016, 2018 University of Utah and the Flux Group.
#
# {{{GENIPUBLIC-LICENSE
#
......@@ -120,12 +120,8 @@ if ($?) {
#
# Something whacky is going on; httpd refuses to die!
#
system("$APACHE_START stop") == 0
or fatal("Could not stop apache!");
sleep(2);
system("killall httpd");
system("$APACHE_START start") == 0
or fatal("Could not start apache!");
system("$APACHE_START graceful") == 0
or fatal("Could not gracefully restart apache!");
$UID = $SAVEUID;
}
......
#!/usr/bin/perl -w
#
# Copyright (c) 2008-2013 University of Utah and the Flux Group.
# Copyright (c) 2008-2018 University of Utah and the Flux Group.
#
# {{{GENIPUBLIC-LICENSE
#
......@@ -171,18 +171,11 @@ if ($?) {
system("/bin/mv /tmp/crlbundle.$$ $BUNDLE") == 0
or fatal("Could not copy to $BUNDLE!");
system("$APACHE_START stop") == 0
or fatal("Could not stop apache!");
system("$APACHE_START graceful") == 0
or fatal("Could not gracefully restart apache!");
# Something whacky is going on; httpd refuses to die!
sleep(2);
system("killall httpd");
system("/bin/cp $BUNDLE $WWWBUNDLE") == 0
or fatal("Could not copy to $WWWBUNDLE!");
system("$APACHE_START start") == 0
or fatal("Could not start apache!");
}
# Apache spits out stuff. No errors at this point, nothing to report.
AuditEnd()
......
#!/usr/bin/perl -w
#
# Copyright (c) 2008-2016 University of Utah and the Flux Group.
# Copyright (c) 2008-2016, 2018 University of Utah and the Flux Group.
#
# {{{GENIPUBLIC-LICENSE
#
......@@ -229,7 +229,7 @@ unlink("/tmp/genicrl.bundle.$$")
if (-e "/tmp/genicrl.bundle.$$");
if ($restartapache) {
system("$APACHE_START restart") == 0
system("$APACHE_START graceful") == 0
or fatal("Could not restart apache!");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment