Bug 1508460

Summary: Changes to ceph-common handlers for RGWs
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Tupper Cole <tcole>
Component: Ceph-AnsibleAssignee: Sébastien Han <shan>
Status: CLOSED ERRATA QA Contact: subhash <vpoliset>
Severity: high Docs Contact: Bara Ancincova <bancinco>
Priority: high    
Version: 3.0CC: adeza, anharris, aschoen, ceph-eng-bugs, edonnell, gmeno, jbrier, kdreyer, nthomas, rperiyas, sankarshan, shan, vpoliset
Target Milestone: rc   
Target Release: 3.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: RHEL: ceph-ansible-3.1.0-0.1.rc3.el7cp Ubuntu: ceph-ansible_3.1.0~rc3-2redhat1 Doc Type: Bug Fix
Doc Text:
.Ansible no longer creates unused `systemd` unit files Previously, when installing the Ceph Object Gateway by using the `ceph-ansible` utility, `ceph-ansible` created `systemd` unit files for the Ceph Object Gateway host corresponding to all Object Gateway instances located on other hosts. However, the only unit file that was active was the one that corresponded to the hostname of the Ceph Object Gateway. The others were not active and as such they did not cause problems. With this update of Ceph the other unit files are no longer created.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-26 18:16:43 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:
Bug Depends On:    
Bug Blocks: 1494421, 1584264    

Description Tupper Cole 2017-11-01 13:27:06 UTC
Description of problem:

When we install ceph rgw via ceph-ansible ,the Ansible playbook is inserting entry in systemd for  rgw.ceph-rgw-01.service           in rgw-02 and rgw-03 nodes . 


[a_ansible@ceph-rgw-02 ~]$ sudo su -
[root@ceph-rgw-02 ~]# systemctl | grep rado
● ceph-radosgw.service                              loaded failed failed    Ceph rados gateway
  ceph-radosgw.service                              loaded active running   Ceph rados gateway
  system-ceph\x2dradosgw.slice                                      loaded active active    system-ceph\x2dradosgw.slice
  ceph-radosgw.target                                               loaded active active    ceph target allowing to start/stop all ceph-radosgw@.service instances at once


[a_ansible@admin-01 ansible]$ ssh ceph-rgw-03

[root@ceph-rgw-03 ~]#  systemctl | grep rado
● ceph-radosgw.service                              loaded failed failed    Ceph rados gateway
  ceph-radosgw.service                              loaded active running   Ceph rados gateway
  system-ceph\x2dradosgw.slice                                      loaded active active    system-ceph\x2dradosgw.slice
  ceph-radosgw.target                                               loaded active active    ceph target allowing to start/stop all ceph-radosgw@.service instances at once
[root@ceph-rgw-03 ~]#

Possible solution:

Changes to ceph-common handlers for RGWs

   # serial: 1 would be the proper solution here, but that can only be set on play level
   # upstream issue: https://github.com/ansible/ansible/issues/12170
   run_once: true
-  with_items: "{{ groups.get(rgw_group_name, []) }}"
-  delegate_to: "{{ item }}"
+  #with_items: "{{ groups.get(rgw_group_name, []) }}"
+  #delegate_to: "{{ item }}"
  when:
     - rgw_group_name in group_names

Comment 6 Sébastien Han 2017-11-23 13:39:41 UTC
lgtm

Comment 9 Sébastien Han 2018-05-18 11:45:26 UTC
Present in v3.1.0rc3.

Comment 11 subhash 2018-06-29 06:13:40 UTC
Verified with  version ceph-ansible-3.1.0-0.1.rc9.el7cp.noarch ,
ansible-2.4.5.0-1.el7ae.noarch

Have deployed a cluster with following Config.

Inventory hosts file

[mons]
magna021

[osds]
magna028
magna031 
magna030 

[rgws]
magna031
magna033
magna029

[mgrs]
magna021



[ubuntu@magna033 ~]$ sudo systemctl list-units | grep rados
ceph-radosgw.service                                                        loaded active running   Ceph rados gateway
system-ceph\x2dradosgw.slice                                                             loaded active active    system-ceph\x2dradosgw.slice
ceph-radosgw.target                                                                      loaded active active    ceph target allowing to start/stop all ceph-radosgw@.service instances at once



[ubuntu@magna029 ~]$ sudo systemctl list-units | grep rados
ceph-radosgw.service                                                        loaded active running   Ceph rados gateway
system-ceph\x2dradosgw.slice                                                             loaded active active    system-ceph\x2dradosgw.slice
ceph-radosgw.target                                                                      loaded active active    ceph target allowing to start/stop all ceph-radosgw@.service instances at once



[ubuntu@magna031 ~]$ sudo systemctl list-units | grep rados
ceph-radosgw.service                                                        loaded active running   Ceph rados gateway
system-ceph\x2dradosgw.slice                                                             loaded active active    system-ceph\x2dradosgw.slice
ceph-radosgw.target                                                                      loaded active active    ceph target allowing to start/stop all ceph-radosgw@.service instances at once

Only the `systemd` unit files for the respective Ceph Object Gateway hosts are created.

Hence Moving to verfied state

Comment 13 Sébastien Han 2018-09-03 12:51:55 UTC
Doc text is already present.

Comment 14 John Brier 2018-09-03 21:54:18 UTC
(In reply to leseb from comment #13)
> Doc text is already present.

Yes but it was written when the issue was a known issue, and was not updated to reflect that the issue is resolved. I updated it to explain that. Let me know if it needs changes or feel free to make them yourself.

Comment 15 Sébastien Han 2018-09-04 09:39:55 UTC
lgtm, thanks

Comment 17 errata-xmlrpc 2018-09-26 18:16:43 UTC
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, 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/RHBA-2018:2819