-
Notifications
You must be signed in to change notification settings - Fork 83
Install/uninstall system-controller container #2148
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
base: main
Are you sure you want to change the base?
Install/uninstall system-controller container #2148
Conversation
…per system install/uninstall commands
… the actual container name
ba25364
to
09983eb
Compare
…by the CLI away from the system-controller code
…of the selected platform
internal/nonkube/bootstrap/controller/stopsh-container.template
Outdated
Show resolved
Hide resolved
…ost. modify the start script to use the environment variables needed for the container
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 believe this is the last change needed @nluaces.
Other than that, it is working great to me with docker, podman using both rootless and rootful modes.
@@ -130,7 +130,7 @@ func (s *systemdServiceInfo) GetServiceFile() string { | |||
if s.GetUid() == 0 { | |||
return path.Join(s.rootSystemdBasePath, s.GetServiceName()) | |||
} | |||
return path.Join(api.GetSystemConfigHome(), "systemd/user", s.GetServiceName()) | |||
return path.Join(api.GetHostDataHome(), "systemd/user", s.GetServiceName()) |
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 believe that this function should return something similar to what internal/nonkube/common/systemd.go
returns on rootless cases. Example:
if s.GetUid() == 0 {
return path.Join(s.rootSystemdBasePath, s.GetServiceName())
}
return path.Join(api.GetConfigHome(), "systemd/user", s.GetServiceName())
As the intention is to get the config home to place the .service
file.
And this won't be useful if the install
command itself is running in a container.
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.
Now it is getting the GetConfigHome value instead. Thanks!
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.
Along with what you have done, I believe you need to get rid of the if block api.IsRunningInContainer
,
as it will only be used when running outside of a container anyway.
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.
done
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.
LGTM
Resolves #2149