bhouse-nexthop commented on PR #14741: URL: https://github.com/apache/cloudstack/pull/14741#issuecomment-7266462191
Tested on a KVM lab running a main (24.0) build that includes this change. Three KVM hosts, `kvm.ssh.to.agent=true`. The PR targets 4.22; `cancelMaintenance` is the same on both branches apart from this change. Setup: on one host I created a non-root user. Its `authorized_keys` held the management server's public key, and sudo allowed it only `/usr/sbin/service cloudstack-agent restart` without a password. I set the host's stored username to that user in `host_details` and restored it afterwards. Without sudo, the user's `service cloudstack-agent restart` fails (exit 1), which is the command sent before this change. Steps: `prepareHostForMaintenance` until Maintenance, stop `cloudstack-agent` on the host until it was Disconnected, then `cancelHostMaintenance`. Result: all checks passed. | Check | Result | |---|---| | `cancelHostMaintenance` | succeeded | | Host afterwards | Up and Enabled, `cloudstack-agent` active | | Host's journal | `<user> : PWD=/home/<user> ; USER=root ; COMMAND=/usr/sbin/service cloudstack-agent restart` | Not tested: a host actually added with a non-root user (the stored username was changed instead), and password authentication. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
