Skip to content
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

Skip service_resume if already enabled #882

Merged
merged 1 commit into from
Mar 28, 2024
Merged

Conversation

dosaboy
Copy link
Contributor

@dosaboy dosaboy commented Mar 22, 2024

Repeatedly calling service_resume for a service that is already enabled can lead to unintended consequences. This adds a check to only resume a serice if it is not enabled.

Related-Bug: #2058505

Copy link
Contributor

@ajkavanagh ajkavanagh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The unit test(s) should probably be updated/added to to test the new feature.

Repeatedly calling service_enable for a service that
is already enabled can lead to unintended consequences.
Some charms frequently call servie_resume which will
call service('enable') and this adds a check to only
do so of the service is not enabled.

Related-Bug: #2058505
Copy link

@brianphaley brianphaley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Contributor

@arif-ali arif-ali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just tested this through the ovn-chassis charm, and works as expected

Copy link
Contributor

@fnordahl fnordahl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@brianphaley
Copy link

I think the unit test change was added, so this should be good to merge.

@ajkavanagh ajkavanagh merged commit 58ab965 into juju:master Mar 28, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants