Bug 1354700 - [ceph-ansible] : purge-cluster is unable to purge if 'mon_group_name' and 'osd_group_name' is changed while creation
Summary: [ceph-ansible] : purge-cluster is unable to purge if 'mon_group_name' and 'os...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Ceph-Ansible
Version: 3.0
Hardware: x86_64
OS: Linux
low
low
Target Milestone: z1
: 3.3
Assignee: Andrew Schoen
QA Contact: Vasishta
URL:
Whiteboard:
Depends On: 1509201
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-12 00:39 UTC by Rachana Patel
Modified: 2020-02-03 04:25 UTC (History)
11 users (show)

Fixed In Version: RHEL: ceph-ansible-2.3.0-0.1.rc5.el7cp Ubuntu: ceph-ansible_3.0.0~rc3-2redhat1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-03 04:25:00 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ceph ceph-ansible pull 1349 0 'None' closed purge-cluster: do not set group name vars at playbook level 2020-02-03 04:23:59 UTC

Description Rachana Patel 2016-07-12 00:39:32 UTC
Description of problem:
=======================
purge-cluster.yml do not show any failures but do not purge cluster if mon and osd group name is different than 'mons' and 'osds' as those names are hardcoded in purge-cluster.yml


Version-Release number of selected component (if applicable):
==============================================================
ceph-ansible-1.0.5-23.el7scon.noarch
ceph-installer-1.0.12-3.el7scon.noarch
ceph-common-10.2.2-9.el7cp.x86_64

How reproducible:
==================
always


Steps to Reproduce:
===================
1. make change in group_vars/all and change group name
mon_group_name: monsmy
osd_group_name: osdsmy

make similar changes in inventory file

2. follow document and create cluster having one mon and 3 OSD node(each node has 3 OSD) 

3. purge-cluster using below command

[root@magna044 ceph-ansible]# ansible-playbook purge-cluster.yml  -vv -i  /etc/ansible/hosts


Actual results:
===============
Are you sure you want to purge the cluster? [no]: yes

PLAY [confirm whether user really meant to purge the cluster] ***************** 

GATHERING FACTS *************************************************************** 
<localhost> REMOTE_MODULE setup
ok: [localhost]

TASK: [exit playbook, if user did not mean to purge cluster] ****************** 
skipping: [localhost]

PLAY [stop ceph cluster] ****************************************************** 
skipping: no hosts matched

PLAY RECAP ******************************************************************** 
localhost                  : ok=1    changed=0    unreachable=0    failed=0   


----> no failures and cluster is not purged as those group names are hardcoded in purge file


Expected results:
================
It should purge cluster

1. either update Document and ask user to update groupname/hosts variable in purge-cluster.yml

or

2. change code so purge-cluster.yml pick mon_group_name from group_vars/all file.





Additional info:

Comment 2 Rachana Patel 2016-07-12 00:41:11 UTC
Expected results:
================
It should purge cluster

1. either update Document and ask user to update groupname/hosts variable in purge-cluster.yml
(changes needs to be done If and only if mon/osd group name is different than default)

or

2. change code so purge-cluster.yml pick mon_group_name from group_vars/all file.

Comment 4 Ken Dreyer (Red Hat) 2017-03-03 17:05:31 UTC
Andrew and I discussed this today. We think the best fix would be to drop the hard-coded *_group_name vars in ./infrastructure-playbooks/purge-cluster.yml, specifically this bit:

- name: gather facts on all hosts

  vars:
    mon_group_name:       mons
    osd_group_name:       osds
    mds_group_name:       mdss
    rgw_group_name:       rgws
    rbdmirror_group_name: rbd-mirrors
    nfs_group_name:       nfss
    client_group_name:       clients

Comment 5 Andrew Schoen 2017-03-07 16:18:50 UTC
PR opened upstream: https://github.com/ceph/ceph-ansible/pull/1349

Comment 9 Madhavi Kasturi 2017-11-03 10:38:14 UTC
The cluster deployment failed on changing the mon_group_name and osd_group_name.Filed bug 1509201 for the same


Note You need to log in before you can comment on or make changes to this bug.