Reproducer readme is misleading about how to configure the undercloud.

Bug #1971605 reported by Sofer Athlan-Guyot
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
In Progress
Medium
Sofer Athlan-Guyot

Bug Description

Hi,

running the reproducer on the psi cloud, I need to setup nameserver and ntp server for the undercloud or else the undercloud deployment fail.

In the README [1] it's mentioned that I could do it like this:

- job:
    name: tripleo-ci-centos-8-containers-multinode-test
    parent: tripleo-ci-centos-8-containers-multinode
    vars:
      mirror_fqdn: afs-mirror.sf.hosted.upshift.rdu2.redhat.com
      custom_nameserver:
        - 10.5.30.160
        - 10.11.5.19
      undercloud_undercloud_nameservers:
        - 10.5.30.160
      external_net: provider_net_shared_3
      ntp_server: '10.5.26.10,clock.redhat.com,clock2.redhat.com'
      undercloud_undercloud_ntp_servers:
        - 10.5.26.10
        - clock.redhat.com

This doesn't work as those variables becomes accessible for ansible as:

job.undercloud_undercloud_nameservers, job.undercloud_undercloud_ntp_servers not as undercloud_undercloud_* and thus have no effect on the generation of the undercloud.conf.

A working way is to have those variable as "top level" variable (ie not as hash entry in the job variable).

One way to do this is to modify the multinode-psi.yml in tripleo-ci and have the readme in reproducer like this:

- job:
    name: tripleo-ci-centos-8-containers-multinode-test
    parent: tripleo-ci-centos-8-containers-multinode
    vars:
      mirror_fqdn: afs-mirror.sf.hosted.upshift.rdu2.redhat.com
      custom_nameserver:
        - 10.5.30.160
        - 10.11.5.19
      playbooks:
        - multinode-psi.yml

Question:

 1. is there another way to achieve this from the zuul.d of any project (working with test1 for instance): ie can I just add variable somewhere in the zuul.d directory that would be taken into account.

That would have the advantage of not having to mess with multinode-psi.yml in tripleo-ci and be totally confined. That would have the disadvantage of not being readily available.

 2. are we ok with having this hardcoded in tripleo-ci ... it seems to me that it's ok, but I might miss something.

If 1. is not an option and 2. is a go I can push the code for review, but would like some opinion here before doing so.

[1] https://review.rdoproject.org/r/plugins/gitiles/rdo-infra/ansible-role-tripleo-ci-reproducer/

Tags: ci
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-ci (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/tripleo-ci/+/840506

Changed in tripleo:
status: New → In Progress
Revision history for this message
Sofer Athlan-Guyot (sofer-athlan-guyot) wrote :
Revision history for this message
Marios Andreou (marios-b) wrote :

i commented/voted on https://review.opendev.org/c/openstack/tripleo-ci/+/840506/2#message-a80e353daed01240000f3a43009d2d09a90db3c1 i think we should be OK to do that

wrt 'adding into the zuul.d' directory... can't think of something as simple as 'add a var somewhere and it will work' but you can add a pre-run to do a set_fact

i.e. in the job definition have pre-run: my-playbook.yaml

then in that playbook you can set_fact (cacheable) for the things you want?

Now in theory this should work fine ([1]) but anyway i think tripleo-ci/+/840506 is easier and cleaner.

[1] User experience may vary, terms and conditions apply, images are for illustrative purposes only. Please keep hands inside the ride at all times.

Revision history for this message
Sofer Athlan-Guyot (sofer-athlan-guyot) wrote :

From ykarel, the usage of run_test_role_vars like this:

- job:
    name: tripleo-ci-centos-8-containers-multinode-test
    parent: tripleo-ci-centos-8-containers-multinode
    vars:
      mirror_fqdn: afs-mirror.sf.hosted.upshift.rdu2.redhat.com
      run_test_role_vars:
          custom_nameserver:
            - 10.5.30.160
            - 10.11.5.19
          undercloud_undercloud_nameservers:
            - 10.5.30.160
          ntp_server: '10.5.26.10,clock.redhat.com,clock2.redhat.com'
          undercloud_undercloud_ntp_servers:
            - 10.5.26.10
            - clock.redhat.com
      external_net: provider_net_shared_3

might work, see https://github.com/openstack/tripleo-ci/blob/d492451c1311e6d83cc7816ca93a5381948dea50/roles/run-test/templates/role-vars.j2#L1

To be tested.

Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

@Sofer, yes, but that might require some zuul overrides allowance dances , like https://opendev.org/openstack/tripleo-ci/src/branch/master/roles/run-test/tasks/main.yaml#L10

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/tripleo-ci/+/851708

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

Change abandoned by "Sofer Athlan-Guyot <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/tripleo-ci/+/840506
Reason: In favor of overrides, see https://review.opendev.org/c/openstack/tripleo-ci/+/851708

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by "Sofer Athlan-Guyot <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/tripleo-ci/+/851708
Reason: run_test_role_vars usage was successful. I've updated the reproducer documentation for the psi use case. Please see that review https://review.rdoproject.org/r/c/rdo-infra/ansible-role-tripleo-ci-reproducer/+/42555

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.