Adjust devstack plugin to debian/fedora package install

Most recommended and tested distro for devstack is ubuntu 22.04 [1],
therefore plugin adjusted for more distros.

[1] https://docs.openstack.org/devstack/latest/index.html#install-linux

Change-Id: I0ce489323fb5d48b06cd42849724097ecfa7bbf6
This commit is contained in:
Maor Blaustein 2024-03-07 14:58:08 +02:00
parent dc5aa0a129
commit 531bce7f52

View File

@ -7,7 +7,7 @@ customize_advanced_image(){
# This code modifies the downloaded image by adding packages required by this # This code modifies the downloaded image by adding packages required by this
# plugin, uploads the image to glance and if all passed successfully it updates # plugin, uploads the image to glance and if all passed successfully it updates
# tempest.conf with the new image reference instead of the original one. # tempest.conf with the new image reference instead of the original one.
sudo dnf install guestfs-tools -y install_package guestfs-tools
for image_url in ${IMAGE_URLS//,/ }; do for image_url in ${IMAGE_URLS//,/ }; do
if [[ $image_url =~ $ADVANCED_IMAGE_NAME ]]; then if [[ $image_url =~ $ADVANCED_IMAGE_NAME ]]; then
image_file=$(basename $image_url) image_file=$(basename $image_url)
@ -17,7 +17,7 @@ customize_advanced_image(){
if [ -n "$image_file" ] && [ -s "$TOP_DIR/files/$image_file" ]; then if [ -n "$image_file" ] && [ -s "$TOP_DIR/files/$image_file" ]; then
cp -f $TOP_DIR/files/$image_file /tmp cp -f $TOP_DIR/files/$image_file /tmp
image_file_custom=/tmp/$image_file image_file_custom=/tmp/$image_file
timeout 150 virt-customize -a $image_file_custom --install nmap,python3,keepalived,iperf3 --selinux-relabel timeout 150 sudo virt-customize -a $image_file_custom --install nmap,python3,keepalived,iperf3 --selinux-relabel
if [ "$?" == "0" ]; then if [ "$?" == "0" ]; then
source $TOP_DIR/openrc admin source $TOP_DIR/openrc admin
old_image_id=$(openstack image show $ADVANCED_IMAGE_NAME -c id -f value) old_image_id=$(openstack image show $ADVANCED_IMAGE_NAME -c id -f value)