From f7e9585a2c9978faaeb99b3b8adcd1a2c58b72b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Mon, 22 May 2017 14:18:45 +0200 Subject: [PATCH 1/2] common: fix installation condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: we could end up in situation where we would install a package on a machine that does not have the right repo enabled. Because the condition was set to OR we weren't pinning a particular host but just a condition. Let's say someone sets 'ceph_origin == "distro"', this would try to install OSD packages on Monitors. Solution: use a AND condition to first pin to the group_name (which identifies a set of hosts) AND then after this one of the installation condition. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1453119 Co-Authored-By: https://github.com/zhsj Signed-off-by: Sébastien Han --- .../ceph-common/tasks/installs/install_on_redhat.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/roles/ceph-common/tasks/installs/install_on_redhat.yml b/roles/ceph-common/tasks/installs/install_on_redhat.yml index e573a0b7c..e928d1323 100644 --- a/roles/ceph-common/tasks/installs/install_on_redhat.yml +++ b/roles/ceph-common/tasks/installs/install_on_redhat.yml @@ -74,8 +74,6 @@ state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}" when: - mon_group_name in group_names - or ceph_origin == "distro" - or ceph_custom - name: install distro or red hat storage ceph osd package: @@ -83,8 +81,6 @@ state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}" when: - osd_group_name in group_names - or ceph_origin == "distro" - or ceph_custom - name: install distro or red hat storage ceph mds package: @@ -92,8 +88,6 @@ state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}" when: - mds_group_name in group_names - or ceph_origin == "distro" - or ceph_custom - name: install distro or red hat storage ceph-fuse package: @@ -101,9 +95,6 @@ state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}" when: - client_group_name in group_names - or ceph_origin == "distro" - or ceph_dev - or ceph_custom - name: install distro or red hat storage ceph base package: @@ -111,8 +102,6 @@ state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}" when: - client_group_name in group_names - or ceph_origin == "distro" - or ceph_custom - name: install ceph-test package: From 468dc06bcd9fa9acd7b3baf55295e160679abf4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Tue, 23 May 2017 12:02:24 +0200 Subject: [PATCH 2/2] common: remove useless check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We only check for everything expect 'distro' because that is a valid way of deploying RHCS, with preprepared repos present on the nodes. Signed-off-by: Sébastien Han --- roles/ceph-common/tasks/checks/check_mandatory_vars.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/ceph-common/tasks/checks/check_mandatory_vars.yml b/roles/ceph-common/tasks/checks/check_mandatory_vars.yml index 42c7a9c43..114f22ef2 100644 --- a/roles/ceph-common/tasks/checks/check_mandatory_vars.yml +++ b/roles/ceph-common/tasks/checks/check_mandatory_vars.yml @@ -29,6 +29,6 @@ - ceph_rhcs - not ceph_rhcs_cdn_install - not ceph_rhcs_iso_install - - ceph_origin == "upstream" + - ceph_origin != 'distro' tags: - package-install