Actions
Bug #57369
closedcephadm: do not use "sudo" when checking host is reachable if user is root
% Done:
0%
Source:
Tags:
backport_processed
Backport:
quincy
Regression:
No
Severity:
3 - minor
Reviewed:
Description
For https://tracker.ceph.com/issues/55641 we made sure to not use sudo before all of our commands if the user is root. We also, to solve https://tracker.ceph.com/issues/51733, added a check that runs "sudo true" with a timeout first to make sure the host is online. The patch for the sudo issue missed this additional check command that we run. We now have
try: r = await conn.run('sudo true', check=True, timeout=5) r = await conn.run(cmd, input=stdin)
where the cmd str only includes sudo if the user is not root
sudo_prefix = "sudo " if self.mgr.ssh_user != 'root' else "" cmd = sudo_prefix + " ".join(quote(x) for x in cmd)
The additional "sudo true" should also only include sudo if user is not root.
Updated by Adam King over 1 year ago
- Project changed from Ceph to Orchestrator
- Pull request ID set to 47898
Updated by Adam King over 1 year ago
- Status changed from In Progress to Pending Backport
- Backport set to quincy
Updated by Backport Bot over 1 year ago
- Copied to Backport #57521: quincy: cephadm: do not use "sudo" when checking host is reachable if user is root added
Updated by Adam King over 1 year ago
- Status changed from Pending Backport to Resolved
Actions