Browse Source

Use ansible for nodes validation

The old all nodes validation used a bash script to run some basic ping
tests after the network setup. It used to be a software config but
eventually got baked into the deployment framework. This patch switches
to the ansible role implementation and cleans up the old references to
the old heat resource.

Note: Some conflicts in:
	ci/environments/multinode-containers.yaml
	ci/environments/scenario003-standalone.yaml
	ci/environments/scenario013-standalone.yaml
	common/deploy-steps.j2

Closes-Bug: #1904711

Change-Id: Ia7f055d2c636f950c3fe6d8611834c4ab290f31a
Depends-On: https://review.opendev.org/#/c/763052/
(cherry picked from commit 78ca1fe143)
changes/58/763058/4
Alex Schultz 11 months ago
committed by Michele Baldessari
parent
commit
d5a87a297f
  1. 45
      all-nodes-validation.yaml
  2. 37
      ci/common/all-nodes-validation-disabled.yaml
  3. 4
      ci/environments/multinode-containers.yaml
  4. 3
      ci/environments/scenario000-multinode-containers.yaml
  5. 3
      ci/environments/scenario000-standalone.yaml
  6. 3
      ci/environments/scenario001-multinode-containers.yaml
  7. 3
      ci/environments/scenario001-standalone.yaml
  8. 3
      ci/environments/scenario002-standalone.yaml
  9. 3
      ci/environments/scenario003-standalone.yaml
  10. 3
      ci/environments/scenario004-standalone.yaml
  11. 3
      ci/environments/scenario007-multinode-containers.yaml
  12. 3
      ci/environments/scenario007-standalone.yaml
  13. 1
      ci/environments/scenario010-multinode-containers.yaml
  14. 3
      ci/environments/scenario010-standalone.yaml
  15. 3
      ci/environments/scenario012-standalone.yaml
  16. 18
      common/deploy-steps.j2
  17. 3
      overcloud-resource-registry-puppet.j2.yaml

45
all-nodes-validation.yaml

@ -1,45 +0,0 @@
heat_template_version: rocky
description: >
Software Config to drive validations that occur on all nodes.
Note, you need the heat-config-script element built into your
images, due to the script group below.
parameters:
PingTestIps:
default: ''
description: A string containing a space separated list of IP addresses used to ping test each available network interface.
type: string
ValidateControllersIcmp:
default: true
description: Validation to ensure that all controllers can be reached with ICMP
type: boolean
ValidateGatewaysIcmp:
default: true
description: Validation to ensure that all gateways can be reached with ICMP
type: boolean
ValidateFqdn:
default: false
description: Optional validation to ensure FQDN as set by Nova matches the name set in /etc/hosts.
type: boolean
resources:
AllNodesValidationsImpl:
type: OS::Heat::SoftwareConfig
properties:
group: script
inputs:
- name: ping_test_ips
default: {get_param: PingTestIps}
- name: validate_fqdn
default: {get_param: ValidateFqdn}
- name: validate_controllers_icmp
default: {get_param: ValidateControllersIcmp}
- name: validate_gateways_icmp
default: {get_param: ValidateGatewaysIcmp}
config: {get_file: ./validation-scripts/all-nodes.sh}
outputs:
OS::stack_id:
description: The ID of the AllNodesValidationsImpl resource.
value: {get_resource: AllNodesValidationsImpl}

37
ci/common/all-nodes-validation-disabled.yaml

@ -1,37 +0,0 @@
heat_template_version: rocky
description: >
Software Config to drive validations that occur on all nodes.
Note, you need the heat-config-script element built into your
images, due to the script group below.
This implementation of the validations is a noop that always reports success.
parameters:
PingTestIps:
default: ''
description: A string containing a space separated list of IP addresses used to ping test each available network interface.
type: string
ValidateFqdn:
default: false
description: Optional validation to ensure FQDN as set by Nova matches the name set in /etc/hosts.
type: boolean
resources:
AllNodesValidationsImpl:
type: OS::Heat::SoftwareConfig
properties:
group: script
inputs:
- name: ping_test_ips
default: {get_param: PingTestIps}
- name: validate_fqdn
default: {get_param: ValidateFqdn}
config: |
#!/bin/bash
exit 0
outputs:
OS::stack_id:
description: The ID of the AllNodesValidationsImpl resource.
value: {get_resource: AllNodesValidationsImpl}

4
ci/environments/multinode-containers.yaml

@ -1,10 +1,6 @@
resource_registry:
OS::TripleO::Controller::Net::SoftwareConfig: ../common/net-config-multinode-os-net-config.yaml
OS::TripleO::Compute::Net::SoftwareConfig: ../common/net-config-multinode-os-net-config.yaml
# Some infra instances don't pass the ping test but are otherwise working.
# Since the OVB jobs also test this functionality we can shut it off here.
OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml
OS::TripleO::Services::OVNDBs: ../../deployment/ovn/ovn-dbs-pacemaker-puppet.yaml
parameter_defaults:
ControllerServices:

3
ci/environments/scenario000-multinode-containers.yaml

@ -1,9 +1,6 @@
resource_registry:
OS::TripleO::Controller::Net::SoftwareConfig: ../common/net-config-multinode.yaml
OS::TripleO::Compute::Net::SoftwareConfig: ../common/net-config-multinode.yaml
# Some infra instances don't pass the ping test but are otherwise working.
# Since the OVB jobs also test this functionality we can shut it off here.
OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml
parameter_defaults:
ControllerServices:

3
ci/environments/scenario000-standalone.yaml

@ -1,8 +1,5 @@
# This scenario only install keystone and the required services to run it.
resource_registry:
# Some infra instances don't pass the ping test but are otherwise working.
# Since the OVB jobs also test this functionality we can shut it off here.
OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml
OS::TripleO::Services::AodhApi: OS::Heat::None
OS::TripleO::Services::AodhEvaluator: OS::Heat::None
OS::TripleO::Services::AodhListener: OS::Heat::None

3
ci/environments/scenario001-multinode-containers.yaml

@ -28,9 +28,6 @@ resource_registry:
OS::TripleO::Services::HeatApiCfn: ../../deployment/heat/heat-api-cfn-container-puppet.yaml
OS::TripleO::Services::HeatApiCloudwatch: ../../deployment/heat/heat-api-cloudwatch-disabled-puppet.yaml
OS::TripleO::Services::HeatEngine: ../../deployment/heat/heat-engine-container-puppet.yaml
# Some infra instances don't pass the ping test but are otherwise working.
# Since the OVB jobs also test this functionality we can shut it off here.
OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml
parameter_defaults:
ControllerServices:

3
ci/environments/scenario001-standalone.yaml

@ -26,9 +26,6 @@ resource_registry:
OS::TripleO::Services::Redis: ../../deployment/database/redis-pacemaker-puppet.yaml
OS::TripleO::Services::CinderBackup: ../../deployment/cinder/cinder-backup-pacemaker-puppet.yaml
OS::TripleO::Services::CinderVolume: ../../deployment/cinder/cinder-volume-pacemaker-puppet.yaml
# Some infra instances don't pass the ping test but are otherwise working.
# Since the OVB jobs also test this functionality we can shut it off here.
OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml
OS::TripleO::Services::SwiftProxy: OS::Heat::None
OS::TripleO::Services::SwiftStorage: OS::Heat::None
OS::TripleO::Services::SwiftRingBuilder: OS::Heat::None

3
ci/environments/scenario002-standalone.yaml

@ -21,9 +21,6 @@ resource_registry:
OS::TripleO::Services::CinderBackup: ../../deployment/cinder/cinder-backup-pacemaker-puppet.yaml
OS::TripleO::Services::CinderVolume: ../../deployment/cinder/cinder-volume-pacemaker-puppet.yaml
OS::TripleO::Services::BarbicanBackendSimpleCrypto: ../../deployment/barbican/barbican-backend-simple-crypto-puppet.yaml
# Some infra instances don't pass the ping test but are otherwise working.
# Since the OVB jobs also test this functionality we can shut it off here.
OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml
# NOTE(mwhahaha): cheat and use the horizon "service" for our test service
# since disable horizon. This allows us to not have to keep some test service
# in the defaults just for this case.

3
ci/environments/scenario003-standalone.yaml

@ -17,9 +17,6 @@ resource_registry:
OS::TripleO::Services::DesignateProducer: ../../deployment/experimental/designate/designate-producer-container-puppet.yaml
OS::TripleO::Services::DesignateWorker: ../../deployment/experimental/designate/designate-worker-container-puppet.yaml
OS::TripleO::Services::DesignateMDNS: ../../deployment/experimental/designate/designate-mdns-container-puppet.yaml
# Some infra instances don't pass the ping test but are otherwise working.
# Since the OVB jobs also test this functionality we can shut it off here.
OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml
parameter_defaults:
Debug: true

3
ci/environments/scenario004-standalone.yaml

@ -26,9 +26,6 @@ resource_registry:
OS::TripleO::Services::Clustercheck: ../../deployment/pacemaker/clustercheck-container-puppet.yaml
OS::TripleO::Services::MySQL: ../../deployment/database/mysql-pacemaker-puppet.yaml
OS::TripleO::Services::LoginDefs: ../../deployment/login-defs/login-defs-baremetal.yaml
# Some infra instances don't pass the ping test but are otherwise working.
# Since the OVB jobs also test this functionality we can shut it off here.
OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml
parameter_defaults:
ManagePolling: true

3
ci/environments/scenario007-multinode-containers.yaml

@ -10,9 +10,6 @@ resource_registry:
OS::TripleO::Services::NeutronL3Agent: ../../deployment/neutron/neutron-l3-container-puppet.yaml
OS::TripleO::Services::ComputeNeutronOvsAgent: ../../deployment/neutron/neutron-ovs-agent-container-puppet.yaml
# Some infra instances don't pass the ping test but are otherwise working.
# Since the OVB jobs also test this functionality we can shut it off here.
OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml
OS::TripleO::Services::NovaMigrationTarget: OS::Heat::None
OS::TripleO::Services::SwiftProxy: OS::Heat::None
OS::TripleO::Services::SwiftStorage: OS::Heat::None

3
ci/environments/scenario007-standalone.yaml

@ -6,9 +6,6 @@ resource_registry:
OS::TripleO::Services::NeutronOvsAgent: ../../deployment/neutron/neutron-ovs-agent-container-puppet.yaml
OS::TripleO::Services::NeutronDhcpAgent: ../../deployment/neutron/neutron-dhcp-container-puppet.yaml
OS::TripleO::Services::NeutronL3Agent: ../../deployment/neutron/neutron-l3-container-puppet.yaml
# Some infra instances don't pass the ping test but are otherwise working.
# Since the OVB jobs also test this functionality we can shut it off here.
OS::TripleO::AllNodes::Validation: ../../ci/common/all-nodes-validation-disabled.yaml
OS::TripleO::Services::BlockStorageCinderVolume: OS::Heat::None
OS::TripleO::Services::CinderVolume: OS::Heat::None

1
ci/environments/scenario010-multinode-containers.yaml

@ -10,7 +10,6 @@ resource_registry:
OS::TripleO::Services::PacemakerRemote: ../../deployment/pacemaker/pacemaker-remote-baremetal-puppet.yaml
OS::TripleO::Services::Clustercheck: ../../deployment/pacemaker/clustercheck-container-puppet.yaml
OS::TripleO::Services::MySQL: ../../deployment/database/mysql-pacemaker-puppet.yaml
OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml
OS::TripleO::Services::OctaviaApi: ../../deployment/octavia/octavia-api-container-puppet.yaml
OS::TripleO::Services::OctaviaHousekeeping: ../../deployment/octavia/octavia-housekeeping-container-puppet.yaml
OS::TripleO::Services::OctaviaHealthManager: ../../deployment/octavia/octavia-health-manager-container-puppet.yaml

3
ci/environments/scenario010-standalone.yaml

@ -5,9 +5,6 @@ resource_registry:
OS::TripleO::Services::CephClient: ../../deployment/ceph-ansible/ceph-client.yaml
OS::TripleO::Services::OsloMessagingRpc: ../../deployment/rabbitmq/rabbitmq-messaging-rpc-pacemaker-puppet.yaml
OS::TripleO::Services::OsloMessagingNotify: ../../deployment/rabbitmq/rabbitmq-messaging-notify-shared-puppet.yaml
# Some infra instances don't pass the ping test but are otherwise working.
# Since the OVB jobs also test this functionality we can shut it off here.
OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml
OS::TripleO::Services::OctaviaApi: ../../deployment/octavia/octavia-api-container-puppet.yaml
OS::TripleO::Services::OctaviaHousekeeping: ../../deployment/octavia/octavia-housekeeping-container-puppet.yaml
OS::TripleO::Services::OctaviaHealthManager: ../../deployment/octavia/octavia-health-manager-container-puppet.yaml

3
ci/environments/scenario012-standalone.yaml

@ -6,9 +6,6 @@ resource_registry:
OS::TripleO::Services::IronicApi: ../../deployment/ironic/ironic-api-container-puppet.yaml
OS::TripleO::Services::IronicConductor: ../../deployment/ironic/ironic-conductor-container-puppet.yaml
OS::TripleO::Services::IronicPxe: ../../deployment/ironic/ironic-pxe-container-puppet.yaml
# Some infra instances don't pass the ping test but are otherwise working.
# Since the OVB jobs also test this functionality we can shut it off here.
OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml
OS::TripleO::NodeExtraConfigPost: ../common/ironic_standalone_post.yaml
OS::TripleO::Services::CinderVolume: ../../deployment/cinder/cinder-volume-container-puppet.yaml
OS::TripleO::Services::NeutronCorePlugin: OS::TripleO::Services::NeutronCorePluginML2Ansible

18
common/deploy-steps.j2

@ -402,7 +402,6 @@ outputs:
common_deploy_steps_tasks_step_1: {get_file: deploy-steps-tasks-step-1.yaml}
docker_puppet_script: {get_file: ./container-puppet.py}
container_puppet_script: {get_file: ./container-puppet.sh}
all_nodes_validation_script.sh : {get_file: ../validation-scripts/all-nodes.sh}
deploy-artifacts.sh : {get_file: ../puppet/deploy-artifacts.sh}
generate-config-tasks: {get_file: generate-config-tasks.yaml}
host-container-puppet-tasks: {get_file: host-container-puppet-tasks.yaml}
@ -564,15 +563,14 @@ outputs:
when:
- NetworkConfig_stat.stat.exists
- name: AllNodesValidationConfig
script: all_nodes_validation_script.sh
environment:
validate_controllers_icmp: "{{ validate_controllers_icmp }}"
validate_gateways_icmp: "{{ validate_gateways_icmp }}"
validate_fqdn: "{{ validate_fqdn }}"
ping_test_ips: "{{ ping_test_ips | to_json }}"
tripleo_role_name: "{{ tripleo_role_name }}"
- name: Basic Network Validation
include_role:
name: tripleo_nodes_validation
vars:
tripleo_nodes_validation_validate_controllers_icmp: "{{ validate_controllers_icmp }}"
tripleo_nodes_validation_validate_gateways_icmp: "{{ validate_gateways_icmp }}"
tripleo_nodes_validation_validate_fqdn: "{{ validate_fqdn }}"
tripleo_nodes_validation_ping_test_ips: "{{ ping_test_ips.get(tripleo_role_name).split(' ') | list | unique }}"
- name: ArtifactsConfig
script: deploy-artifacts.sh
environment:

3
overcloud-resource-registry-puppet.j2.yaml

@ -93,9 +93,6 @@ resource_registry:
# Service Endpoint Mappings
OS::TripleO::EndpointMap: network/endpoints/endpoint_map.yaml
# validation resources
OS::TripleO::AllNodes::Validation: all-nodes-validation.yaml
OS::TripleO::DeployedServerEnvironment: OS::Heat::None
OS::TripleO::DeploymentSteps: OS::Heat::None

Loading…
Cancel
Save