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

fix service handling (should be compatible with most Linux distributi… #38

Merged
merged 1 commit into from
May 17, 2016

Conversation

hoonetorg
Copy link

…ons nowadays)

@hoonetorg
Copy link
Author

This works also with systemd on el7 distries.
service mysql start/stop will be redirected to systemctl start/stop mysql.
should be the same for Debian, Ubuntu 16.04+

@deviantony
Copy link
Owner

Thanks for the PR but I'm not sure if I should merge it because I think it can cause issues on older distributions.

@hoonetorg
Copy link
Author

hoonetorg commented May 16, 2016

I understand your concerns about backward compatibility.
On the other hand all major distributions switched to systemd now and there restoring backups with pyxtrabackup must be broken, am I wrong?
The "service" command can be used on sysv and systemd as I said.
A colleague told me a Debian Lenny would not have a service command (I did not verify :) ).

Probably it's better to

  • check, which init system is used and create the appropriate command then or
  • fail restoration if a mysql server process runs(then the user must manually stop mysql process before restoration) -> this is then also not backward compatible, hmm

For me it is fixed (I compiled an rpm for el7 with the fix and put it in a repo :) )

@deviantony
Copy link
Owner

I've started to debate about this in #32

And from that comment #32 (comment)

I do not want to add more code to manage service handling depending on the system.

In order to work with the majority of systems, I think that it would be better to let the user manage the service by himself. I'd accept a PR to remove the service management from the tool and let the user manage the service with an updated procedure.

In the meantime, I'll merge your PR as, as you said, most new distros should support it.

@deviantony deviantony merged commit 28a110e into deviantony:develop May 17, 2016
@deviantony
Copy link
Owner

Released and pushed to pypi.

@hoonetorg
Copy link
Author

👍

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.

2 participants