osism / issues

This repository is used for bug reports that are cross-project or not bound to a specific repository (or to an unknown repository).
https://www.osism.tech
1 stars 1 forks source link

Add reference of overlay files supported by kolla-ansible #803

Open rmueller-b1 opened 11 months ago

rmueller-b1 commented 11 months ago

Hello, after discovering that from Openstack release Yoga to Zed there was a change in the source path of an overlay file of Ironic. That information was difficult to discover. Therefore I have a request for changes in the documentation: Is it possible to get an overview for every service with all the possible positions of every file and name? Here an example:

           "sources": [
                "/ansible/roles/ironic/templates/ironic-inspector.conf.j2",
                "/opt/configuration/environments/kolla/files/overlays/global.conf",
                "/opt/configuration/environments/kolla/files/overlays/ironic-inspector.conf",
                "/opt/configuration/environments/kolla/files/overlays/ironic-inspector/inspector.conf",
                "/opt/configuration/environments/kolla/files/overlays/ironic-inspector/<hostname>/inspector.conf"

This overview would be very helpful to get especially if there is a change between releases. In our case the ironic-inspector.conf was not processed by Osism and it was not easy to find out why. Kind regards, Robert Müller

berendt commented 11 months ago

We can try to automate it and to generate a document based on the used stable branch of kolla-ansible. The fastest way is to check the config tasks of the used roles. E.g. for Ironic this is the https://github.com/openstack/kolla-ansible/blob/master/ansible/roles/ironic/tasks/config.yml file. There you find a lot of tasks using merge_configs or template tasks that rely on files in the overlays directory.

You can also check the the JSON files for each single service. E.g. for the ironic-conductor service this is the https://github.com/openstack/kolla-ansible/blob/master/ansible/roles/ironic/templates/ironic-conductor.json.j2 file. All files e.g. of ironic are in the https://github.com/openstack/kolla-ansible/tree/master/ansible/roles/ironic/templates directory.

The process itself is described here: https://osism.github.io/docs/guides/configuration-guide/openstack/#how-does-the-configuration-get-into-services

berendt commented 11 months ago

Location: https://osism.github.io/docs/references/configuration

Service Configuration file
ironic-inspector global.conf
ironic-inspector ironic-inspector.conf
ironic-inspector ironic-inspector/inspector.conf
ironic-inspector ironic-inspector/<hostname>/inspector.conf

Also add some list or table when a configuration file of a specific service changed. This list can be added to our release notes (upgrade notes) in the future as well.

It probably the easiest way to have a Python script that gets all config.yml files for all roles from the kolla-ansible repository and analyses them with PyYAML.

Sample task that has to be analysed:

- name: Copying over ironic.conf
  vars:
    service_name: "{{ item.key }}"
  merge_configs:
    sources:
      - "{{ role_path }}/templates/ironic.conf.j2"
      - "{{ node_custom_config }}/global.conf"
      - "{{ node_custom_config }}/ironic.conf"
      - "{{ node_custom_config }}/ironic/{{ item.key }}.conf"
      - "{{ node_custom_config }}/ironic/{{ inventory_hostname }}/ironic.conf"