summaryrefslogtreecommitdiffstats
path: root/xci
diff options
context:
space:
mode:
Diffstat (limited to 'xci')
-rwxr-xr-xxci/files/xci-destroy-env.sh18
-rw-r--r--xci/installer/osa/files/user_variables_xci.yml4
-rw-r--r--xci/playbooks/roles/create-vm-nodes/tasks/create_vm.yml8
-rw-r--r--xci/playbooks/roles/create-vm-nodes/tasks/prepare_libvirt.yml1
4 files changed, 20 insertions, 11 deletions
diff --git a/xci/files/xci-destroy-env.sh b/xci/files/xci-destroy-env.sh
index c95ea838..6c146b0a 100755
--- a/xci/files/xci-destroy-env.sh
+++ b/xci/files/xci-destroy-env.sh
@@ -24,17 +24,15 @@ rm -rf ${HOME}/.ansible
# Wipe repos
rm -rf ${XCI_CACHE}/repos
-# bifrost installs everything on venv so we need to look there if virtualbmc is not installed on the host.
-if which vbmc &>/dev/null || { [[ -e ${XCI_VENV}/bifrost/bin/activate ]] && source ${XCI_VENV}/bifrost/bin/activate; }; then
+if which ${XCI_VENV}/bin/vbmc &>/dev/null; then
# Delete all libvirt VMs and hosts from vbmc (look for a port number)
- for vm in $(vbmc list | awk '/[0-9]/{{ print $2 }}'); do
+ for vm in $(${XCI_VENV}/bin/vbmc list | awk '/[0-9]/{{ print $2 }}'); do
if which virsh &>/dev/null; then
- virsh destroy $vm &>/dev/null || true
- virsh undefine $vm &>/dev/null || true
+ virsh destroy $vm || true
+ virsh undefine $vm || true
fi
- vbmc delete $vm
+ ${XCI_VENV}/bin/vbmc delete $vm
done
- which vbmc &>/dev/null || { [[ -e /opt/stack/bifrost/bin/activate ]] && deactivate; }
fi
# Destroy all XCI VMs on all flavors
@@ -42,8 +40,8 @@ for varfile in ${flavors[@]}; do
source ${XCI_PATH}/xci/config/${varfile}-vars
for vm in ${NODE_NAMES}; do
if which virsh &>/dev/null; then
- virsh destroy $vm &>/dev/null || true
- virsh undefine $vm &>/dev/null || true
+ virsh destroy $vm &> /dev/null || true
+ virsh undefine $vm &> /dev/null || true
fi
done
done
@@ -84,5 +82,7 @@ service ironic-conductor start || true
service ironic-inspector restart || true
rm -rf ${XCI_VENV}
+# We also need to clear up previous vbmc config dirs
+rm -r ${HOME}/.vbmc
# vim: set ts=4 sw=4 expandtab:
diff --git a/xci/installer/osa/files/user_variables_xci.yml b/xci/installer/osa/files/user_variables_xci.yml
index 65e09bb4..1d69f532 100644
--- a/xci/installer/osa/files/user_variables_xci.yml
+++ b/xci/installer/osa/files/user_variables_xci.yml
@@ -13,5 +13,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-opensuse_mirror_obs: "http://ftp.gwdg.de/pub/opensuse"
-opensuse_mirror: "http://mirrors.rit.edu/opensuse"
+debug: False
+install_method: source
diff --git a/xci/playbooks/roles/create-vm-nodes/tasks/create_vm.yml b/xci/playbooks/roles/create-vm-nodes/tasks/create_vm.yml
index ab427c69..008e5531 100644
--- a/xci/playbooks/roles/create-vm-nodes/tasks/create_vm.yml
+++ b/xci/playbooks/roles/create-vm-nodes/tasks/create_vm.yml
@@ -103,11 +103,15 @@
# with a custom Ansible module using vbmc Python API
- name: get list of nodes from virtualbmc
command: vbmc list
+ environment:
+ PATH: "{{ lookup('env', 'XCI_VENV') }}/bin"
register: vbmc_list
# NOTE(NobodyCam): Space at the end of the find clause is required for proper matching.
- name: delete vm from virtualbmc if it is there
command: vbmc delete {{ vm_name }}
+ environment:
+ PATH: "{{ lookup('env', 'XCI_VENV') }}/bin"
when: vbmc_list.stdout.find(vm_name) != -1
- set_fact:
@@ -115,9 +119,13 @@
- name: plug vm into vbmc
command: vbmc add {{ vm_name }} --libvirt-uri {{ vm_libvirt_uri }} --port {{ virtual_ipmi_port }}
+ environment:
+ PATH: "{{ lookup('env', 'XCI_VENV') }}/bin"
- name: start virtualbmc
command: vbmc start {{ vm_name }}
+ environment:
+ PATH: "{{ lookup('env', 'XCI_VENV') }}/bin"
- name: get XML of the vm
virt:
diff --git a/xci/playbooks/roles/create-vm-nodes/tasks/prepare_libvirt.yml b/xci/playbooks/roles/create-vm-nodes/tasks/prepare_libvirt.yml
index e09e2d6b..a4fef469 100644
--- a/xci/playbooks/roles/create-vm-nodes/tasks/prepare_libvirt.yml
+++ b/xci/playbooks/roles/create-vm-nodes/tasks/prepare_libvirt.yml
@@ -117,3 +117,4 @@
- name: install virtualbmc
pip:
name: virtualbmc
+ virtualenv: "{{ lookup('env', 'XCI_VENV') }}"