Move dnf.yml earlier in host configure workflow

Since kayobe is installing python3-pip in pip.yml - and dnf proxy is set
later, it fails on no-direct-internet systems.

Change-Id: I93f29ec4334829bfec107ba7aa6df05a47d2ab96
Story: 2008067
Task: 40750
Depends-On: https://review.opendev.org/748587
Depends-On: https://review.opendev.org/750804
This commit is contained in:
Michal Nasiadka 2020-08-26 12:46:08 +02:00 committed by Pierre Riteau
parent 7b60585134
commit 1094358033
4 changed files with 22 additions and 15 deletions

View File

@ -1,6 +1,8 @@
---
- name: Ensure DNF repos are configured
hosts: seed-hypervisor:seed:overcloud
vars:
ansible_python_interpreter: /usr/libexec/platform-python
tags:
- dnf
tasks:

View File

@ -406,11 +406,11 @@ class SeedHypervisorHostConfigure(KollaAnsibleMixin, KayobeAnsibleMixin,
* Allocate IP addresses for all configured networks.
* Add the host to SSH known hosts.
* Configure a user account for use by kayobe for SSH access.
* Configure package repos.
* Configure a PyPI mirror.
* Optionally, create a virtualenv for remote target hosts.
* Optionally, wipe unmounted disk partitions (--wipe-disks).
* Configure user accounts, group associations, and authorised SSH keys.
* Configure a PyPI mirror.
* Configure package repos.
* Configure the host's network interfaces.
* Set sysctl parameters.
* Configure timezone.
@ -448,11 +448,11 @@ class SeedHypervisorHostConfigure(KollaAnsibleMixin, KayobeAnsibleMixin,
playbooks = _build_playbook_list(
"ssh-known-host", "kayobe-ansible-user",
"pip", "kayobe-target-venv")
"dnf", "pip", "kayobe-target-venv")
if parsed_args.wipe_disks:
playbooks += _build_playbook_list("wipe-disks")
playbooks += _build_playbook_list(
"users", "dnf", "dev-tools", "network", "sysctl", "timezone",
"users", "dev-tools", "network", "sysctl", "timezone",
"mdadm", "luks", "lvm", "seed-hypervisor-libvirt-host")
self.run_kayobe_playbooks(parsed_args, playbooks,
limit="seed-hypervisor")
@ -560,11 +560,11 @@ class SeedHostConfigure(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin,
* Allocate IP addresses for all configured networks.
* Add the host to SSH known hosts.
* Configure a user account for use by kayobe for SSH access.
* Configure package repos.
* Configure a PyPI mirror.
* Optionally, create a virtualenv for remote target hosts.
* Optionally, wipe unmounted disk partitions (--wipe-disks).
* Configure user accounts, group associations, and authorised SSH keys.
* Configure a PyPI mirror.
* Configure package repos.
* Disable SELinux.
* Configure the host's network interfaces.
* Set sysctl parameters.
@ -599,11 +599,11 @@ class SeedHostConfigure(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin,
# Run kayobe playbooks.
playbooks = _build_playbook_list(
"ssh-known-host", "kayobe-ansible-user",
"pip", "kayobe-target-venv")
"dnf", "pip", "kayobe-target-venv")
if parsed_args.wipe_disks:
playbooks += _build_playbook_list("wipe-disks")
playbooks += _build_playbook_list(
"users", "dnf", "dev-tools", "disable-selinux", "network",
"users", "dev-tools", "disable-selinux", "network",
"sysctl", "ip-routing", "snat", "disable-glean", "timezone",
"mdadm", "luks", "lvm", "docker-devicemapper",
"kolla-ansible-user", "kolla-pip", "kolla-target-venv")
@ -931,11 +931,11 @@ class OvercloudHostConfigure(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin,
* Allocate IP addresses for all configured networks.
* Add the host to SSH known hosts.
* Configure a user account for use by kayobe for SSH access.
* Configure package repos.
* Configure a PyPI mirror.
* Optionally, create a virtualenv for remote target hosts.
* Optionally, wipe unmounted disk partitions (--wipe-disks).
* Configure user accounts, group associations, and authorised SSH keys.
* Configure a PyPI mirror.
* Configure package repos.
* Disable SELinux.
* Configure the host's network interfaces.
* Set sysctl parameters.
@ -968,11 +968,11 @@ class OvercloudHostConfigure(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin,
# Kayobe playbooks.
playbooks = _build_playbook_list(
"ssh-known-host", "kayobe-ansible-user",
"pip", "kayobe-target-venv")
"dnf", "pip", "kayobe-target-venv")
if parsed_args.wipe_disks:
playbooks += _build_playbook_list("wipe-disks")
playbooks += _build_playbook_list(
"users", "dnf", "dev-tools", "disable-selinux", "network",
"users", "dev-tools", "disable-selinux", "network",
"sysctl", "disable-glean", "disable-cloud-init", "timezone",
"mdadm", "luks", "lvm", "docker-devicemapper",
"kolla-ansible-user", "kolla-pip", "kolla-target-venv")

View File

@ -317,11 +317,11 @@ class TestCase(unittest.TestCase):
utils.get_data_files_path("ansible", "ssh-known-host.yml"),
utils.get_data_files_path(
"ansible", "kayobe-ansible-user.yml"),
utils.get_data_files_path("ansible", "dnf.yml"),
utils.get_data_files_path("ansible", "pip.yml"),
utils.get_data_files_path(
"ansible", "kayobe-target-venv.yml"),
utils.get_data_files_path("ansible", "users.yml"),
utils.get_data_files_path("ansible", "dnf.yml"),
utils.get_data_files_path("ansible", "dev-tools.yml"),
utils.get_data_files_path("ansible", "network.yml"),
utils.get_data_files_path("ansible", "sysctl.yml"),
@ -485,11 +485,11 @@ class TestCase(unittest.TestCase):
utils.get_data_files_path("ansible", "ssh-known-host.yml"),
utils.get_data_files_path(
"ansible", "kayobe-ansible-user.yml"),
utils.get_data_files_path("ansible", "dnf.yml"),
utils.get_data_files_path("ansible", "pip.yml"),
utils.get_data_files_path(
"ansible", "kayobe-target-venv.yml"),
utils.get_data_files_path("ansible", "users.yml"),
utils.get_data_files_path("ansible", "dnf.yml"),
utils.get_data_files_path("ansible", "dev-tools.yml"),
utils.get_data_files_path(
"ansible", "disable-selinux.yml"),
@ -1003,11 +1003,11 @@ class TestCase(unittest.TestCase):
utils.get_data_files_path("ansible", "ssh-known-host.yml"),
utils.get_data_files_path(
"ansible", "kayobe-ansible-user.yml"),
utils.get_data_files_path("ansible", "dnf.yml"),
utils.get_data_files_path("ansible", "pip.yml"),
utils.get_data_files_path(
"ansible", "kayobe-target-venv.yml"),
utils.get_data_files_path("ansible", "users.yml"),
utils.get_data_files_path("ansible", "dnf.yml"),
utils.get_data_files_path("ansible", "dev-tools.yml"),
utils.get_data_files_path(
"ansible", "disable-selinux.yml"),

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Fix an issue when dnf proxy is set and python3-pip package fails during
host configure.