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
restore: restart/reload gssproxy after restore #748
Conversation
So that gssproxy picks up new configuration and therefore related usages like authentication of CLI against server works https://pagure.io/freeipa/issue/6902
|
Obsoletes PR #738 |
| def restart(self, instance_name="", capture_output=True, wait=True): | ||
| ipautil.run([paths.SYSTEMCTL, "restart", | ||
| self.service_instance(instance_name)], | ||
| def _restart_base(self, instance_name, operation, capture_output=True, |
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.
I'd either set operation="restart" as default or rename the method to something more descriptive.
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.
I think it's better to pass explicit operation to the function to prevent surprise behavior. The public functions are then more readable.
Feel free to suggest better name for the base function.
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.
It was meant as a base class for: "reload", "restart", "try-restart", "reload-or-restart" and "try-reload-or-restart". The name could be reload_restart_base, but given that it is private/protect function then it can be renamed at any time in the future without any trouble when new methods are introduced as needed..
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.
The method as is could be used for any systemctl command and I think the name should reflect that.
How about _systemctl_exec or _systemctl_command?
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.
Nevermind, since the method also waits for open ports, the name shouldn't suggest it just executes a systemctl command.
| def restart(self, instance_name="", capture_output=True, wait=True): | ||
| ipautil.run([paths.SYSTEMCTL, "restart", | ||
| self.service_instance(instance_name)], | ||
| def _restart_base(self, instance_name, operation, capture_output=True, |
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.
Nevermind, since the method also waits for open ports, the name shouldn't suggest it just executes a systemctl command.
|
How is this patch going to work for Debian? Shouldn't we also implement |
|
Should work: so it's then I.e. it is not |
|
Ok, everything looks good then. |
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.
Late to the party, but I'm much happier with this approach, thanks!
So that gssproxy picks up new configuration and therefore related
usages like authentication of CLI against server works
https://pagure.io/freeipa/issue/6902