-
Notifications
You must be signed in to change notification settings - Fork 37
Do not require chronyd to be installed on storage servers #2307
base: master
Are you sure you want to change the base?
Conversation
When installing a minimum build of centos it will not include chronyd in the installation. This currently prevents users from being able to add storage servers. Update the disable chronyd step to be smarter such that the command does not error if it is not installed. Signed-off-by: johnsonw <[email protected]>
except AgentException as e: | ||
t, v, tb = sys.exc_info() | ||
|
||
if "Unknown busctl" in str(e): |
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.
Is there a more clear way to say no such unit? 🙂
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.
Yeah, I agree this is frustrating and ugly. If you know of a better way to check please let me know.
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.
Instead of trying to stop and handling the error. We should just check the state first and then stop iff it's already installed / running
if "Unknown busctl" in str(e): | ||
return "" | ||
else: | ||
raise t, v, tb |
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 explicitly raise with values? I thought just raise
would re-raise last exception.
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.
This patch doesn't address all the places we assume chrony is installed. Specifically the rust ntp daemon plugin.
When installing a minimum build of centos it will not include chronyd in
the installation. This currently prevents users from being able to add
storage servers. Update the disable chronyd step to be smarter such that
the command does not error if it is not installed.
Signed-off-by: johnsonw [email protected]
This change is