Json callback now expects the log directory to
be $HOME/validations. Just as defined in the validations libs.
Depends-On: https://review.opendev.org/c/openstack/validations-libs/+/795093
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: Id1d39fd907eb154a601da68e9f75756cccfbf91c
The ansible 'reduce' function is itself imported from the functools:
https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/six/__init__.py#L273
And thus provides exactly the same functionality.
Furthermore, the functools is part of python lib since 2.7,
so the result should be compatible across all of our releases.
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I981512fa81f0eb2aac0a50a4709c517cce794fa8
This patch updates the information about the `#tripleo` IRC channel
after the OFTC migration and adds our brand new channel at Libera named
`#validation-framework`.
Change-Id: I48e856b688b9e724ca49858d4aca0d3f32ca2de2
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
The variable storing start time of playbook run was named 't0'.
While perfecly fine from a functional standpoint,
and also in statistics and physics with subscript,
it is nonetheless a bit hard on the eye.
Tests were adjusted to reflect new var name.
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: Ie0796b1dcb8beacc08755fa04ff3cd4dd884ef59
This patch also adds molecule-podman driver as a requirement
because molecule >=3.2 stopped installing it by default.
Change-Id: Icf249d47496588a966ffd13b5affebada95d33d0
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
The usage of the component variable for the local and check jobs is
dangerous since this variable is used by the whole component chain for TripleO.
This review renamed it to validation_component.
Change-Id: Icd8e64282306479a84fc6240142ddcb28ce433e5
This patch relaxes the Jinja2 constraint since they recently released
the 3.0.1 and this latter is in the upper-constraints.
Related-Bug: #1929420
Change-Id: I55bd4ad75a925e5bdcb13b235dd2ee6f756ab318
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
All required packages now have licence listed
next to their respective designations.
Licence information was pulled from pip show command
or from package repository, in cases where pip didn't
offer sufficient information.
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I296be2577c85a33c91e2156ec1b36762526d599c
Addition of .dockerignore considerably reduces the size
of newly created containers, as well as time needed for
building them.
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: Ifa94774862c2364483454a648377b0f333b72b99
Zuul job queries the requirements.txt and the relevant
spec file using the `rdopkg reqcheck` to find discrepancies
in the listed dependencies.
Just like the original `rdopkg-reqcheck` this job is non-voting.
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I45043407b38bdcd0c0a38b30b65b5d5f70cae76d
fetch_validations role detects presence of the new
log folder, created via the new log path mechanism
introduced in the 36c9b8cbcbdfe35ba9b10b72c5b52a56c4ce9099
of the validations-libs.
The task should be removed once the related validations-libs
patch is safely merged.
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I1a49dc16f65652ad7b1d9736d333c502d563870a
validate-files.py now also checks required attributes
of callback plugins. At this time, only two commonly used
attributes are checked, because not all of our plugins
correctly declare type and documentation.
Main loop of the script was adjusted to work with multiple
types of files to validate, and to minimize unnecessary checks.
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I2c92b77f127a82afaf28a3dd5ebfb9e3614bbb07
Value set to 'True' in order to prevent writing to
our logging dir by other processes using ansible callback
handling routines.
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I6e13a6b42ba97b5ce850bc8c37d112ada7c09cd2
[1] has been merged and released[2] in upstream tox-ansible and it is now
able to manage global molecule configuration. The workaround, which
consisted in adding the molecule driver name in each scenarios
molecule.yml files, is not necessary anymore.
This patch also removes all the relative symlink to the Dockerfile and
adds directly in the global molecule configuration file.
[1] https://github.com/ansible-community/tox-ansible/pull/89
[2] https://github.com/ansible-community/tox-ansible/releases/tag/v1.5.0
Change-Id: I8ac3f731c9d6af983dd902fc94e06a07c2ab9954
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
'agregate' callback type is not an official callback type for
Ansible. It should be 'aggregate' with two g instead of one.
This patch fixes that issue.
Change-Id: Ieb1554a455017a0ed8c252fe414ea7479544a028
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
This patch adds a custom callback to the execution of the check-cpu and
check-ram validations.
Change-Id: Ic9391998dcad74dd82cab4c29de46343663225c6
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
This patch fixes the targeting hosts for the validations which should be
executed locally.
Rationale: When those validations are executed in the TripleO world,
they are executed on all the nodes including the Overcloud nodes. For
instance, check-ram and check-cpu validations check the Red Hat
recommendations for the Undercloud only and shouldn't be checking the
Overcloud nodes.
Change-Id: Icca554ea4392c3b0b572b27c2e2370b11f8013d7
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
Sync doesn't loop over the dir, instead it pulls
all files directly.
There is no need for loop in this case,
as we have only one element to iterate over.
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I05606bfdb7fb2191cfe7590a432b7817b3cb35f2
The artifact directory where we collect details of
the validations execution from the ansible perspective
is now set as a variable, with the default value
in defaults/main.yaml
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I52d0bf261dd8eeeeb2817cd8f833937ef3c7ab93
Callbacks might undergo significant changes
in the near future. Tests will have to be adjusted.
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I79ea4d8d07f8cb851af1d0c1fd4dec3ab3c6709c
Checks for presence of required atributes,
basic functionality of the init method
and the current_time module function.
Closes-Bug: #1922726
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I2e9a4640fad0f9c44b5503d53ea2613a416c6e18
This patch adds a molecule configuration file at the repository
level (validations-common/.config/molecule/config.yml) which defines
all the default values for molecule.yml files in all roles.
This patch also introduces a common Dockerfile (UBI8 image) shared
between all the role molecule tests. This Dockerfile will install the
CentOS 8.x Linux Repos and GPG Keys during the image build.
This Dockerfile is located in validations-common/.config/molecule
directory and it is shared through a relative symbolic link between all
the molecule directories.
NOTE: tox-ansible doesn't manage shared molecule configuration at the
project level (see [1]). To be able to use it, we have to explicitly add
the driver name in each molecule.yml file in the roles level. Once [1]
will be fixed, these will be removed.
[1] - https://github.com/ansible-community/tox-ansible/issues/88).
Change-Id: I907e2a13a3ba3b152ad7036fa1bb249bec980b76
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>