tripleo-bootstrap requires connectivity before networking is set up

Bug #1959731 reported by Harald Jensås
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Harald Jensås

Bug Description

Deploying the stack fails in Ansible task
 "Deploy network-scripts required for deprecated network service"

This happens because the yum repositories are not accessible.
This only happens in the scenario where the overcloud image has been customized with additional repositories trough image manipulation or by using cloud-init.

If the ctlplane network is isolated, i.e not routed, no default gateway.

The ansible 'package' module will fail because the host cannot connect to the repositories. Despite the fact that the network-scripts package is in fact present.

Revision history for this message
Harald Jensås (harald-jensas) wrote :

I tried to reprodece this, but `package` did not fail for me with the node isolated.

$ ip route del default

$ dnf info network-scripts
delorean-openstack-ironic-python-agent-builder-a08dcb4c36ee464ffc0825f770686a4 0.0 B/s | 0 B 00:00
Errors during downloading metadata for repository 'delorean-component-baremetal':
  - Curl error (6): Couldn't resolve host name for https://trunk.rdoproject.org/centos8/component/baremetal/a0/8d/a08dcb4c36ee46
4ffc0825f770686a47ed86c570_a36069e8/repodata/repomd.xml [Could not resolve host: trunk.rdoproject.org]
Error: Failed to download metadata for repo 'delorean-component-baremetal': Cannot download repomd.xml: Cannot download repodata
/repomd.xml: All mirrors were tried

$ rpm -q network-scripts
network-scripts-10.00.15-1.el8.x86_64

Ran this playbook:
---
- name: Reproduce RHBZ#2048134
  hosts: localhost
  gather_facts: false
  vars:
    tripleo_bootstrap_legacy_network_packages:
      - network-scripts
  tasks:
  - name: Install package
    become: true
    package:
      name: "{{ tripleo_bootstrap_legacy_network_packages }}"
      state: present

$ ansible-playbook reproducer.yaml
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [Reproduce RHBZ#2048134] ****************************************************************************************

TASK [Install package] *****************************************************************
ok: [localhost]

PLAY RECAP *****************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-ansible (master)
Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-ansible (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/827567

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-ansible (master)

Change abandoned by "Ronelle Landy <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/827383

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-ansible (master)

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/827383
Committed: https://opendev.org/openstack/tripleo-ansible/commit/37fac649388e0bf39326bdaaefa5a104b6ef264c
Submitter: "Zuul (22348)"
Branch: master

commit 37fac649388e0bf39326bdaaefa5a104b6ef264c
Author: Harald Jensås <email address hidden>
Date: Wed Feb 2 02:07:07 2022 +0100

    tripleo-bootstrap - check packeges fact befor install

    When repository files are present, but the ctlplane is not on a
    routed network. (I.e the node cannot connect to repositories.)
    The ansible built in `package` will fail despite the fact that
    the packages is already installed.

    This change adds a task to check that the packages required are
    isntalled using `rpm --query --whatprovides <PGK_LIST>`.
    `--whatprovides` is used to find out if a wrapper rpm for OVS with
    custom versioning scheme is installed. If a wrapper is installed
    'openvswitch' is appended to the list of installed packages.

    Related: RHBZ#2048134
    Closes-Bug: #1959731
    Change-Id: Ie448e8f795325cc3ae357fae32f3a47406101f25

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-ansible (master)

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/827567
Committed: https://opendev.org/openstack/tripleo-ansible/commit/5c09c0ee0292be370455b79e4bd4991b513b8017
Submitter: "Zuul (22348)"
Branch: master

commit 5c09c0ee0292be370455b79e4bd4991b513b8017
Author: Harald Jensås <email address hidden>
Date: Wed Feb 2 23:22:01 2022 +0100

    tuned - check packages before install

    When repository files are present, but the ctlplane is not on a
    routed network. (I.e the node cannot connect to repositories.)
    The ansible built in `package` will fail despite the fact that
    the packages is already installed.

    This change adds a task to check that the packages required are
    installed using `rpm --query --whatprovides <PGK_LIST>`. Pacage
    installation task is skipped if package already installed.

    Related: RHBZ#2048134
    Related-Bug: #1959731
    Change-Id: Ifcbde65af99039a261bc34a813bddfb29f63c1e1

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-ansible (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/829170

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-ansible (stable/wallaby)

Related fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/829162

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-ansible (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/829170
Committed: https://opendev.org/openstack/tripleo-ansible/commit/7b002dec7dd32322023487f78cf7944aee7b1c46
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 7b002dec7dd32322023487f78cf7944aee7b1c46
Author: Harald Jensås <email address hidden>
Date: Wed Feb 2 02:07:07 2022 +0100

    tripleo-bootstrap - check packeges fact befor install

    When repository files are present, but the ctlplane is not on a
    routed network. (I.e the node cannot connect to repositories.)
    The ansible built in `package` will fail despite the fact that
    the packages is already installed.

    This change adds a task to check that the packages required are
    isntalled using `rpm --query --whatprovides <PGK_LIST>`.
    `--whatprovides` is used to find out if a wrapper rpm for OVS with
    custom versioning scheme is installed. If a wrapper is installed
    'openvswitch' is appended to the list of installed packages.

    Related: RHBZ#2048134
    Closes-Bug: #1959731
    Change-Id: Ie448e8f795325cc3ae357fae32f3a47406101f25
    (cherry picked from commit 37fac649388e0bf39326bdaaefa5a104b6ef264c)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-ansible (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/829162
Committed: https://opendev.org/openstack/tripleo-ansible/commit/a6813adb567baea57146e90493cbf16c648692a8
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit a6813adb567baea57146e90493cbf16c648692a8
Author: Harald Jensås <email address hidden>
Date: Wed Feb 2 23:22:01 2022 +0100

    tuned - check packages before install

    When repository files are present, but the ctlplane is not on a
    routed network. (I.e the node cannot connect to repositories.)
    The ansible built in `package` will fail despite the fact that
    the packages is already installed.

    This change adds a task to check that the packages required are
    installed using `rpm --query --whatprovides <PGK_LIST>`. Pacage
    installation task is skipped if package already installed.

    Related: RHBZ#2048134
    Related-Bug: #1959731
    Change-Id: Ifcbde65af99039a261bc34a813bddfb29f63c1e1
    (cherry picked from commit 5c09c0ee0292be370455b79e4bd4991b513b8017)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-ansible (stable/victoria)

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/829432

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-ansible (stable/victoria)

Related fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/829472

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-ansible (stable/victoria)

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/829432
Committed: https://opendev.org/openstack/tripleo-ansible/commit/52ade0d245c968b51e0801bd0cd1c3a10f2c9e74
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit 52ade0d245c968b51e0801bd0cd1c3a10f2c9e74
Author: Harald Jensås <email address hidden>
Date: Wed Feb 2 02:07:07 2022 +0100

    tripleo-bootstrap - check packeges fact befor install

    When repository files are present, but the ctlplane is not on a
    routed network. (I.e the node cannot connect to repositories.)
    The ansible built in `package` will fail despite the fact that
    the packages is already installed.

    This change adds a task to check that the packages required are
    isntalled using `rpm --query --whatprovides <PGK_LIST>`.
    `--whatprovides` is used to find out if a wrapper rpm for OVS with
    custom versioning scheme is installed. If a wrapper is installed
    'openvswitch' is appended to the list of installed packages.

    Related: RHBZ#2048134
    Closes-Bug: #1959731
    Change-Id: Ie448e8f795325cc3ae357fae32f3a47406101f25
    (cherry picked from commit 37fac649388e0bf39326bdaaefa5a104b6ef264c)
    (cherry picked from commit 7b002dec7dd32322023487f78cf7944aee7b1c46)

tags: added: in-stable-victoria
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-ansible (stable/victoria)

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/829472
Committed: https://opendev.org/openstack/tripleo-ansible/commit/ef8bc43f1b8980aaf1bea739b5741bbf639de785
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit ef8bc43f1b8980aaf1bea739b5741bbf639de785
Author: Harald Jensås <email address hidden>
Date: Wed Feb 2 23:22:01 2022 +0100

    tuned - check packages before install

    When repository files are present, but the ctlplane is not on a
    routed network. (I.e the node cannot connect to repositories.)
    The ansible built in `package` will fail despite the fact that
    the packages is already installed.

    This change adds a task to check that the packages required are
    installed using `rpm --query --whatprovides <PGK_LIST>`. Pacage
    installation task is skipped if package already installed.

    Related: RHBZ#2048134
    Related-Bug: #1959731
    Change-Id: Ifcbde65af99039a261bc34a813bddfb29f63c1e1
    (cherry picked from commit 5c09c0ee0292be370455b79e4bd4991b513b8017)
    (cherry picked from commit a6813adb567baea57146e90493cbf16c648692a8)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-ansible 4.2.0

This issue was fixed in the openstack/tripleo-ansible 4.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-ansible 2.6.0

This issue was fixed in the openstack/tripleo-ansible 2.6.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.