Fix the DHCP validations

Some of the environments don't have virtualenv installed by default
which makes the `pip` module fail.

In addition, the latest release of scapy seems broken on RHEL (from
scapy.all import BOOTP raises an exception) so we explicitly specify an
older release that works.

Partial-Bug: #1634023
Change-Id: I5bfd1d38a647c6846d4889c0ec7a8a2d659f7647
This commit is contained in:
Tomas Sedovic 2016-11-14 18:27:58 +01:00
parent cda69b09e2
commit 32620fe025
2 changed files with 6 additions and 2 deletions

View File

@ -13,8 +13,10 @@
groups:
- pre-introspection
tasks:
- name: Install python-virtualenv
package: name=python-virtualenv state=present
- name: Install scapy
pip: name=scapy state=present virtualenv=/tmp/validations-venv
pip: name=scapy version=2.3.2 state=present virtualenv=/tmp/validations-venv
- name: Look up the introspection interface
ini: path=/etc/ironic-inspector/inspector.conf section=firewall key=dnsmasq_interface
register: interface

View File

@ -18,7 +18,9 @@
hiera: name="tripleo_undercloud_conf_file"
- name: Gather undercloud.conf values
undercloud_conf: undercloud_conf_path={{ tripleo_undercloud_conf_file }}
- name: Install python-virtualenv
package: name=python-virtualenv state=present
- name: Install scapy
pip: name=scapy state=present virtualenv=/tmp/validations-venv
pip: name=scapy version=2.3.2 state=present virtualenv=/tmp/validations-venv
- name: Look for DHCP responses
script: files/rogue_dhcp.py {{ undercloud_conf.DEFAULT.local_interface|default('eth1') }}