Browse code

move the rsyslogd restart

it's not clear why swift start is the place where an rsyslogd start
is happening, we should really only make this change when we actually
change a file on disk.

Also, use rsyslogd's -HUP signal directly instead of the system init
scripts which are typically doing a stop and start, and apparently
racing under some circumstances.

Change-Id: I1b9891313d67b1da2ca2582e532b2536a81f9b25
Closes-Bug: #1262906

Sean Dague authored on 2014/03/20 08:13:20
Showing 1 changed files
... ...
@@ -454,6 +454,9 @@ EOF
454 454
     sudo chown -R ${STACK_USER}:adm ${swift_log_dir}
455 455
     sed "s,%SWIFT_LOGDIR%,${swift_log_dir}," $FILES/swift/rsyslog.conf | sudo \
456 456
         tee /etc/rsyslog.d/10-swift.conf
457
+    # restart syslog to take the changes
458
+    sudo killall -HUP rsyslogd
459
+
457 460
     if is_apache_enabled_service swift; then
458 461
         _config_swift_apache_wsgi
459 462
     fi
... ...
@@ -627,8 +630,6 @@ function install_swiftclient {
627 627
 
628 628
 # start_swift() - Start running processes, including screen
629 629
 function start_swift {
630
-    # (re)start rsyslog
631
-    restart_service rsyslog
632 630
     # (re)start memcached to make sure we have a clean memcache.
633 631
     restart_service memcached
634 632