Merge ~troyanov/maas:fix-2056222 into maas:master
Proposed by
Anton Troyanov
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Anton Troyanov | ||||||||
Approved revision: | 260f1d00694a077deb4a417a263c059c2359adf0 | ||||||||
Merge reported by: | MAAS Lander | ||||||||
Merged at revision: | not available | ||||||||
Proposed branch: | ~troyanov/maas:fix-2056222 | ||||||||
Merge into: | maas:master | ||||||||
Diff against target: |
234 lines (+19/-24) 13 files modified
debian/maas-agent.dirs (+0/-1) debian/maas-agent.postinst (+1/-3) debian/maas-common.dirs (+0/-1) debian/maas-dhcp.apparmor (+5/-5) debian/maas-dhcp.maas-dhcpd.service (+2/-2) debian/maas-dhcp.maas-dhcpd6.service (+2/-2) debian/maas-dhcp.postinst (+0/-1) debian/maas-dhcp.postrm (+1/-1) debian/maas-proxy.dirs (+0/-1) debian/maas-rack-controller.maas-rackd.service (+1/-0) src/maasagent/cmd/maas-agent/main.go (+3/-3) src/maasagent/cmd/maas-agent/main_test.go (+3/-3) src/maasagent/internal/httpproxy/service.go (+1/-1) |
||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
MAAS Lander | Approve | ||
Björn Tillenius | Approve | ||
Review via email: mp+462487@code.launchpad.net |
Commit message
fix: /run/maas should be owned by maas
`/run` is usually a tmpfs mount, and it is not persistent across reboots, so
`/run/maas` should not be created using .dirs, .install or .postinst scripts.
MAAS has various services that store their directories and files under
`/run/maas`, but because some services are run as root (e.g. dhcp), this leads
to ownership issues when `mkdir -p` is used (e.g. DHCP will create
`/run/maas/dhcp`)
In order to solve ownership issue, this commit changes DHCP service directory
to `/run/maas-dhcp` while keeping `/run/maas` only for files related to MAAS
itself (not external 3rd party services)
Resolves LP:2056222
Resolves LP:2056225
To post a comment you must log in.
After this patch:
ubuntu@ maas-deb: /root$ sudo systemctl status maas-setup system/ maas-setup. service; enabled; vendor preset: enabled) /bin/mkdir /run/maas (code=exited, status=0/SUCCESS) /usr/bin/ chown maas:maas /run/maas (code=exited, status=0/SUCCESS)
● maas-setup.service - MAAS setup helper
Loaded: loaded (/lib/systemd/
Active: active (exited) since Fri 2024-03-15 12:32:07 UTC; 35s ago
Process: 254 ExecStart=
Process: 287 ExecStart=
Main PID: 287 (code=exited, status=0/SUCCESS)
CPU: 3ms
Mar 15 12:32:07 maas-deb systemd[1]: Starting MAAS setup helper... maas-deb: /root$ ls -al /run/maas
Mar 15 12:32:07 maas-deb systemd[1]: Finished MAAS setup helper.
ubuntu@
total 0
drwxr-xr-x 4 maas maas 80 Mar 15 12:32 .
drwxr-xr-x 28 root root 840 Mar 15 12:32 ..
drwxr-xr-x 2 maas maas 60 Mar 15 12:32 agent
drwxr-xr-x 2 root root 60 Mar 15 12:32 dhcp