Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kolla Ansible
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Very Demiurge Very Mindful
Kolla Ansible
Commits
30fca662
Commit
30fca662
authored
1 year ago
by
Bartosz Bezak
Browse files
Options
Downloads
Patches
Plain Diff
CI: add q35 hardware machine type to tests
Change-Id: If9636aaa76a7dc094223c3f096d96c96ecd0c8e7
parent
e38f5e0c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test-core-openstack.sh
+40
-13
40 additions, 13 deletions
tests/test-core-openstack.sh
with
40 additions
and
13 deletions
tests/test-core-openstack.sh
+
40
−
13
View file @
30fca662
...
@@ -257,6 +257,14 @@ function detach_fip {
...
@@ -257,6 +257,14 @@ function detach_fip {
openstack server remove floating ip
${
instance_name
}
${
fip_addr
}
openstack server remove floating ip
${
instance_name
}
${
fip_addr
}
}
}
function
set_cirros_image_q35_machine_type
{
openstack image
set
--property
hw_machine_type
=
q35 cirros
}
function
unset_cirros_image_q35_machine_type
{
openstack image
unset
--property
hw_machine_type cirros
}
function
test_ssh
{
function
test_ssh
{
local
instance_name
=
$1
local
instance_name
=
$1
local
fip_addr
=
$2
local
fip_addr
=
$2
...
@@ -280,6 +288,14 @@ function test_ssh {
...
@@ -280,6 +288,14 @@ function test_ssh {
function
test_instance_boot
{
function
test_instance_boot
{
local
fip_addr
local
fip_addr
local
machine_type
=
"
${
1
}
"
local
fip_file
=
"/tmp/kolla_ci_pre_upgrade_fip_addr
${
machine_type
:+_
$machine_type
}
"
local
upgrade_instance_name
=
"kolla_upgrade_test
${
machine_type
:+_
$machine_type
}
"
local
volume_name
=
"durable_volume
${
machine_type
:+_
$machine_type
}
"
if
[[
$machine_type
==
"q35"
]]
;
then
set_cirros_image_q35_machine_type
fi
echo
"TESTING: Server creation"
echo
"TESTING: Server creation"
create_instance kolla_boot_test
create_instance kolla_boot_test
...
@@ -314,12 +330,12 @@ function test_instance_boot {
...
@@ -314,12 +330,12 @@ function test_instance_boot {
echo
"TESTING: Cinder volume upgrade stability (PHASE:
$PHASE
)"
echo
"TESTING: Cinder volume upgrade stability (PHASE:
$PHASE
)"
if
[[
$PHASE
==
'deploy'
]]
;
then
if
[[
$PHASE
==
'deploy'
]]
;
then
create_a_volume
durable_
volume
create_a_volume
$
volume
_name
openstack volume show
durable_
volume
openstack volume show
$
volume
_name
elif
[[
$PHASE
==
'upgrade'
]]
;
then
elif
[[
$PHASE
==
'upgrade'
]]
;
then
openstack volume show
durable_
volume
openstack volume show
$
volume
_name
attach_and_detach_a_volume
durable_volu
me kolla_boot_test
attach_and_detach_a_volume
$volume_na
me
kolla_boot_test
delete_a_volume
durable_
volume
delete_a_volume
$
volume
_name
fi
fi
echo
"SUCCESS: Cinder volume upgrade stability (PHASE:
$PHASE
)"
echo
"SUCCESS: Cinder volume upgrade stability (PHASE:
$PHASE
)"
...
@@ -377,21 +393,25 @@ function test_instance_boot {
...
@@ -377,21 +393,25 @@ function test_instance_boot {
echo
"TESTING: Instance (Nova and Neutron) upgrade stability (PHASE:
$PHASE
)"
echo
"TESTING: Instance (Nova and Neutron) upgrade stability (PHASE:
$PHASE
)"
if
[[
$PHASE
==
'deploy'
]]
;
then
if
[[
$PHASE
==
'deploy'
]]
;
then
create_instance
kolla_
upgrade_
test
create_instance
$
upgrade_
instance_name
fip_addr
=
$(
create_fip
)
fip_addr
=
$(
create_fip
)
attach_fip
kolla_
upgrade_
test
${
fip_addr
}
attach_fip
$
upgrade_
instance_name
${
fip_addr
}
test_ssh
kolla_
upgrade_
test
${
fip_addr
}
# tested to see if the instance has not just failed booting already
test_ssh
$
upgrade_
instance_name
${
fip_addr
}
# tested to see if the instance has not just failed booting already
echo
${
fip_addr
}
>
/tmp/kolla_ci_pre_upgrade_fip_addr
echo
${
fip_addr
}
>
$fip_file
elif
[[
$PHASE
==
'upgrade'
]]
;
then
elif
[[
$PHASE
==
'upgrade'
]]
;
then
fip_addr
=
$(
cat
/tmp/kolla_ci_pre_upgrade_fip_addr
)
fip_addr
=
$(
cat
$fip_file
)
test_ssh
kolla_
upgrade_
test
${
fip_addr
}
test_ssh
$
upgrade_
instance_name
${
fip_addr
}
detach_fip
kolla_
upgrade_
test
${
fip_addr
}
detach_fip
$
upgrade_
instance_name
${
fip_addr
}
delete_fip
${
fip_addr
}
delete_fip
${
fip_addr
}
delete_instance
kolla_
upgrade_
test
delete_instance
$
upgrade_
instance_name
fi
fi
echo
"SUCCESS: Instance (Nova and Neutron) upgrade stability (PHASE:
$PHASE
)"
echo
"SUCCESS: Instance (Nova and Neutron) upgrade stability (PHASE:
$PHASE
)"
fi
fi
if
[[
$machine_type
==
"q35"
]]
;
then
unset_cirros_image_q35_machine_type
fi
}
}
function
test_openstack_logged
{
function
test_openstack_logged
{
...
@@ -399,6 +419,13 @@ function test_openstack_logged {
...
@@ -399,6 +419,13 @@ function test_openstack_logged {
.
~/openstackclient-venv/bin/activate
.
~/openstackclient-venv/bin/activate
test_smoke
test_smoke
test_instance_boot
test_instance_boot
# Check for x86_64 architecture to run q35 tests
if
[[
$(
uname
-m
)
==
"x86_64"
]]
;
then
set_cirros_image_q35_machine_type
test_instance_boot q35
unset_cirros_image_q35_machine_type
fi
}
}
function
test_openstack
{
function
test_openstack
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment