From 2fb1cbfa0ee97bfe8ba0972612b44ad118b28cdb Mon Sep 17 00:00:00 2001 From: Giulio Fidente Date: Mon, 21 Feb 2022 11:25:37 +0100 Subject: [PATCH] Add CephNfs service on roles providing "external" network connectivity With the recent changes meant to allow deployment of Ganesha on the "external" network, the CephNfs service can be added to more roles than just ControllerStorageNfs. Change-Id: Ic9010307c2aab7041c8ae30c72cc1bf99fdd22f6 Closes-Bug: 1961578 (cherry picked from commit e1de2bcb728a2a0d7de9fd4c14fe031738de4ecb) (cherry picked from commit 31eafc7353d22a351d11738cfd09a192e55afb03) --- roles/Controller.yaml | 1 + roles/ControllerAllNovaStandalone.yaml | 1 + roles/ControllerNovaStandalone.yaml | 1 + roles/ControllerOpenstack.yaml | 1 + roles/ControllerSriov.yaml | 1 + roles/ControllerStorageDashboard.yaml | 1 + roles_data.yaml | 1 + roles_data_undercloud.yaml | 1 + tools/yaml-validate.py | 23 +---------------------- 9 files changed, 9 insertions(+), 22 deletions(-) diff --git a/roles/Controller.yaml b/roles/Controller.yaml index d7816b0247..20853d1403 100644 --- a/roles/Controller.yaml +++ b/roles/Controller.yaml @@ -58,6 +58,7 @@ - OS::TripleO::Services::CephMds - OS::TripleO::Services::CephMgr - OS::TripleO::Services::CephMon + - OS::TripleO::Services::CephNfs - OS::TripleO::Services::CephRbdMirror - OS::TripleO::Services::CephRgw - OS::TripleO::Services::CertmongerUser diff --git a/roles/ControllerAllNovaStandalone.yaml b/roles/ControllerAllNovaStandalone.yaml index 546905a824..602af52b84 100644 --- a/roles/ControllerAllNovaStandalone.yaml +++ b/roles/ControllerAllNovaStandalone.yaml @@ -41,6 +41,7 @@ - OS::TripleO::Services::CephMds - OS::TripleO::Services::CephMgr - OS::TripleO::Services::CephMon + - OS::TripleO::Services::CephNfs - OS::TripleO::Services::CephRbdMirror - OS::TripleO::Services::CephRgw - OS::TripleO::Services::CertmongerUser diff --git a/roles/ControllerNovaStandalone.yaml b/roles/ControllerNovaStandalone.yaml index eae1c5113e..dbc472fba7 100644 --- a/roles/ControllerNovaStandalone.yaml +++ b/roles/ControllerNovaStandalone.yaml @@ -45,6 +45,7 @@ - OS::TripleO::Services::CephMds - OS::TripleO::Services::CephMgr - OS::TripleO::Services::CephMon + - OS::TripleO::Services::CephNfs - OS::TripleO::Services::CephRbdMirror - OS::TripleO::Services::CephRgw - OS::TripleO::Services::CertmongerUser diff --git a/roles/ControllerOpenstack.yaml b/roles/ControllerOpenstack.yaml index c61bdcfc24..6e9fa08b12 100644 --- a/roles/ControllerOpenstack.yaml +++ b/roles/ControllerOpenstack.yaml @@ -46,6 +46,7 @@ - OS::TripleO::Services::CephMds - OS::TripleO::Services::CephMgr - OS::TripleO::Services::CephMon + - OS::TripleO::Services::CephNfs - OS::TripleO::Services::CephRbdMirror - OS::TripleO::Services::CephRgw - OS::TripleO::Services::CertmongerUser diff --git a/roles/ControllerSriov.yaml b/roles/ControllerSriov.yaml index 3e0f6a4067..69985b8b3e 100644 --- a/roles/ControllerSriov.yaml +++ b/roles/ControllerSriov.yaml @@ -55,6 +55,7 @@ - OS::TripleO::Services::CephMds - OS::TripleO::Services::CephMgr - OS::TripleO::Services::CephMon + - OS::TripleO::Services::CephNfs - OS::TripleO::Services::CephRbdMirror - OS::TripleO::Services::CephRgw - OS::TripleO::Services::CertmongerUser diff --git a/roles/ControllerStorageDashboard.yaml b/roles/ControllerStorageDashboard.yaml index 510522eec7..6bd11abfdc 100644 --- a/roles/ControllerStorageDashboard.yaml +++ b/roles/ControllerStorageDashboard.yaml @@ -56,6 +56,7 @@ - OS::TripleO::Services::CephMds - OS::TripleO::Services::CephMgr - OS::TripleO::Services::CephMon + - OS::TripleO::Services::CephNfs - OS::TripleO::Services::CephRbdMirror - OS::TripleO::Services::CephRgw - OS::TripleO::Services::CertmongerUser diff --git a/roles_data.yaml b/roles_data.yaml index e920da7f4a..a555010f26 100644 --- a/roles_data.yaml +++ b/roles_data.yaml @@ -61,6 +61,7 @@ - OS::TripleO::Services::CephMds - OS::TripleO::Services::CephMgr - OS::TripleO::Services::CephMon + - OS::TripleO::Services::CephNfs - OS::TripleO::Services::CephRbdMirror - OS::TripleO::Services::CephRgw - OS::TripleO::Services::CertmongerUser diff --git a/roles_data_undercloud.yaml b/roles_data_undercloud.yaml index b56c27ad9c..5063fdc549 100644 --- a/roles_data_undercloud.yaml +++ b/roles_data_undercloud.yaml @@ -103,3 +103,4 @@ - OS::TripleO::Services::UndercloudUpgrade - OS::TripleO::Services::TripleoValidations - OS::TripleO::Services::Zaqar + diff --git a/tools/yaml-validate.py b/tools/yaml-validate.py index f07a12f21c..9af9232290 100755 --- a/tools/yaml-validate.py +++ b/tools/yaml-validate.py @@ -408,23 +408,6 @@ def validate_controller_dashboard(filename, tpl): return 0 -def validate_controller_storage_nfs(filename, tpl, exclude_service=()): - control_role_filename = os.path.join(os.path.dirname(filename), - './Controller.yaml') - with open(control_role_filename, 'r') as f: - control_role_tpl = yaml.safe_load(f.read()) - - control_role_services = control_role_tpl[0]['ServicesDefault'] - for role in tpl: - if role['name'] == 'ControllerStorageNfs': - services = [x for x in role['ServicesDefault'] if (x not in exclude_service)] - if sorted(services) != sorted(control_role_services): - print('ERROR: ServicesDefault in %s is different from ' - 'ServicesDefault in roles/Controller.yaml' % filename) - return 1 - return 0 - - def validate_hci_role(hci_role_filename, hci_role_tpl): role_files = ['HciCephAll', 'HciCephFile', 'HciCephMon', 'HciCephObject'] if hci_role_filename in ['./roles/' + x + '.yaml' for x in role_files]: @@ -512,6 +495,7 @@ def validate_controller_no_ceph_role(filename, tpl): services.append('OS::TripleO::Services::CephMgr') services.append('OS::TripleO::Services::CephGrafana') services.append('OS::TripleO::Services::CephMon') + services.append('OS::TripleO::Services::CephNfs') services.append('OS::TripleO::Services::CephRbdMirror') services.append('OS::TripleO::Services::CephRgw') if sorted(services) != sorted(control_role_services): @@ -1179,11 +1163,6 @@ def validate(filename, param_map): filename.startswith('./roles/ComputeHCISriov.yaml'): retval |= validate_hci_computehci_role(filename, tpl) - if filename.startswith('./roles/ControllerStorageNfs.yaml'): - exclude = [ - 'OS::TripleO::Services::CephNfs'] - retval |= validate_controller_storage_nfs(filename, tpl, exclude) - if filename.startswith('./roles/ControllerStorageDashboard.yaml'): retval |= validate_controller_dashboard(filename, tpl)