Project

General

Profile

Actions

Bug #55641

closed

ceph orch commands try to sudo even as root user

Added by Voja Molani almost 2 years ago. Updated almost 2 years ago.

Status:
Resolved
Priority:
Normal
Category:
orchestrator
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
quincy
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Several (all?) ceph orch commands try to sudo even though the current user is already root.

This undesirable and illogical functionality forces all cephadm-managed hosts to have a configuration that is at least on EL7 non-standard with sudoers including the root user; which is even more inconvenient if sudoers is managed via SSSD (since SSSD does not control the root user).

ceph orch and cephadm should not try to sudo if the current user is already root or root user is used for SSH to other cephadm-managed hosts.

Example problem:

cephadm shell -- ceph orch host maintenance enter ceph01.example.com

Inferring fsid 000[...]
Inferring config /var/lib/ceph/000[...]/mon.ceph01.example.com/config
Using ceph image with id '123[...]' and tag 'latest' created on 2022-05-05 11:55:33 -0600 -06
registry.example.com/ceph@sha256:724288c0087fa759d2e6d35636f1e2acef07e25655212844456aeee320faf068
Error EINVAL: Command ['which', 'python3'] failed. root is not in the sudoers file.  This incident will be reported.
Actions #1

Updated by Redouane Kachach Elhichou almost 2 years ago

  • Status changed from New to Fix Under Review
  • Assignee set to Redouane Kachach Elhichou
  • Pull request ID set to 46303
Actions #2

Updated by Redouane Kachach Elhichou almost 2 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #3

Updated by Redouane Kachach Elhichou almost 2 years ago

  • Backport set to quincy
Actions #4

Updated by Redouane Kachach Elhichou almost 2 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF