-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
USHIFT-2992: Image builder cleanup: don't stop osbuild-composer.socket #3271
USHIFT-2992: Image builder cleanup: don't stop osbuild-composer.socket #3271
Conversation
@pmtk: This pull request references USHIFT-2992 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.16.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
for n in $(seq 100) ; do | ||
worker=osbuild-worker@${n}.service | ||
if sudo systemctl status "${worker}" &>/dev/null ; then | ||
sudo systemctl stop --now "osbuild-worker@${n}.service" | ||
sudo systemctl stop "osbuild-worker@${n}.service" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did we remove --now
? Does it have no effect during stop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--now
is only meaningful for enable
and disable
and results in immediate start (enable) and stop (disable)
else | ||
break | ||
fi | ||
done | ||
sudo systemctl stop osbuild-composer.service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a comment about stopping osbuild-composer.socket here?
fi | ||
done | ||
sudo systemctl start osbuild-worker@1.service | ||
sudo systemctl start osbuild-composer.service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the start order be inverted here as we're first stopping workers now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I found that we don't even need to start composer. Thanks to the socket, starting workers will cause composer to start but left it just in case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a comment about this?
8769dbf
to
821218c
Compare
…failing Disabling socket can cause composer to fail the shutdown and result in multiple restarts that fail and block later start (at the end of the script). Instead, stop workers first to keep composer from reactivating via socket, then stop the composer.
821218c
to
f5f43f9
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ggiguash, pmtk The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@pmtk: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Disabling socket can cause composer to fail the shutdown and result in multiple restarts that fail and block later start (at the end of the script).
Instead, stop workers first to keep composer from reactivating via socket, then stop the composer.