Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-21328

Some edpm-ansible roles depend on dataplane service names instead of using the edpmServiceType

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • ?
    • rhos-ops-day1day2-migrations
    • None
    • Moderate

      The openstackDataplaneService name is an opaque filed that is user defined.

      While we document some commons naming patterns for creating custom dataplane services derived form our standard dataplane service we are not meant to depend on that in our code.

      instead we have a dedicated edpmServiceType field

      https://github.com/openstack-k8s-operators/openstack-operator/blob/main/apis/dataplane/v1beta1/openstackdataplaneservice_types.go#L119

      That act to define what type of service this is i.e. nova neutron keystone.

      currently the edpm_download_cache role violates this design constraint

      specifically https://github.com/openstack-k8s-operators/edpm-ansible/blob/main/roles/edpm_download_cache/tasks/container_images.yml and https://github.com/openstack-k8s-operators/edpm-ansible/blob/main/roles/edpm_download_cache/tasks/packages.yml

      use a patter of checking if <name> in edpm_download_cache_running_services

      to determin if the sub task shoudl run where edpm_download_cache_running_services is the service list form the node set or teh service overrides form the dataplane deployment if defined.

      https://github.com/openstack-k8s-operators/edpm-ansible/blob/main/roles/edpm_download_cache/defaults/main.yml#L28

      this si fundamentally broken as these will not trigger if you have non default names for service which is required for some functionality such as multi cell nova deployment.

      to fix this bug properly the Openstack operator need to compile a mapping for dataplane service name to dataplane service types and all roles that currently depend on names need to use the types instead.

      as the edpm_download_cache role is just pre downloading content that woudl be downloaded by the other roles this is less impactful then it woudl be for any other role that is currently depending on the names.

      workaround:
      as a temporary improvement the download cache role could do a regex match

      when: '"nova" in edpm_download_cache_running_services'
      

      ->

      when: edpm_download_cache_running_services | select('regex', '.*nova.*')
      

      or

      when: edpm_download_cache_running_services | select('contains', 'nova')
      

      while this is still not correct it will work for any custom service that follow our naming convention

      "nova-<cell name>-<feature/nodeset name>" i.e. "nova-cell2-ai"

              Unassigned Unassigned
              smooney@redhat.com Sean Mooney
              rhos-dfg-df
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: