Fix venv build fallback mechanism
Fixes the ability to deploy a venv in cases where: 1) developer_mode is not enabled 2) A cached venv is not downloaded from the repo server Also introduced is a var that can be used to disable the cached venv download attempt entirely and force the fallback behavior. Previously that would have been available by simply setting the venv download to some broken URL like "http://localhost/none", but keystone_venv_download will allow for much easier disabling of the cached venv download behavior. Change-Id: Ifb07eb2a73cc3478a36177d53a9a2b0579da4e12
This commit is contained in:
parent
2635e43c09
commit
88bbcc8deb
@ -37,6 +37,9 @@ keystone_developer_constraints:
|
||||
keystone_venv_tag: untagged
|
||||
keystone_bin: "/openstack/venvs/keystone-{{ keystone_venv_tag }}/bin"
|
||||
|
||||
# venv_download, even when true, will use the fallback method of building the
|
||||
# venv from scratch if the venv download fails.
|
||||
keystone_venv_download: "{{ not keystone_developer_mode | bool }}"
|
||||
keystone_venv_download_url: http://127.0.0.1/venvs/untagged/ubuntu/keystone.tgz
|
||||
|
||||
keystone_fatal_deprecations: False
|
||||
|
@ -191,7 +191,7 @@
|
||||
dest: "/var/cache/{{ keystone_venv_download_url | basename }}"
|
||||
checksum: "sha1:{{ lookup('url', keystone_venv_download_url | replace('tgz', 'checksum')) }}"
|
||||
register: keystone_get_venv
|
||||
when: not keystone_developer_mode | bool
|
||||
when: keystone_venv_download | bool
|
||||
|
||||
- name: Remove existing venv
|
||||
file:
|
||||
@ -213,7 +213,7 @@
|
||||
copy: "no"
|
||||
when:
|
||||
- not keystone_developer_mode | bool
|
||||
- keystone_get_venv | changed or keystone_venv_dir | changed
|
||||
- keystone_get_venv | changed
|
||||
notify:
|
||||
- Restart Keystone APIs on first node
|
||||
- Restart Keystone APIs on other nodes
|
||||
@ -234,7 +234,7 @@
|
||||
until: install_packages|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
when: keystone_developer_mode | bool
|
||||
when: not keystone_get_venv | success or keystone_developer_mode | bool
|
||||
notify:
|
||||
- Restart Keystone APIs on first node
|
||||
- Restart Keystone APIs on other nodes
|
||||
|
Loading…
x
Reference in New Issue
Block a user