-
Notifications
You must be signed in to change notification settings - Fork 54
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
Purge behavior when calling cephadm-purge-cluster.yml
with --limit
#170
Comments
that shouldn't be an issue [1]. By the way, this is what we do in the CI. If you look at the inventory we use here [2], you can see we don't define a host See a job in the CI :
the issue with [1] https://docs.ansible.com/ansible/latest/inventory/implicit_localhost.html#implicit-localhost |
@guits Thanks for the detailed reply. I did some additional testing and the issue may be my fault. I am using a single inventory file for ceph servers and other servers that are not part of the cluster. I am not sure if that is the same as "the issue with hosts: all is when users use the same inventory for multiple environments." or if that is a different issue. When deleting the cluster I tried to limit it to my
This has the unfortunate side effect of skipping any plays that are limited to localhost (edited with a debug message so as not to really delete my cluster):
Without the If the goal is to only support an inventory file dedicated to the ceph cluster I understand, and am happy to close this out / find a workaround on our side. |
localhost
host is not definedcephadm-purge-cluster.yml
with --limit
After a better look at the playbook, what I wanted to avoid with https://github.com/ceph/cephadm-ansible/blob/devel/cephadm-purge-cluster.yml#L56 I think the approach you suggested makes sense in the end. If you want to send a PR... 🙂 |
As some users have inventory files with not just ceph hosts, they uses --limit to target only ceph nodes. Using "hosts: localhost" in playbooks prevent those tasks being executed. Using delegate_to with run_once fixes the issue. Fixes: ceph#170 Signed-off-by: Teoman ONAY <[email protected]>
As some users have inventory files with not just ceph hosts, they uses --limit to target only ceph nodes. Using "hosts: localhost" in playbooks prevent those tasks being executed. Using delegate_to with run_once fixes the issue. Fixes: ceph#170 Signed-off-by: Teoman ONAY <[email protected]>
As some users have inventory files with not just ceph hosts, they uses --limit to target only ceph nodes. Using "hosts: localhost" in playbooks prevent those tasks being executed. Using delegate_to with run_once fixes the issue. Fixes: ceph#170 Signed-off-by: Teoman ONAY <[email protected]>
As some users have inventory files with not just ceph hosts, they uses --limit to target only ceph nodes. Using "hosts: localhost" in playbooks prevent those tasks being executed. Using delegate_to with run_once fixes the issue. Fixes: ceph#170 Signed-off-by: Teoman ONAY <[email protected]>
As some users have inventory files with not just ceph hosts, they uses --limit to target only ceph nodes. Using "hosts: localhost" in playbooks prevent those tasks being executed. Using delegate_to with run_once fixes the issue. Fixes: ceph#170 Signed-off-by: Teoman ONAY <[email protected]>
As some users have inventory files with not just ceph hosts, they uses --limit to target only ceph nodes. Using "hosts: localhost" in playbooks prevent those tasks being executed. Using delegate_to with run_once fixes the issue. Fixes: #170 Signed-off-by: Teoman ONAY <[email protected]> (cherry picked from commit dd49ecc)
As some users have inventory files with not just ceph hosts, they uses --limit to target only ceph nodes. Using "hosts: localhost" in playbooks prevent those tasks being executed. Using delegate_to with run_once fixes the issue. Fixes: #170 Signed-off-by: Teoman ONAY <[email protected]> (cherry picked from commit dd49ecc)
The
cephadm-purge-cluster.yml
pre-purge checks fail in a not-so-good way when one calls the playbook with a--limit
to a subset of the hosts in the inventory (e.g., those hosts that are in the cluster).As an alternative, the plays could have
hosts: all
set and the following added to each task to achieve the same behavior in a compatible way:Otherwise, once sees
skipping: no hosts matched
on the applicable plays. The "confirm whether user really wants to purge the cluster" play even prompts the user to see if they want to purge the cluster, but continues to purge the cluster no matter what they type.If this sounds like an acceptable solution I can make a PR.
The text was updated successfully, but these errors were encountered: