-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
WIP: Add support for older sysv init as well #8572
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afbjorklund The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Not everything is Systemd or OpenRC yet
4767c96
to
a73823f
Compare
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.
since we dont have integration test for this, is it possible to test this PR in systemd and init.d distro ot make sure we dont break the current cases? and put the output in the description ?
the cloud shell users need this for none driver
the idea was that there should be no changes for users of systemd and openrc, i.e. all the currently covered sysinit
what init system does cloud shell use ? I suppose we could do some even more basic fallback, if both redhat and debian fail redhat: debian: Also, the Enable seems to be totally unimplemented for OpenRC at the moment ? And we are hard-coding systemctl still: pkg/minikube/cruntime/docker.go: rr, err := runner.RunCmd(exec.Command("sudo", "systemctl", "cat", "docker.service")) |
Also note that they are pretty identical (openrc.go and sysv.go), we mostly need to replace https://wiki.alpinelinux.org/wiki/Writing_Init_Scripts We're assuming here that the standard
https://salsa.debian.org/debian/init-system-helpers/-/blob/master/script/service Not to be confused with the As used in for instance Alpine, and some other distributions: / # file /sbin/service
/sbin/service: symbolic link to /sbin/rc-service
/ # file /sbin/rc-service
/sbin/rc-service: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, stripped |
Not everything is Systemd or OpenRC yet
Previous code was assuming that everything non-systemd is openrc, which failed on some systems.
So look for OpenRC more explicitly, and add some generic fallback for the older SysV-like systems.
https://en.wikipedia.org/wiki/OpenRC
https://en.wikipedia.org/wiki/Init#SYSV
All supported minikube distributions are using Systemd, so this is mostly for the "none" driver...
Should test this on some alternative distributions, such as older Ubuntu/CentOS or maybe Devuan.
Ubuntu 14.04
CentOS 6
For #2704 and #6954