The openrc file is being sourced in a short lived
shell rather than in the shell of the sourcing code.
As a result the environment created by the 'source'
does not persist and the inventory request fails
which prevents collect from learning/validating
remote host names.
This update corrects that and makes the code block
involved in learning openrc variables a function
call rather than inline whenever collect_utils
is sourced.
Test Plan:
PASS: Verify collect all with no openrc already sourced
PASS: Verify collect select hosts (same no pre-openrc)
PASS: Verify collect self controller (same no pre-openrc)
PASS: Verify collect of self on compute
Change-Id: I41a097d9d751351f178a1366eb76dfb526c57b19
Closes-Bug: 1837412
Signed-off-by: Eric MacDonald <email address hidden>
Reviewed: https:/ /review. opendev. org/672149 /git.openstack. org/cgit/ starlingx/ integ/commit/ ?id=41e60486af8 3c76f5ac58c5c0b f30ee1835b9d7d
Committed: https:/
Submitter: Zuul
Branch: master
commit 41e60486af83c76 f5ac58c5c0bf30e e1835b9d7d
Author: Eric MacDonald <email address hidden>
Date: Mon Jul 22 15:15:23 2019 -0400
Fix sourcing openrc in collect
The openrc file is being sourced in a short lived
shell rather than in the shell of the sourcing code.
As a result the environment created by the 'source'
does not persist and the inventory request fails
which prevents collect from learning/validating
remote host names.
This update corrects that and makes the code block
involved in learning openrc variables a function
call rather than inline whenever collect_utils
is sourced.
Test Plan:
PASS: Verify collect all with no openrc already sourced
PASS: Verify collect select hosts (same no pre-openrc)
PASS: Verify collect self controller (same no pre-openrc)
PASS: Verify collect of self on compute
Change-Id: I41a097d9d75135 1f178a1366eb76d fb526c57b19
Closes-Bug: 1837412
Signed-off-by: Eric MacDonald <email address hidden>