Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Add CephNfs service on roles providing "external" network connectivity
Browse files Browse the repository at this point in the history
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 e1de2bc)
(cherry picked from commit 31eafc7)
  • Loading branch information
gfidente committed Mar 11, 2022
1 parent 8b4cb9a commit 3d5ad4e
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 22 deletions.
1 change: 1 addition & 0 deletions roles/Controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions roles/ControllerAllNovaStandalone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions roles/ControllerNovaStandalone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions roles/ControllerOpenstack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions roles/ControllerSriov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions roles/ControllerStorageDashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions roles_data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions roles_data_undercloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,4 @@
- OS::TripleO::Services::UndercloudUpgrade
- OS::TripleO::Services::TripleoValidations
- OS::TripleO::Services::Zaqar

23 changes: 1 addition & 22 deletions tools/yaml-validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,23 +407,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]:
Expand Down Expand Up @@ -511,6 +494,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):
Expand Down Expand Up @@ -1178,11 +1162,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)

Expand Down

0 comments on commit 3d5ad4e

Please sign in to comment.