]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-common: add firewall rules for ceph-mgr
authorSébastien Han <seb@redhat.com>
Mon, 4 Jun 2018 02:40:14 +0000 (10:40 +0800)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 4 Jun 2018 10:11:41 +0000 (12:11 +0200)
Prior to this commit the firewall tasks were not opening the ceph-mgr
ports. This would lead to unclean configuration since the ceph-mgr
daemons can not connect to the OSDs.
Thi commit opens the right ports on the ceph-mgr nodes to talk with the
OSDs.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1526400
Signed-off-by: Sébastien Han <seb@redhat.com>
group_vars/all.yml.sample
group_vars/rhcs.yml.sample
roles/ceph-common/tasks/misc/configure_firewall_rpm.yml
roles/ceph-defaults/defaults/main.yml

index f80452dd0fab0daaeccf2f614f8ba04fc259fa95..754ffd194f6992b06c12ae3059ea50b071485d06 100644 (file)
@@ -63,6 +63,7 @@ dummy:
 
 # Open ports on corresponding nodes if firewall is installed on it
 #ceph_mon_firewall_zone: public
+#ceph_mgr_firewall_zone: public
 #ceph_osd_firewall_zone: public
 #ceph_rgw_firewall_zone: public
 #ceph_mds_firewall_zone: public
index 45b7e3ed10898290dbb45e87272efb71f7089055..10157571ad24b791e4dae2828ab7d7811556938f 100644 (file)
@@ -63,6 +63,7 @@ fetch_directory: ~/ceph-ansible-keys
 
 # Open ports on corresponding nodes if firewall is installed on it
 #ceph_mon_firewall_zone: public
+#ceph_mgr_firewall_zone: public
 #ceph_osd_firewall_zone: public
 #ceph_rgw_firewall_zone: public
 #ceph_mds_firewall_zone: public
index f6da3cb4f62f5f15db02a2e3c75eb836383f9752..b422a47637c7a5c07fdf168b881268105564035f 100644 (file)
   tags:
     - firewall
 
+- name: open manager ports
+  firewalld:
+    service: ceph
+    zone: "{{ ceph_mgr_firewall_zone }}"
+    permanent: true
+    immediate: false # if true then fails in case firewalld is stopped
+    state: enabled
+  notify: restart firewalld
+  when:
+    - ceph_release_num[ceph_release] >= ceph_release_num.luminous
+    - mgr_group_name is defined
+    - mgr_group_name in group_names
+    - firewalld_pkg_query.rc == 0
+  tags:
+    - firewall
+
 - name: open osd ports
   firewalld:
     service: ceph
index eb74c496418356b9e98230fa157ab265df4bef46..4f009091000e53f24133aa4ecfa1709b234276b4 100644 (file)
@@ -55,6 +55,7 @@ check_firewall: False
 
 # Open ports on corresponding nodes if firewall is installed on it
 ceph_mon_firewall_zone: public
+ceph_mgr_firewall_zone: public
 ceph_osd_firewall_zone: public
 ceph_rgw_firewall_zone: public
 ceph_mds_firewall_zone: public