As described in related-bug the tripleo-repos gate is blocked
on failing tox-cover and tox-sanity-py39 jobs.
The verbose logging test is a nice to have but not critical and we
already have py39 coverage with openstack-tox-py39. The verbose log
test can be re-enabled once we have a fix but for now we need to
unblock the gate.
Related-Bug: 2002112
Change-Id: Ia7a1e840f878def13e454c44741fb30702d8a975
It fixes:
- Mirror map for ubi9, rhel9
- fallback to centos(8,9) if ubi(8,9) distros are used.
- Look for both ubi8 and ubi9 where ubi8 is previously defined.
Closes-Bug: #1979178
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Change-Id: I530b4671154e975d527cb380eda8304fec0a7f82
https://review.opendev.org/c/openstack/tripleo-ansible/+/839688
moves the molecule job to use ubi9 image.
The molecule jobs are failing with missing packages as repos
are not properly configured.
Adding support for the same fixes the issue.
Bumping ansible version (which is supported in CI ) under tox.ini,
as latest version of ansible-2.13 broke the sanity job.
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Change-Id: I71572446cc8edb9f0bce3368fb03e4f2d3488801
Since Python 2.7 is gone EOL long time ago and C7 train is no
longer maintained, so removing it.
Python-3.6 is no longer works with Zed release so dropping it
and switching it to zed template.
From tox sanity environment, ansible-core-2.13 is getting
installed. In order to override that, we need to strictly
define it under tox sanity environment.
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Change-Id: Id9b01070b8d187b85b9efade4af548871b2ad369
This replaces the ubi-8 container build job with the centos9 content
provider. Also replace the overcloud-full with hardened-uefi since
that is now default for master/wallaby.
Depends-On: https://review.opendev.org/c/openstack/tripleo-ci/+/826317
Change-Id: Ib3fbf6a0ed3e196893add875d6901b4dfd925827
The 8 repos are now gone 404. Until the proper 8-stream repo is
available we can use the rdo temp repo for now to unblock gates.
Related-Bug: 1959656
Change-Id: Ic75b8a6b4bb9172a4e06370380a113df593990fe
When the output path is not /etc/yum.repos.d, the repo files won't be
used to install packages on this host, so there is no need to be
strict about host OS name validation.
This is useful when building CentOS images from a Fedora workstation.
If the host /etc/yum.repos.d is not used, the host distro is not
actually relevant.
Change-Id: I02b7a2a0d5dc6849fa04e298bce18657a9213621
When Ceph Nautilus is used (Train/Victoria/Ussuri) Centos 8 repos
should be kept.
This is required because Nautilus has never been migrated to 8-stream.
Closes-Bug: #1958782
Change-Id: I8724c7225441a7717d189c19d63d3169239a91e8
In CentOS 9 stream the ceph repos are part of a SIGs namespace.
Additionally CentOS 8 is now stream only so we should use the 8-stream
version of the storage repos.
Change-Id: I015145ce615bffbd1ef0c76814688de4514b29a9
This patch adds support for CentOS Stream 9 in tripleo-repos
operation.
Co-Authored-By: Douglas Viroel <dviroel@redhat.com>
Change-Id: I0aa9c3c4feec9065c1d823e2bb783f4286304ddb
When preparing repos it doesn't make sense to validate 'stream'
for any distro except centos 8. Centos 9 is stream only and all
before 8 don't have a stream.
Change-Id: If6911737bf423806d1ec84ee4a5d147e74521719
This patch extends the yum-config to try to update a section if it
already exists when generation compose-repos. This allows scripts to
update an existing repo from a compose-url, and also update any option
based on environment variables.
This patch also avoids compose-repos to fail when a file to be disabled
does not exists anymore.
Change-Id: I7365f7918f3ffabdd47339ad38dd97f641fe5e31
Signed-off-by: Douglas Viroel <dviroel@redhat.com>
After refactoring the log function to tripleo-repos utils[1], the module
name 'tripleo-get-hash' become hardcoded in load_logging function.
Now, this function accepts the module name as parameter.
[1]: https://review.opendev.org/c/openstack/tripleo-repos/+/815991
Change-Id: I6840870cf5b55ee1d47e3634009f1c5ec7045b6f
Signed-off-by: Douglas Viroel <dviroel@redhat.com>
yum-config now support downloading a repo file from a url and
make updates on its options.
A new parameter 'down-url' was added to the cli and ansible module.
Change-Id: I6dba307be5e66892ecfba04df7766ae8dbbfa71e
Signed-off-by: Douglas Viroel <dviroel@redhat.com>
This patch moves common functions like http_get and
logging to tripleo_repos.utils so they can be used by
any module.
Change-Id: I8bdd11c45f30a70e2fe3349f7eecb89f4751931f
Signed-off-by: Douglas Viroel <dviroel@redhat.com>
We are now consuming this as an ansible collection but it seems
we overlooked the setuptools setup.cfg install. For starters we
need the ansible module paths. Added a note to get_hash doc
about using --user for python setup.py install.
The depends-on is needed for the failing ubi-8 build job and is
not related to the change made here.
Depends-On: https://review.opendev.org/c/openstack/tripleo-ci/+/814400
Change-Id: Ie5655bea08e21ce59f259832fd16cd713f90c916
Updates the get-hash constants to allow centos9 and rhel9 as valid
choices for the os-version parameter. Adds a new test case that
tests all the valid values.
Change-Id: I93af3f7bd0b536cb3b3131b5a9d03a5c5b9731b6
CentOS-7 molecule jobs were recently disabled [1] after start failing
in get_hash tests. The proposed fix is update ca-certificates package
to avoid SSL issues originated from expired CA certificates.
[1] https://review.opendev.org/c/openstack/tripleo-repos/+/812125
Change-Id: I6508eb0795116f0a9aa6aa8c2edc589faa2039a6
Signed-off-by: Douglas Viroel <dviroel@redhat.com>
As seen at [1] this has started failing again now for get-hash.
If I skip c7 from the get-hash molecule then nothing else will run
they are already skipped. So instead just remove the c7 job for
now. TBD if we can/want to continue supporting python2.
Our CI centos7 jobs are using py3 already.
[1] https://zuul.opendev.org/t/openstack/build/a1d1693e963b42e3ae1e9cb44ea1f190
Change-Id: I4f8121c57c80d68a4233a4bc86fa86dc0f120913
This patch adds a couple of improvements to yum-config module:
- change the default behavior for yum-config repo,
which now tries to update an existent configuration file and,
if the file does not exists, create a new one.
- Adds more options to repo config operation.
- Check OS version info before enable dnf-manager command.
- Add python2 support to yum-config 'repo' and 'global'.
- Update molecule to run yum-config 'repo' and 'global' tests
for CentOS-7
Change-Id: I654fb32ad4e987b43baea17641aa60de86a78ff9
Signed-off-by: Douglas Viroel <dviroel@redhat.com>
This patch adds more unit test to yum-config module and validations
to molecule verify step.
Change-Id: Icf4cd8463bcc5b466a6b0882e072874639ce117a
Signed-off-by: Douglas Viroel <dviroel@redhat.com>
This patch extends yum-config funcionality to provide a module that
generates compose repos based on a compose URL.
Co-authored-by: Bhagyashri Shewale <bshewale@redhat.com>
Change-Id: I9f8dbede85e1c60de3a86991abcd53fc86444155
Signed-off-by: Douglas Viroel <dviroel@redhat.com>
When dlrn_url is overridden it is being ignored and instead the
default is used. This makes it that the passed config is honored.
Adds molecule test case to check vanilla invocation and test
that passed dlrn_url is honored - test cases brought from WIP
patch in [1].
Co-Authored-By: Sorin Sbarnea <ssbarnea@redhat.com>
[1] https://review.opendev.org/c/openstack/tripleo-repos/+/807700
Change-Id: Ie5354421a470e5a528307694b49f4e8d2bc24ddc
- symlink sanity ignore files
- exclude tests/unit from collection as they were causing multiple
violations on sanity
- remove README.rst from collections as they can only have the README.md
- make sanity job voting to prevent regressions
Change-Id: Ifad87a22bec86734e9db4270f4de368ca91b1f67
- fixes import typo that prevented module_utils from importing
- avoids reading config.yaml as ansiballz does not include data files
- ensure module works (tox -e packaging)
- replace use of requests library inside ansible module
Change-Id: I86495c7da8584d5811f32178bbd985cf5f864323
This patch adds small improvements to the yum-config ansible
module:
- use type 'path' instead of 'str' for file/dir paths
- use ansible 'requires_if' instead of generic sanity check
- always convert 'set_options' dict values to str
- other minor changes
Change-Id: If1ecb05cf5beb765decf6ac7827794c30040fc6b
Signed-off-by: Douglas Viroel <dviroel@redhat.com>
Adds non-voting check jobs for ansible-test sanity and fixing many
problems identified by these. We will sort the other problems in
follow-up(s) and make the job voting. This approach will ease
reviewing and prevent creating conflicts with other pending changes.
Story: https://projects.engineering.redhat.com/browse/TRIPLEOCI-559
Change-Id: I29ce27114e0675fb5d00614df506675bfbe5bf96
- assures ansible modules are not included in sdist/wheel
- makes tripleo-repos a collection with tripleo_repos python being
vendored inside module_utils
- use a symlink from triple_repo to plugins/module_utils/triple_repos
for convenience. Note that we cannot do the other way around because
galaxy build does not follow symlinks, but pbr does not
have any problem following the symlink.
- extend packaging testing to install collection and test Ansible can
find the new modules
- updates the excludes inside galaxy.yml to avoid accidental inclusion
of undesired files when building the collection.
- ensure we have consistent and logic names, making easy to use
fully qualified ansible module names: tripleo.repos.get_hash and
triple.repos.yum_config.
Change-Id: I743552a149513868de77cad0855a5c0dc0ae0f71
- Make newly added get_hash and yum_config modules part of
triple_repos package.
- add simple packaging testing environment, which should validate
installation of the command line
- moves tests/docs/examples in official location required by
ansible-test
- includes required fix for looking up for local config.yaml
Change-Id: I134ef8ac4c31b98dc25d17ab058af1ed34e27f32