Skip to content

localkube should not use /usr/lib/systemd/system for service unit files #2098

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

Closed
easeway opened this issue Oct 20, 2017 · 2 comments
Closed
Labels
co/none-driver kind/bug Categorizes issue or PR as related to a bug.

Comments

@easeway
Copy link
Contributor

easeway commented Oct 20, 2017

Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

Please provide the following details:

Environment:

Minikube version : v0.22.3 (commit id: 3358402)

  • OS : Ubuntu 17.04
  • VM Driver : none
  • ISO version :
  • Install tools:
  • Others:

What happened:
E1020 10:45:30.305707 13466 start.go:150] Error starting host: Error starting stopped host: mkdir /usr/lib/systemd/system/: permission denied.

What you expected to happen:
On ubuntu, service unit files are under /lib/systemd/system.
The right place to create systemd unit files should be /etc/systems/system which is unified across all systemd based distributions.

How to reproduce it (as minimally and precisely as possible):
minikube start --vm-driver=none

Output of minikube logs (if applicable):

Anything else do we need to know:

./pkg/minikube/constants/constants.go:140:	LocalkubeServicePath = "/usr/lib/systemd/system/localkube.service"
./pkg/drivers/none/none.go:153:	if err := os.MkdirAll("/usr/lib/systemd/system/", os.FileMode(0755)); err != nil {

The constant LocalkubeServicePath should be /etc/systemd/system which is consistent across different distributions.
In none.go, the constants should be used instead of a string literal. Actually, mkdir is not necessary here.

easeway pushed a commit to easeway/minikube that referenced this issue Oct 20, 2017
/usr/lib/systemd/system is not consistent across different distribution
/etc/systemd/system should be used.

See issue: kubernetes#2098
@r2d4 r2d4 added kind/bug Categorizes issue or PR as related to a bug. co/none-driver labels Oct 20, 2017
dlorenc pushed a commit that referenced this issue Oct 20, 2017
/usr/lib/systemd/system is not consistent across different distribution
/etc/systemd/system should be used.

See issue: #2098
@dlorenc
Copy link
Contributor

dlorenc commented Oct 20, 2017

Fixed by #2099

@dlorenc dlorenc closed this as completed Oct 20, 2017
@garykrige
Copy link

Is there a temp fix aside from building from source?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/none-driver kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

4 participants