Merge "Added validation tasks for listing external compute"

This commit is contained in:
Zuul 2022-11-02 16:01:08 +00:00 committed by Gerrit Code Review
commit 27ca805b53
3 changed files with 50 additions and 0 deletions

View File

@ -32,3 +32,14 @@
- name: Run External Data Plane management role
include_role:
name: external-data-plane-management
# On Controller node
# Run validate_external_compute.sh
- hosts: undercloud
gather_facts: true
tags:
- standalone
tasks:
- include_role:
name: external-data-plane-management
tasks_from: validate_edpm.yml

View File

@ -0,0 +1,12 @@
---
- name: Generate validate_edpm.sh script
template:
src: validate_edpm.sh.j2
dest: "{{ working_dir }}/validate_external_compute.sh"
mode: 0755
- name: Run deploy_compute.sh script
shell: >
set -o pipefail &&
{{ working_dir }}/validate_external_compute.sh
2>&1 {{ timestamper_cmd }} > {{ working_dir }}/validate_external_compute.log

View File

@ -0,0 +1,27 @@
#!/bin/bash
set -eux
# Discover new compute nodes
sudo podman exec -it nova_api nova-manage cell_v2 discover_hosts --verbose
# Export standalone cloud
export OS_CLOUD=standalone
# List Available Zones
openstack availability zone list
# List hosts
openstack host list
# List Hypervisors
openstack hypervisor list
# List Compute Services
openstack compute service list
if [ "$?" == "0" ]; then
echo "External Compute Deployment Validation, SUCCESS"
exit 0
else
exit 1
fi