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:27:39 UTC
[GitHub] [trafficcontrol] rob05c commented on a change in pull request
#4250: Support upgrading or removing Traffic Ops when systemd does not work
rob05c 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_r362368860
##########
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 have some concerns about this in production systems. What would happen if a production upgrade of Traffic Ops fails to stop from the `systemctl stop traffic_ops`?
I'm concerned if an upgrade is scripted, and automation tools log or alarm on a nonzero exit code. Even if it isn't a script, humans might reasonably expect a 0 exit code to mean success.
Besides the exit code, that's going to make this script continue to run, even if `systemctl stop` fails. What happens when the script keeps going, while TO is running? Does it succeed and keep running the old TO? Does it fail elsewhere in an easy to debug way? Is whatever happens deterministic?
It might be totally fine, I'd just like to be sure before we do this where it'll be installed in Prod. Especially since Mojo has a bad habit of refusing to die when told to.
If the goal is primarily to fix #4249 I think we can probably just change the CiaB Dockerfiles to `FROM centos/systemd`; IMO we should probably do that anyway. It's valuable to make the CiaB emulate Prod as closely as possible, for testing.
----------------------------------------------------------------
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