Repository navigation
fix: Stop waagent from pulling in sshd.service on ACL - #73
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved service executable, package ownership, sysext installation, and package integration issues remain.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds an ACL-specific WALinuxAgent package overlay to prevent sshd.service from being activated when SSH is disabled.
Changes:
- Adds ACL WALinuxAgent configuration and systemd overrides.
- Registers the package and source signatures.
- Removes the SSH daemon dependency from the custom unit.
File summaries
| File | Description |
|---|---|
acl/SPECS/walinuxagent-acl-config/walinuxagent-acl-config.spec |
Defines the ACL configuration RPM. |
acl/SPECS/walinuxagent-acl-config/walinuxagent-acl-config.signatures.json |
Provides source signatures. |
acl/SPECS/walinuxagent-acl-config/waagent.service |
Provides the modified WALinuxAgent systemd unit. |
acl/SPECS/walinuxagent-acl-config/waagent.conf |
Supplies ACL-specific agent settings. |
acl/SPECS/walinuxagent-acl-config/10-waagent-sysext.conf |
Configures WALinuxAgent startup ordering. |
acl/packages.yaml |
Includes the package in ACL builds. |
Review details
Suppressed comments (1)
acl/SPECS/walinuxagent-acl-config/walinuxagent-acl-config.spec:36
oem-azureis built as a sysext, and the sysext builder removes every directory except/usrbefore creating the image. Installing this drop-in under%{_sysconfdir}means it is discarded, so this package does not actually ship theUpholds=edge it documents; the currently bundled WALinuxAgent copy happens to mask that omission. Install it under%{_unitdir}/multi-user.target.d(as the upstream WALinuxAgent unit does) or arrange for this file to be installed in the base layer.
install -Dm 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/systemd/system/multi-user.target.d/10-waagent-sysext.conf
- Files reviewed: 6/6 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Could the SSH dependency removal use the existing OEM RPM mangle step, which already edits |
|
Could we add a regression check for the disabled-SSH reboot case? Checking that the final post-mangle |
The guard is that packaging-drift check, the build fails if post-mangle waagent.service still wants sshd.service or lost sshd-keygen.service. Will add the reboot-on-Azure test too, would put it in the kola suite. Will take it later. |
moved it to the OEM mangle step as a targeted with guards. Removed the package, but eventually will it be better to push it upstream, since its only config package with our control on it. |
48347ec to
4e98812
Compare
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved blocking issues were identified.
0 open findings
1 resolved since last review
🧠 Review effort: Lite
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.


Summary
fix: Stop waagent from pulling in sshd.service on ACL
Change Log
In ACL nodes where AgentBaker turns SSH off, SSH came back after a reboot.
ACL uses socket-activated SSH, but waagent.service still listed the old-style daemon as a dependency:
Normally that line is inert, sshd.socket is enabled and declares Conflicts=sshd.service, and since the socket is pulled in strongly by sockets.target while waagent only wants the service, systemd drops the service job. But once AgentBaker disables sshd.socket, the conflict is gone, so on the next boot waagent starts sshd.service and SSH is back on a node that's meant to have it off.
This adds walinuxagent-acl-config as a local override package with sshd.service removed from Wants=.
Nothing else changes: waagent doesn't otherwise touch SSH on ACL (AclOSUtil.restart_ssh_service() and conf_sshd() are both no-ops), and normal nodes are unaffected since sshd.socket serves SSH on its own.
Type of Change
Does this affect the image build?
Associated Issues
https://dev.azure.com/mariner-org/ACL/_workitems/edit/22659
Test Methodology
https://dev.azure.com/msazure/CloudNativeCompute/_build/results?buildId=180699839&view=results
Merge Checklist
All applicable boxes should be checked before merging