Repository navigation
cephadm: handle "systemctl start" failures during deployment better - #60303
Conversation
There was a problem hiding this comment.
this change is going to require updating a whole bunch of unit tests, hence the make check failure
There was a problem hiding this comment.
@adk3798 plz, can you give some context about what the purpose of this variable? form its name it's not clear to me what are we capturing here.
BTW: I can't see where the variable is set to another value.
There was a problem hiding this comment.
it defaults to False in both the _run_cephadm and _run_cephadm_json function signatures. If it's True an exception will be thrown if we get a nonzero rc from a cephadm command we run. With it False, it will return the rc, stdout, and stderr even in the case of a nonzero rc. We need it to not throw the exception in order for us to examine the rc from the call and decide whether it's the case this PR is about that needs special handling.
|
I was just about to review. I will hold off until you say you've updated the tests. |
|
Failures:
Would maybe hold off on merging upgrade related PRs, but everything else should be okay. |
phlogistonjohn
left a comment
There was a problem hiding this comment.
commit msg reporting the existing on as failed -> `reporting the existing one as failed. It took me a moment to figure out was was meant here. Let's save future readers some time.
.... I looked any way
e11fb41 to
092eef1
Compare
|
Failures:
Nothing to block merging |
Previously it was assumed when the deploy command fails whatever daemon we were trying to deploy does not exist on the host. However, in the specific case where deploy fails trying to start the daemon's systemd unit this is not the case. This leads us to both cleanup the keyring for the daemon and also causes us to not trigger a refresh of the daemons on the host which can make cephadm attempt to deploy another daemon instead of just reporting the existing one as failed. To get around this we need to handle that specific failure as a success in the mgr module's deploy workflow so that we refresh the daemons and report the failure as intended. https://tracker.ceph.com/issues/68536 Signed-off-by: Adam King <[email protected]>
092eef1 to
5818305
Compare
|
jenkins test api |
|
jenkins test api |
| call_throws(ctx, ['systemctl', 'start', unit_name]) | ||
| except Exception as e: | ||
| logger.error(f'systemctl start failed for {unit_name}: {str(e)}') | ||
| raise DaemonStartException() |
There was a problem hiding this comment.
could we use the exception msg e when to create DaemonStartException?
There was a problem hiding this comment.
I don't think it's necessary. The mgr will never see the exception contents since we handle this by just doing a sys.exit() with a specific rc. The only difference would maybe be something added to a traceback in the logs, but I think that's not needed since we're logging the issue right before we raise the exception.
|
jenkins test api |
|
Failures:
Dead Jobs:
Results should only block merging for PRs related to iscsi or mgmt-gateqay/oauth2-proxy. Otherwise, run was okay. |
|
jenkins test api |
1 similar comment
|
jenkins test api |
|
Failures:
I wouldn't merge any SMB changes or the new tests off of this run, but otherwise it's okay. |
Previously it was assumed when the deploy command fails whatever daemon we were trying to deploy does not exist on the host. However, in the specific case where deploy fails trying to start the daemon's systemd unit this is not the case. This leads us to both cleanup the keyring for the daemon and also causes us to not trigger a refresh of the daemons on the host which can make cephadm attempt to deploy another daemon instead of just reporting the existing on as failed. To get around this we need to handle that specific failure as a success in the mgr module's deploy workflow so that we refresh the daemons and report the failure as intended.
https://tracker.ceph.com/issues/68536
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e