galera_server apt related vars difficult to override

Bug #1669897 reported by Jamie McKnight
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Undecided
zhongshengping

Bug Description

I have been working with the stable/newton branch for openstack-ansible-galera_server, and I have found that after https://review.openstack.org/#/c/314817/ was committed, the galara_ related apt vars are now very difficult to override since they were moved under role vars.

If you look at the ansible variable precedence rules (http://docs.ansible.com/ansible/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable) you can see that role vars are high up in precedence compared to role defaults.

This means that in order to set things like galera_apt_repo_url to point to an internal repo (sync of the upstream rackspace mariadb repo) is pretty much relegated to using --extra-vars to set now.

It seems as though the following should be in defaults/main.yml to allow for group_vars to play a role in setting them again (the behavior prior to the commit listed above):

galera_apt_repo_url
galera_gpg_keys
galera_apt_percona_xtrabackup_url

(note that percona_package_url and qpress_package_url are still in defaults/main.yml so they can still be easily pointed to internal synced repos).

This is also the case with openstack-ansible-galera_client following https://review.openstack.org/#/c/314717/

galera_client_apt_repo_url
galera_client_gpg_keys

Please let me know if you need more information.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to openstack-ansible-galera_client (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/441961

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to openstack-ansible-galera_client (master)

Reviewed: https://review.openstack.org/441961
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-galera_client/commit/?id=e106ac12b2baa3bea18c916238b742601205c267
Submitter: Jenkins
Branch: master

commit e106ac12b2baa3bea18c916238b742601205c267
Author: Jesse Pretorius <email address hidden>
Date: Mon Mar 6 14:30:02 2017 +0000

    Move repo URL variables to defaults

    This patch deprecates the apt/yum specific variables
    and moves the common URL variable to defaults to make
    it possible to override without using extra-vars.

    This technique matches the mechanism used in the
    galera_server role.

    Change-Id: Iaf9a23d1cbc0601d13bf2e467437d3775da9c812
    Related-Bug: #1669897

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to openstack-ansible-galera_client (stable/ocata)

Related fix proposed to branch: stable/ocata
Review: https://review.openstack.org/442009

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to openstack-ansible-galera_client (stable/newton)

Related fix proposed to branch: stable/newton
Review: https://review.openstack.org/442012

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to openstack-ansible-galera_client (stable/ocata)

Reviewed: https://review.openstack.org/442009
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-galera_client/commit/?id=1d3cdcd33c75a668ac3be046ac53fe1842780058
Submitter: Jenkins
Branch: stable/ocata

commit 1d3cdcd33c75a668ac3be046ac53fe1842780058
Author: Jesse Pretorius <email address hidden>
Date: Mon Mar 6 14:30:02 2017 +0000

    Move repo URL variables to defaults

    This patch deprecates the apt/yum specific variables
    and moves the common URL variable to defaults to make
    it possible to override without using extra-vars.

    This technique matches the mechanism used in the
    galera_server role.

    Change-Id: Iaf9a23d1cbc0601d13bf2e467437d3775da9c812
    Related-Bug: #1669897
    (cherry picked from commit e106ac12b2baa3bea18c916238b742601205c267)

tags: added: in-stable-ocata
Revision history for this message
Jean-Philippe Evrard (jean-philippe-evrard) wrote :

Is the fix enough for you, or should we do something different?

Changed in openstack-ansible:
status: New → Fix Committed
Revision history for this message
Jamie McKnight (jlmcknight) wrote :

This addresses the galera_client portion, but I don't see anything for galera_server. Will that also be addressed?

I notice that galera_server master branch has galera_repo_url in defaults/main.yml, but stable/newton has neither galera_apt_repo_url or galera_repo_url in defaults/main.yml.

Thank you for the quick turn around on galera_client!

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to openstack-ansible-galera_client (stable/newton)

Reviewed: https://review.openstack.org/442012
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-galera_client/commit/?id=d5330070bc8690a1c84384b9c0bf818bee71cdd6
Submitter: Jenkins
Branch: stable/newton

commit d5330070bc8690a1c84384b9c0bf818bee71cdd6
Author: Jesse Pretorius <email address hidden>
Date: Mon Mar 6 14:30:02 2017 +0000

    Move repo URL variables to defaults

    This patch deprecates the apt/yum specific variables
    and moves the common URL variable to defaults to make
    it possible to override without using extra-vars.

    This technique matches the mechanism used in the
    galera_server role.

    Change-Id: Iaf9a23d1cbc0601d13bf2e467437d3775da9c812
    Related-Bug: #1669897
    (cherry picked from commit e106ac12b2baa3bea18c916238b742601205c267)

tags: added: in-stable-newton
zhongshengping (chdzsp)
Changed in openstack-ansible:
assignee: nobody → zhongshengping (chdzsp)
Revision history for this message
Mohammed Naser (mnaser) wrote :

galera_server was fixed here: https://review.openstack.org/#/c/491862/

Changed in openstack-ansible:
status: Fix Committed → Fix Released
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.