Bug 1930438 - openstack tripleo container image prepare generates openstack-neutron-server-ovn image when using openvswitch neutron driver
Summary: openstack tripleo container image prepare generates openstack-neutron-server-...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-common
Version: 16.1 (Train)
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Sagi Shnaidman
QA Contact: David Rosenfeld
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-18 21:14 UTC by Ladislav Jozsa
Modified: 2021-09-15 07:12 UTC (History)
5 users (show)

Fixed In Version: openstack-tripleo-common-11.6.1-2.20210513014807.7599a38.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-09-15 07:12:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2021:3483 0 None None None 2021-09-15 07:12:58 UTC

Description Ladislav Jozsa 2021-02-18 21:14:14 UTC
Description of problem:
When using opevswitch neutron_driver and attempting to generate neutron-server hotfix 
using command:

sudo openstack tripleo container image prepare -e containers-prepare-parameter-neutron-server.yaml

neutron-server-ovn image is always generated using this file:


parameter_defaults:
  ContainerImagePrepare:
  - push_destination: director-d.infra.prod.upshift.rdu2.redhat.com:8787
    set:
      neutron_driver: openvswitch
      ceph_alertmanager_image: ose-prometheus-alertmanager
      ceph_alertmanager_namespace: registry.redhat.io/openshift4
      ceph_alertmanager_tag: 4.1
      ceph_grafana_image: rhceph-4-dashboard-rhel8
      ceph_grafana_namespace: registry.redhat.io/rhceph
      ceph_grafana_tag: 4
      ceph_image: rhceph-4-rhel8
      ceph_namespace: registry.redhat.io/rhceph
      ceph_node_exporter_image: ose-prometheus-node-exporter
      ceph_node_exporter_namespace: registry.redhat.io/openshift4
      ceph_node_exporter_tag: v4.1
      ceph_prometheus_image: ose-prometheus
      ceph_prometheus_namespace: registry.redhat.io/openshift4
      ceph_prometheus_tag: 4.1
      ceph_tag: latest
      name_prefix: openstack-
      name_suffix: ''
      namespace: registry.redhat.io/rhosp-rhel8
      rhel_containers: false
      tag: '16.1'
    modify_role: tripleo-modify-image
    includes:
      - neutron-server # <- this is a string match so it matches neutron-server and neutron-serve-ovn
    excludes:
      - neutron-server-ovn # you would need to explicitly exclude the other one. let's try
    modify_vars:
      tasks_from: rpm_install.yml
      rpms_path: /home/stack/openstack-neutron-server
    modified_append_tag: "-hotfix"
  ContainerImageRegistryCredentials:
    registry.redhat.io:
      7088399|psi-openstack: 'xxxx'
  ContainerImageRegistryLogin: false
  LocalContainerRegistry: director-d.infra.prod.upshift.rdu2.redhat.com:8787
  DockerInsecureRegistryAddress:
  - director-d.infra.prod.upshift.rdu2.redhat.com:8787

What we're getting here is:

# Generated with the following on 2021-02-18T20:43:27.761747
#
#   openstack tripleo container image prepare -e containers-prepare-parameter-neutron-server.yaml --output-env-file neutron-server.yaml
#

parameter_defaults:
  ContainerNeutronApiImage: director-d.infra.prod.upshift.rdu2.redhat.com:8787/rhosp-rhel8/openstack-neutron-server-ovn:16.1-modified-20210218204255
  ContainerNeutronConfigImage: director-d.infra.prod.upshift.rdu2.redhat.com:8787/rhosp-rhel8/openstack-neutron-server-ovn:16.1-modified-20210218204255
  DockerInsecureRegistryAddress:
  - director-d.infra.prod.upshift.rdu2.redhat.com:8787

It is not expected and wanted to have openstack-neutron-server-ovn. The -ovn suffix should not be there. However when run with this content it's working as intended:

parameter_defaults:
  NeutronMechanismDrivers: foobar  # this one is critical
  ContainerImagePrepare:
  - push_destination: director-d.infra.prod.upshift.rdu2.redhat.com:8787
    set:
      neutron_driver: openvswitch
      ceph_alertmanager_image: ose-prometheus-alertmanager
      ceph_alertmanager_namespace: registry.redhat.io/openshift4
      ceph_alertmanager_tag: 4.1
      ceph_grafana_image: rhceph-4-dashboard-rhel8
      ceph_grafana_namespace: registry.redhat.io/rhceph
      ceph_grafana_tag: 4
      ceph_image: rhceph-4-rhel8
      ceph_namespace: registry.redhat.io/rhceph
      ceph_node_exporter_image: ose-prometheus-node-exporter
      ceph_node_exporter_namespace: registry.redhat.io/openshift4
      ceph_node_exporter_tag: v4.1
      ceph_prometheus_image: ose-prometheus
      ceph_prometheus_namespace: registry.redhat.io/openshift4
      ceph_prometheus_tag: 4.1
      ceph_tag: latest
      name_prefix: openstack-
      name_suffix: ''
      namespace: registry.redhat.io/rhosp-rhel8
      rhel_containers: false
      tag: '16.1'
    modify_role: tripleo-modify-image
    includes:
      - neutron-server # <- this is a string match so it matches neutron-server and neutron-serve-ovn
    excludes:
      - neutron-server-ovn # you would need to explicitly exclude the other one. let's try
    modify_vars:
      tasks_from: rpm_install.yml
      rpms_path: /home/stack/openstack-neutron-server
    modified_append_tag: "-hotfix"
  ContainerImageRegistryCredentials:
    registry.redhat.io:
      7088399|psi-openstack: 'xxxx'
  ContainerImageRegistryLogin: false
  LocalContainerRegistry: director-d.infra.prod.upshift.rdu2.redhat.com:8787
  DockerInsecureRegistryAddress:
  - director-d.infra.prod.upshift.rdu2.redhat.com:8787

It is critical to have this parameter defined:

NeutronMechanismDrivers: foobar

When we define NeutronMechanismDrivers, the output of

sudo openstack tripleo container image prepare -e containers-prepare-parameter-neutron-server.yaml

is:

# Generated with the following on 2021-02-18T20:44:59.256888
#
#   openstack tripleo container image prepare -e containers-prepare-parameter-neutron-server.yaml --output-env-file neutron-server.yaml
#

parameter_defaults:
  ContainerNeutronApiImage: director-d.infra.prod.upshift.rdu2.redhat.com:8787/rhosp-rhel8/openstack-neutron-server:16.1-modified-20210218204427
  ContainerNeutronConfigImage: director-d.infra.prod.upshift.rdu2.redhat.com:8787/rhosp-rhel8/openstack-neutron-server:16.1-modified-20210218204427
  DockerInsecureRegistryAddress:
  - director-d.infra.prod.upshift.rdu2.redhat.com:8787

See that -ovn suffix is not there. This appears to be bug both in docs and the code.

Version-Release number of selected component (if applicable):

RHOS 16.1.2
openstack-tripleo-common-11.4.1-1.20200914165651.el8ost.noarch

How reproducible:
always, using steps above



Additional info:

Comment 1 Alex Schultz 2021-02-19 18:13:38 UTC
This likely needs to documented and fixed so that if a user specifies neutron_driver it's honored.

https://github.com/openstack/tripleo-common/blob/stable/train/tripleo_common/image/kolla_builder.py#L118

Comment 2 Sagi Shnaidman 2021-04-19 10:38:07 UTC
Solving in upstream in https://review.opendev.org/c/openstack/tripleo-common/+/785159

Comment 5 David Rosenfeld 2021-07-22 18:03:35 UTC
Set neutron_driver: openvswitch in containers-prepare-parameter.yaml and executed: openstack tripleo container image prepare -e containers-prepare-parameter.yaml

Images were generated without the ovn suffix:

ContainerNeutronApiImage: rhos-qe-mirror-rdu2.usersys.redhat.com:5002/rh-osbs/rhosp16-openstack-neutron-server:16.2_20210721.1
ContainerNeutronConfigImage: rhos-qe-mirror-rdu2.usersys.redhat.com:5002/rh-osbs/rhosp16-openstack-neutron-server:16.2_20210721.1

Comment 7 errata-xmlrpc 2021-09-15 07:12:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform (RHOSP) 16.2 enhancement advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2021:3483


Note You need to log in before you can comment on or make changes to this bug.