Bug 2110983
Summary: | [orchestrator] : orch host drain : attempt to drain non existing host must fail | ||
---|---|---|---|
Product: | [Red Hat Storage] Red Hat Ceph Storage | Reporter: | Vasishta <vashastr> |
Component: | Cephadm | Assignee: | Shweta Bhosale <shbhosal> |
Status: | CLOSED ERRATA | QA Contact: | Sayalee <saraut> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 5.2 | CC: | adking, cephqe-warriors, mgowri, mobisht, saraut, shbhosal, tserlin |
Target Milestone: | --- | ||
Target Release: | 8.1 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | ceph-19.2.1-33.el9cp | Doc Type: | Bug Fix |
Doc Text: |
Cause: 'orch host drain' command did not have check for host validation.
Consequence: It is confusing for user and user has to check logs to know what went wrong.
Fix: Added host exists check for 'orch host drain' command.
Result: Now user will get error if passed host does not exists.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2025-06-26 12:11:46 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: Red Hat Ceph Storage 8.1 security, bug fix, and enhancement updates), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2025:9775 |
Description of problem: Currently attempt to drain non-existing host returns 0, It creates confusion. Commands to return 1 (fail) when an operations is tried on non-existing node. User will have to go to mgr logs to determine what went wrong as stdout doesn't highlight user error. Version-Release number of selected component (if applicable): 16.2.8-80.el8cp How reproducible: 3/3 Steps to Reproduce: 1. Configure cluster. 2. Try to drain a non existing host. Actual results: # sudo ceph orch host drain non_existing_host --force; echo $? Scheduled to remove the following daemons from host 'non_existing_host' type id -------------------- --------------- 0 Expected results: Command must error out highlighting user to check his hostname Additional info: In mgr logs we get to see >> [cephadm ERROR orchestrator._interface] host magna006 does not exist In my initial attempt I tried hort name of the host but cluster knew that host by its fqdn.