Add a ComputePPC64LE role
Create a new role for compute nodes running on ppc64le. Ideally we wouldn't need this but at least the overcloud image needs to differ based on CPU architecture so having a separate role allows us to vary other parameters. As the intent is for the same services to run on moth Compute and ComputePPC64LE add a validation check to ensure that the services stay in sync. Blueprint: multiarch-support Change-Id: I9912139048fa11df447c0985e7d53fbcfee7e252
This commit is contained in:
parent
5bea50a257
commit
40282174ea
59
roles/ComputePPC64LE.yaml
Normal file
59
roles/ComputePPC64LE.yaml
Normal file
@ -0,0 +1,59 @@
|
||||
###############################################################################
|
||||
# Role: ComputePPC64LE #
|
||||
###############################################################################
|
||||
- name: ComputePPC64LE
|
||||
description: |
|
||||
Basic Compute Node role for ppc64le servers
|
||||
CountDefault: 0
|
||||
networks:
|
||||
- InternalApi
|
||||
- Tenant
|
||||
- Storage
|
||||
HostnameFormatDefault: '%stackname%-novacomputeppc64le-%index%'
|
||||
ImageDefault: ppc64le-overcloud-full
|
||||
RoleParametersDefault:
|
||||
TunedProfileName: "virtual-host"
|
||||
ServicesDefault:
|
||||
- OS::TripleO::Services::Aide
|
||||
- OS::TripleO::Services::AuditD
|
||||
- OS::TripleO::Services::CACerts
|
||||
- OS::TripleO::Services::CephClient
|
||||
- OS::TripleO::Services::CephExternal
|
||||
- OS::TripleO::Services::CertmongerUser
|
||||
- OS::TripleO::Services::Collectd
|
||||
- OS::TripleO::Services::ComputeCeilometerAgent
|
||||
- OS::TripleO::Services::ComputeNeutronCorePlugin
|
||||
- OS::TripleO::Services::ComputeNeutronL3Agent
|
||||
- OS::TripleO::Services::ComputeNeutronMetadataAgent
|
||||
- OS::TripleO::Services::ComputeNeutronOvsAgent
|
||||
- OS::TripleO::Services::Docker
|
||||
- OS::TripleO::Services::Fluentd
|
||||
- OS::TripleO::Services::Ipsec
|
||||
- OS::TripleO::Services::Iscsid
|
||||
- OS::TripleO::Services::Kernel
|
||||
- OS::TripleO::Services::LoginDefs
|
||||
- OS::TripleO::Services::MySQLClient
|
||||
- OS::TripleO::Services::NeutronBgpVpnBagpipe
|
||||
- OS::TripleO::Services::NeutronLinuxbridgeAgent
|
||||
- OS::TripleO::Services::NeutronVppAgent
|
||||
- OS::TripleO::Services::NovaCompute
|
||||
- OS::TripleO::Services::NovaLibvirt
|
||||
- OS::TripleO::Services::NovaMigrationTarget
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::OpenDaylightOvs
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::Securetty
|
||||
- OS::TripleO::Services::SensuClient
|
||||
- OS::TripleO::Services::SkydiveAgent
|
||||
- OS::TripleO::Services::Snmp
|
||||
- OS::TripleO::Services::Sshd
|
||||
- OS::TripleO::Services::Timezone
|
||||
- OS::TripleO::Services::TripleoFirewall
|
||||
- OS::TripleO::Services::TripleoPackages
|
||||
- OS::TripleO::Services::Tuned
|
||||
- OS::TripleO::Services::Vpp
|
||||
- OS::TripleO::Services::OVNController
|
||||
- OS::TripleO::Services::OVNMetadataAgent
|
||||
- OS::TripleO::Services::Ptp
|
@ -468,6 +468,35 @@ def validate_with_compute_role_services(role_filename, role_tpl, exclude_service
|
||||
return 0
|
||||
|
||||
|
||||
def validate_multiarch_compute_roles(role_filename, role_tpl):
|
||||
errors = 0
|
||||
roles_dir = os.path.dirname(role_filename)
|
||||
compute_services = set(role_tpl[0].get('ServicesDefault', []))
|
||||
compute_networks = set(role_tpl[0].get('networks', []))
|
||||
|
||||
for arch in ['ppc64le']:
|
||||
arch_filename = os.path.join(roles_dir,
|
||||
'Compute%s.yaml' % (arch.upper()))
|
||||
with open(arch_filename) as f:
|
||||
arch_tpl = yaml.safe_load(f)
|
||||
|
||||
arch_services = set(arch_tpl[0].get('ServicesDefault', []))
|
||||
if compute_services != arch_services:
|
||||
print('ERROR ServicesDefault in %s and %s do not match' %
|
||||
(role_filename, arch_filename))
|
||||
print('ERROR problems with: %s' % (','.join(compute_services.symmetric_difference(arch_services))))
|
||||
errors = 1
|
||||
|
||||
arch_networks = set(arch_tpl[0].get('networks', []))
|
||||
if compute_networks != arch_networks:
|
||||
print('ERROR networks in %s and %s do not match' %
|
||||
(role_filename, arch_filename))
|
||||
print('ERROR problems with: %s' % (','.join(compute_networks.symmetric_difference(arch_networks))))
|
||||
errors = 1
|
||||
|
||||
return errors
|
||||
|
||||
|
||||
def search(item, check_item, check_key):
|
||||
if check_item(item):
|
||||
return True
|
||||
@ -1075,6 +1104,9 @@ def validate(filename, param_map):
|
||||
if filename.startswith('./roles/ControllerNoCeph.yaml'):
|
||||
retval |= validate_controller_no_ceph_role(filename, tpl)
|
||||
|
||||
if filename == './roles/Compute.yaml':
|
||||
retval |= validate_multiarch_compute_roles(filename, tpl)
|
||||
|
||||
if filename.startswith('./network_data_'):
|
||||
result = validate_network_data_file(filename)
|
||||
retval |= result
|
||||
|
Loading…
Reference in New Issue
Block a user