Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mgr/cephadm: fix placement with label and host pattern #55587

Merged
merged 1 commit into from Mar 4, 2024

Conversation

adk3798
Copy link
Contributor

@adk3798 adk3798 commented Feb 14, 2024

Previously, when both the label and host pattern were provided, only the label was actually used for the placement

Fixes: https://tracker.ceph.com/issues/64428


With this patch

[ceph: root@vm-00 /]# ceph orch host ls
HOST   ADDR             LABELS  STATUS  
vm-00  192.168.122.7    _admin          
vm-01  192.168.122.171  foo             
vm-02  192.168.122.147  foo             
3 hosts in cluster
[ceph: root@vm-00 /]# ceph orch host ls --host-pattern vm-0[0-1]
HOST   ADDR             LABELS  STATUS  
vm-00  192.168.122.7    _admin          
vm-01  192.168.122.171  foo             
2 hosts in cluster whose hostname matched vm-0[0-1]
[ceph: root@vm-00 /]# 
[ceph: root@vm-00 /]# ceph orch host ls --label foo             
HOST   ADDR             LABELS  STATUS  
vm-01  192.168.122.171  foo             
vm-02  192.168.122.147  foo             
2 hosts in cluster who had label foo
[ceph: root@vm-00 /]# 
[ceph: root@vm-00 /]# ceph orch host ls --host-pattern vm-0[0-1] --label foo
HOST   ADDR             LABELS  STATUS  
vm-01  192.168.122.171  foo             
1 hosts in cluster who had label foo whose hostname matched vm-0[0-1]

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

Copy link
Contributor

@phlogistonjohn phlogistonjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK to me - the code's a bit dense for me, someone who's not already familiar with it. The new test does make me more confident in the change!

@adk3798
Copy link
Contributor Author

adk3798 commented Feb 28, 2024

https://pulpito.ceph.com/adking-2024-02-27_05:08:20-orch:cephadm-wip-adk-testing-2024-02-26-1600-distro-default-smithi/

not going to go over the failures in the regular detail as we're still cleaning up the in cluster log stuff, but it was mostly just things we still need to add to ignorelists and the mds_upgrade_sequence test having issues. Only test that failed due to PRs in the run was https://pulpito.ceph.com/adking-2024-02-27_05:08:20-orch:cephadm-wip-adk-testing-2024-02-26-1600-distro-default-smithi/7574464 so we can't merge the PRs making changes to mgr/nfs but everything else seems to be okay.

@adk3798
Copy link
Contributor Author

adk3798 commented Feb 28, 2024

jenkins test make check

2 similar comments
@adk3798
Copy link
Contributor Author

adk3798 commented Feb 28, 2024

jenkins test make check

@adk3798
Copy link
Contributor Author

adk3798 commented Mar 1, 2024

jenkins test make check

Previously, when both the label and host pattern were
provided, only the label was actually used for the placement

Fixes: https://tracker.ceph.com/issues/64428

Signed-off-by: Adam King <adking@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants