Fix used paths to match custom working dir
Stackrc is used to be referred via the working_dir path. Fix the $HOME or /home/{{ undercloud_user }} paths, which only mathche the default working dir of /home/stack. Fix openssl commands to refer server-req.pem et al from the working_dir instead of the current dir. Additionally, when containerized undercloud, copy stackrc created by the tripleoclient at the UC user $HOME to the working dir, where it is expected by quickstart, if given a custom working dir. Change-Id: Ic5834dbf66471802eb5a9319718d3ba02548236c Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
This commit is contained in:
parent
cb23aba7b6
commit
e4621e8471
@ -27,9 +27,9 @@ find ~jenkins -iname tripleo-overcloud-passwords -execdir cat '{}' ';'
|
||||
sudo systemctl list-units --full --all
|
||||
|
||||
|
||||
if [ -e /home/{{ undercloud_user }}/stackrc ] ; then
|
||||
if [ -e {{ working_dir }}/stackrc ] ; then
|
||||
bash <<-EOF &>/var/log/postci.txt
|
||||
source /home/{{ undercloud_user }}/stackrc
|
||||
source {{ working_dir }}/stackrc
|
||||
openstack <<-EOC
|
||||
server list -f yaml
|
||||
workflow list -f yaml
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source ${HOME}/stackrc
|
||||
source {{ working_dir }}/stackrc
|
||||
|
||||
# We did not have OVERCLOUD_ROLES var in the newton version of the
|
||||
# get-occ-config script. Instead we need to use CONTROLLER_HOSTS var.
|
||||
|
@ -1,2 +1,2 @@
|
||||
source $HOME/stackrc
|
||||
source {{ working_dir }}/stackrc
|
||||
openstack stack resource list -n5 overcloud | grep -v COMPLETE
|
||||
|
@ -187,7 +187,7 @@ introspect()
|
||||
done
|
||||
|
||||
set +e
|
||||
timeout $1 bash -c -- 'source $HOME/stackrc; \
|
||||
timeout $1 bash -c -- 'source {{ working_dir }}/stackrc; \
|
||||
on_count=$(openstack baremetal node list -f json|jq -r ".[]| select(.[\"Power State\"] == \"power on\")| .[\"UUID\"]" | wc -l) ; \
|
||||
while [ $on_count -gt 0 ]; do \
|
||||
sleep 30s; \
|
||||
|
@ -48,7 +48,7 @@ openssl rsa -in {{ working_dir }}/server-key.pem \
|
||||
## the certificate
|
||||
## ::
|
||||
|
||||
openssl x509 -req -in server-req.pem -days 365 \
|
||||
openssl x509 -req -in {{ working_dir }}/server-req.pem -days 365 \
|
||||
-CA {{ working_dir }}/overcloud-cacert.pem \
|
||||
-CAkey {{ working_dir }}/overcloud-ca-privkey.pem \
|
||||
-set_serial 01 -out {{ working_dir }}/server-cert.pem \
|
||||
|
@ -27,3 +27,13 @@
|
||||
line: "export OS_PASSWORD={{ undercloud_admin_password.stdout }}"
|
||||
regexp: "OS_PASSWORD"
|
||||
|
||||
- name: Copy stackrc created at the UC user $HOME to the working dir
|
||||
tags:
|
||||
- undercloud-post-install
|
||||
copy:
|
||||
src: /home/{{ undercloud_user }}/stackrc
|
||||
dest: "{{ working_dir }}/stackrc"
|
||||
owner: "{{ undercloud_user }}"
|
||||
mode: 0640
|
||||
become: true
|
||||
when: containerized_undercloud|bool
|
||||
|
Loading…
Reference in New Issue
Block a user