mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-05 00:15:44 +00:00
Merge pull request #29103 from Luap99/wsl-config-mount
machine/wsl: fix config mount logic
This commit is contained in:
commit
4d5435f47e
2 changed files with 16 additions and 5 deletions
|
|
@ -480,6 +480,15 @@ var _ = Describe("podman machine init", func() {
|
|||
Expect(sshSession2).To(Exit(0))
|
||||
output := strings.TrimSpace(sshSession2.outputToString())
|
||||
Expect(output).To(Equal("/run/podman/podman.sock"))
|
||||
|
||||
// Ensure we can at least connect to the rootful podman socket and that it is actually a rootful one by checking the paths
|
||||
bm := basicMachine{}
|
||||
info, err := mb.setCmd(bm.withPodmanCommand([]string{"info"})).run()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(info).To(Exit(0))
|
||||
Expect(info.outputToString()).To(ContainSubstring("/run/podman/podman.sock"))
|
||||
Expect(info.outputToString()).To(ContainSubstring("serviceIsRemote: true"))
|
||||
Expect(info.outputToString()).To(ContainSubstring("/var/lib/containers"))
|
||||
})
|
||||
|
||||
It("init should cleanup on failure", func() {
|
||||
|
|
|
|||
|
|
@ -98,7 +98,8 @@ LoadCredential=
|
|||
const bindMountConfigDirSystemService = `
|
||||
[Unit]
|
||||
Description=Bind mount for config directory
|
||||
Before=podman.socket
|
||||
Before=multi-user.target
|
||||
After=local-fs.target
|
||||
|
||||
[Service]
|
||||
RemainAfterExit=true
|
||||
|
|
@ -157,12 +158,13 @@ const (
|
|||
podmanSocketDropin = "podman.socket.d"
|
||||
podmanSocketDropinPath = sysSystemdPath + "/" + podmanSocketDropin
|
||||
|
||||
configBindSysUnitName = "podman-mnt-config.service"
|
||||
configBindSysUnitPath = sysSystemdPath + "/" + configBindSysUnitName
|
||||
configBindSysUnitWant = sysSystemdWants + "/" + configBindSysUnitName
|
||||
configBindSysUnitName = "podman-mnt-config.service"
|
||||
configBindSysUnitPath = sysSystemdPath + "/" + configBindSysUnitName
|
||||
configBindSysUnitWantsDirectory = sysSystemdPath + "/local-fs.target.wants"
|
||||
configBindSysUnitWant = configBindSysUnitWantsDirectory + "/" + configBindSysUnitName
|
||||
)
|
||||
|
||||
const configBindServices = "mkdir -p " + userSystemdWants + " " + sysSystemdWants + " " + podmanSocketDropinPath + "\n" +
|
||||
const configBindServices = "mkdir -p " + userSystemdWants + " " + sysSystemdWants + " " + podmanSocketDropinPath + " " + configBindSysUnitWantsDirectory + "\n" +
|
||||
"ln -fs " + bindUserUnitPath + " " + bindUserUnitWant + "\n" +
|
||||
"ln -fs " + bindSysUnitPath + " " + bindSysUnitWant + "\n" +
|
||||
"ln -fs " + configBindSysUnitPath + " " + configBindSysUnitWant + "\n"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue