You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2020/01/02 04:43:36 UTC

[GitHub] [trafficcontrol] zrhoffman commented on a change in pull request #4250: Support upgrading or removing Traffic Ops when systemd does not work

zrhoffman commented on a change in pull request #4250: Support upgrading or removing Traffic Ops when systemd does not work
URL: https://github.com/apache/trafficcontrol/pull/4250#discussion_r362370030
 
 

 ##########
 File path: traffic_ops/build/traffic_ops.spec
 ##########
 @@ -131,7 +131,7 @@ Built: %(date) by %{getenv: USER}
 
     # upgrade
     if [ "$1" == "2" ]; then
-	systemctl stop traffic_ops
+        systemctl stop traffic_ops || true # Don't exit with an error if we are in an unprivileged Docker container and can't use systemctl
 
 Review comment:
   I understand concerns about just silently exiting if the service itself fails to stop. What do you think about skipping that attempt to stop the service if systemd itself does not seem operational? E.g.,
   
   ```shell
   if [ "$1" == "2" ] && systemctl list-jobs; then
       systemctl stop traffic_ops
   fi
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services