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
cc73e9ee
Commit
cc73e9ee
authored
1 year ago
by
Zuul
Committed by
Gerrit Code Review
1 year ago
Browse files
Options
Downloads
Plain Diff
Merge "Revert "CI: retry smoke tests and instance creation""
parents
9dc2b019
3d228bf1
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
+11
-67
11 additions, 67 deletions
tests/test-core-openstack.sh
with
11 additions
and
67 deletions
tests/test-core-openstack.sh
+
11
−
67
View file @
cc73e9ee
...
@@ -8,52 +8,11 @@ set -o pipefail
...
@@ -8,52 +8,11 @@ set -o pipefail
export
PYTHONUNBUFFERED
=
1
export
PYTHONUNBUFFERED
=
1
function
test_smoke
{
function
test_smoke
{
attempts
=
10
openstack
--debug
compute service list
openstack
--debug
network agent list
for
i
in
$(
seq
1
${
attempts
}
)
;
do
openstack
--debug
orchestration service list
if
openstack
--debug
compute service list
;
then
break
elif
[[
$i
-eq
${
attempts
}
]]
;
then
echo
"Failed to list compute services after
${
attempts
}
attempts"
else
echo
"Cannot list compute services, retrying"
fi
sleep
10
done
for
i
in
$(
seq
1
${
attempts
}
)
;
do
if
openstack
--debug
network agent list
;
then
break
elif
[[
$i
-eq
${
attempts
}
]]
;
then
echo
"Failed to list network services after
${
attempts
}
attempts"
else
echo
"Cannot list network services, retrying"
fi
sleep
10
done
for
i
in
$(
seq
1
${
attempts
}
)
;
do
if
openstack
--debug
orchestration service list
;
then
break
elif
[[
$i
-eq
${
attempts
}
]]
;
then
echo
"Failed to list orchestration services after
${
attempts
}
attempts"
else
echo
"Cannot list orchestration services, retrying"
fi
sleep
10
done
if
[[
$SCENARIO
==
"cephadm"
]]
||
[[
$SCENARIO
==
"zun"
]]
;
then
if
[[
$SCENARIO
==
"cephadm"
]]
||
[[
$SCENARIO
==
"zun"
]]
;
then
for
i
in
$(
seq
1
${
attempts
}
)
;
do
openstack
--debug
volume service list
if
openstack
--debug
volume service list
;
then
break
elif
[[
$i
-eq
${
attempts
}
]]
;
then
echo
"Failed to list volume services after
${
attempts
}
attempts"
else
echo
"Cannot list volume services, retrying"
fi
sleep
10
done
fi
fi
}
}
...
@@ -207,28 +166,13 @@ function create_instance {
...
@@ -207,28 +166,13 @@ function create_instance {
server_create_extra
=
"
${
server_create_extra
}
--config-drive True"
server_create_extra
=
"
${
server_create_extra
}
--config-drive True"
fi
fi
attempts
=
10
openstack server create
--wait
--image
cirros
--flavor
m1.tiny
--key-name
mykey
--network
demo-net
${
server_create_extra
}
${
name
}
for
i
in
$(
seq
1
${
attempts
}
)
;
do
# If the status is not ACTIVE, print info and exit 1
if
openstack server create
--wait
--image
cirros
--flavor
m1.tiny
--key-name
mykey
--network
demo-net
${
server_create_extra
}
${
name
}
;
then
if
[[
$(
openstack server show
${
name
}
-f
value
-c
status
)
!=
"ACTIVE"
]]
;
then
# If the status is not ACTIVE, print info, delete instance (for recreation) and exit 1
echo
"FAILED: Instance is not active"
# if exceeded number of attempts
openstack
--debug
server show
${
name
}
if
[[
$(
openstack server show
${
name
}
-f
value
-c
status
)
!=
"ACTIVE"
]]
;
then
return
1
echo
"FAILED: Instance is not active"
fi
openstack
--debug
server show
${
name
}
openstack server delete
${
name
}
if
[[
$i
-eq
${
attempts
}
]]
;
then
echo
"Failed to create instance after
${
attempts
}
attempts"
exit
1
fi
else
break
fi
else
echo
"Cannot create instance, retrying"
openstack server delete
${
name
}
fi
sleep
10
done
}
}
function
delete_instance
{
function
delete_instance
{
...
...
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