Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Do not require chronyd to be installed on storage servers #2307

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

johnsonw
Copy link
Contributor

@johnsonw johnsonw commented Oct 6, 2020

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 Reviewable

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]>
@johnsonw johnsonw added the bug label Oct 6, 2020
@johnsonw johnsonw requested a review from a team October 6, 2020 15:22
@johnsonw johnsonw self-assigned this Oct 6, 2020
@johnsonw
Copy link
Contributor Author

johnsonw commented Oct 6, 2020

This show the failure to stop the chronyd service if it is not installed:
image

And this shows that after the patch is applied, the exception is swallowed and the process will continue:
image

except AgentException as e:
t, v, tb = sys.exc_info()

if "Unknown busctl" in str(e):
Copy link
Member

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? 🙂

Copy link
Contributor Author

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.

Copy link
Member

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

@johnsonw johnsonw requested a review from a team October 6, 2020 16:48
if "Unknown busctl" in str(e):
return ""
else:
raise t, v, tb
Copy link
Contributor

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.

Copy link
Member

@jgrund jgrund left a 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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants