-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch describes the required steps to adopt the OpenStack Image Service (Glance) with a Swift backend. It also improves the testsuite to make sure we can cover such scenario. Signed-off-by: Francesco Pantano <[email protected]>
- Loading branch information
Showing
6 changed files
with
202 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# glance_backend can be 'local' or 'ceph' | ||
# glance_backend can be 'local', 'ceph' or 'swift' | ||
glance_backend: local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
- name: Check the resulting Glance | ||
block: | ||
- name: wait for Glance to start up | ||
ansible.builtin.shell: | | ||
{{ shell_header }} | ||
{{ oc_header }} | ||
STATUS=$(oc get pod --selector=service=glance -o jsonpath='{.items[*].status.phase}{"\n"}'); | ||
code=1 | ||
IFS=" " read -r -a STATUS <<< "$STATUS" | ||
for i in "${STATUS[@]}"; do | ||
if echo "$i" | grep -v Running; then | ||
# if at least one instance is not Running, return | ||
exit $code | ||
else | ||
code=0 | ||
fi | ||
done | ||
exit $code | ||
register: glance_running_result | ||
until: glance_running_result is success | ||
retries: 60 | ||
delay: 2 | ||
|
||
- name: check that Glance is reachable and its endpoints are defined | ||
ansible.builtin.shell: | | ||
{{ shell_header }} | ||
{{ oc_header }} | ||
alias openstack="oc exec -t openstackclient -- openstack" | ||
${BASH_ALIASES[openstack]} endpoint list | grep glance | ||
${BASH_ALIASES[openstack]} image list | ||
register: glance_responding_result | ||
until: glance_responding_result is success | ||
retries: 15 | ||
delay: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters