Leave the details of service management to the distro.#1014
Conversation
518d8b8 to
fbe74bf
Compare
86a4812 to
db4d34f
Compare
Various modules restart services and they all have logic to try and detect if they are running on a system that needs 'systemctl' or 'service', and then have code to decide which order the arguments need to be etc. On top of that, not all modules do this in the same way. The duplication and different approaches are not ideal but this also makes it hard to add support for a new distribution that does not use either 'systemctl' or 'service'. This change adds a new manage_service() method to the distro class and updates several modules to use it.
|
Hey @citrus-it , I noticed a lot of recent pushes to this branch. Is it ready for review yet, or should I hold off for a while longer? If it isn't ready for review, it'd be best to set the |
Hi, sorry about that, I had a little trouble getting the integration tests to all pass. CI is clean now so it's ready for review. |
TheRealFalcon
left a comment
There was a problem hiding this comment.
Thanks! This is a great refactor overall.
I left a few inline comments, but nothing major.
|
Hello! Thank you for this proposed change to cloud-init. This pull request is now marked as stale as it has not seen any activity in 14 days. If no activity occurs within the next 7 days, this pull request will automatically close. If you are waiting for code review and you are seeing this message, apologies! Please reply, tagging mitechie, and he will ensure that someone takes a look soon. (If the pull request is closed and you would like to continue working on it, please do tag mitechie to reopen it.) |
|
Sorry for the delay on this, I'll go through the comments and update the PR at the weekend. |
|
@citrus-it , are you still working on this? Would you like this re-opened? |
Yes please, sorry again for the delay, I'll push an updated commit today. |
|
@citrus-it , Github won't let me reopen it. Feel free to create a new PR with a link to this one. |
Proposed Commit Message
Checklist: