Update jobs resolving runtime issues

The requiurements in tests needs the python package netaddr to wrap
and filter IP addresses, while this package is assumed to be installed
when ansible is installed via the package manager, these assumptions
are not true when installing using pip, like we do in test. This change
ensures that the netaddr package is part of the test environment.

An update has been made to allow the tripleo_container_stop role to
pass one of its tests. The shell command to stop containers was
prefixing the container name which would result in a failure to stop
the given container name in a production environment.

Test packages have been added to the tripleo_ptp molecule tests. These
packages are being added so that we can ensure the test container
images are created with everything assumed to be installed on a running
system.

Change-Id: If704272fb44cff35e7093c5f91ff1b48fd20a91e
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This commit is contained in:
Kevin Carter 2019-08-15 17:08:33 -05:00 committed by Kevin Carter (cloudnull)
parent c5f7f2d0d5
commit bf83dc8a87
3 changed files with 9 additions and 4 deletions

View File

@ -8,6 +8,7 @@ pytest-html
pytest-xdist
mock
molecule>=2.22rc1
netaddr
# this is required for the docs build jobs
sphinx

View File

@ -1,14 +1,18 @@
---
- name: Make sure the container {{ container }} is stopped even if container_cli do not match
become: true
shell: |
shell: |-
# We need to make sure that containers are stopped
# as we might have different CLIs to interact with
# them. I.e the container_cli might be setted to be podman
# but we might have the containers running with docker.
set -eu
if command -v podman && podman exec {{ container }} /bin/true; then
systemctl stop tripleo_{{ container }}.service
if systemctl status {{ container }}.service; then
systemctl stop {{ container }}.service
else
podman kill {{ container }}
fi
fi
if type docker &> /dev/null && docker exec {{ container }} /bin/true; then
docker stop {{ container }}

View File

@ -9,7 +9,7 @@ platforms:
hostname: centos7
image: centos:7
dockerfile: Dockerfile
pkg_extras: python-setuptools ntp
pkg_extras: python-setuptools ntp cronie rsyslog
easy_install:
- pip
environment: &env
@ -29,7 +29,7 @@ platforms:
hostname: fedora28
image: fedora:28
dockerfile: Dockerfile
pkg_extras: python*-setuptools ntp
pkg_extras: python*-setuptools ntp cronie rsyslog
environment:
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"