Registering node and repos can happen after some module check for packages.

Bug #1886028 reported by Sofer Athlan-Guyot on 2020-07-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
High
Sofer Athlan-Guyot

Bug Description

Hi,

host-prep-tasks is a one step action that can include:

 - registration to rhosp repositories and other pinning related to rhel;
 - validation of the presence of certain packages;

The problem is that the generated playbook is not ordered so the package validation can happen after the subscription. This is usually not a problem during deployment as the images have all the packages, but it could becomes during update (where host-prep-tasks are run).

Here a example of such a task that may update things from the wrong repo:

- block:
  - name: ensure LVM rpm dependencies are installed
    package:
      name: lvm2
      state: latest
  - args:
      creates: /var/lib/cinder/cinder-volumes
    command: dd if=/dev/zero of=/var/lib/cinder/cinder-volumes bs=1 count=0 seek=10280M
    name: cinder create LVM volume group dd

and another one from the tripleo-kernel module:

- name: Kernel tuning block
  become: true
  block:
    - name: Install additional packages
      package:
        name: "{{ item.key }}"
        state: "{{ item.opt.state | default('present') }}"
      loop: "{{ tripleo_kernel_extra_packages | dict2items(key_name='key', value_name='opt') }}"
      notify: Modules reload

We do need to have 2 steps here:

 - step0: register/subscribe if necessary;
 - step1: all other host prep-tasks;

We could also use that step0 for all kind of in-flight validation. This would be of particular interest for update as it would offer a very early place to validate that the env is ready to be updated.

Changed in tripleo:
importance: Undecided → High
status: New → Triaged
tags: added: queens-backport-potential train-backport-potential ussuri-backport-potential
Changed in tripleo:
milestone: victoria-1 → victoria-3
Changed in tripleo:
milestone: victoria-3 → wallaby-1
Changed in tripleo:
milestone: wallaby-1 → wallaby-2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers