Capture openstack resources as part of logs

This change ensures more openstack resources like services are captured
after tests, so that we can review status of deployment more in detail.

Change-Id: I1aef98da30b559d2e2e772e4f9601b09ff5f9238
(cherry picked from commit 3fd0d3edcb)
(cherry picked from commit d54e98cb6e)
This commit is contained in:
Takashi Kajinami
2022-03-10 11:38:38 +09:00
parent a8b5a2526b
commit 46b6671519

View File

@@ -282,12 +282,61 @@ for table in raw filter nat mangle ; do
echo ""
done > $LOG_DIR/iptables.txt
mkdir -p $LOG_DIR/openstack_resources
# keystone resources
source $LOG_DIR/openrc.txt
openstack endpoint list >> $LOG_DIR/keystone-resources.txt
openstack service list --long >> $LOG_DIR/keystone-resources.txt
openstack project list --long >> $LOG_DIR/keystone-resources.txt
openstack user list --long >> $LOG_DIR/keystone-resources.txt
if [ -d $LOG_DIR/keystone ]; then
source $LOG_DIR/openrc.txt
openstack >> $LOG_DIR/openstack_resources/keystone.txt <<-EOC
endpoint list
service list --long
project list --long
user list --long
role list
role assignment list
EOC
fi
# nova resources
if [ -d $LOG_DIR/nova ]; then
source $LOG_DIR/openrc.txt
openstack >> $LOG_DIR/openstack_resources/nova.txt <<-EOC
compute service list
flavor list --all --long
server list --all --long
EOC
fi
# cinder resources
if [ -d $LOG_DIR/cinder ]; then
source $LOG_DIR/openrc.txt
openstack >> $LOG_DIR/openstack_resources/cinder.txt <<-EOC
volume service list
volume type list --long
volume list --all --long
EOC
fi
# glance resources
if [ -d $LOG_DIR/glance ]; then
source $LOG_DIR/openrc.txt
openstack >> $LOG_DIR/openstack_resources/glance.txt <<-EOC
image list --long
EOC
fi
# neutron resources
if [ -d $LOG_DIR/neutron ]; then
source $LOG_DIR/openrc.txt
openstack >> $LOG_DIR/openstack_resources/neutron.txt <<-EOC
network agent list
network list --long
subnet list --long
port list --long
router list --long
floating ip list --long
EOC
fi
# end of log capture
set -e