Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix backwards compatibility of constants.get_config #31200

Merged
merged 1 commit into from
Oct 3, 2017

Conversation

dmsimard
Copy link
Contributor

@dmsimard dmsimard commented Oct 2, 2017

get_config would use ConfigManager.get_ini_value which does not
exist. What we are meant to use is
ansible.config.manager.get_ini_config_value and this method does not
expect a list, only a dictionary with a section and a key.

SUMMARY

get_config used ConfigManager.get_ini_value which does not exist and was silently failing due to the blind exception pass.
This caused configuration parameters to be set to their defaults.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ConfigManager

ANSIBLE VERSION

Applicable to Ansible 2.4 and 2.5

get_config would use ConfigManager.get_ini_value which does not
exist. What we are meant to use is
ansible.config.manager.get_ini_config_value and this method does not
expect a list, only a dictionary with a section and a key.
@abadger abadger added this to TODO: Blocker in 2.4.x Blocker List Oct 2, 2017
@bcoca
Copy link
Member

bcoca commented Oct 2, 2017

LGTM

@ansibot ansibot added affects_2.5 This issue/PR affects Ansible v2.5 bugfix_pull_request constants needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Oct 2, 2017
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label Oct 2, 2017
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Oct 2, 2017
@bcoca bcoca merged commit 9b69323 into ansible:devel Oct 3, 2017
@bcoca
Copy link
Member

bcoca commented Oct 3, 2017

backported for 2.4.1

@bcoca bcoca moved this from TODO: Blocker to Done in 2.4.x Blocker List Oct 3, 2017
openstack-gerrit pushed a commit to ansible-community/ara that referenced this pull request Oct 5, 2017
Due to a misunderstanding of how configuration loading occured in
Ansible 2.4, we did not load the configuration file. It turns out
we have to do it ourselves now so let's do that.

This also requires a fix in the Ansible get_config method which
was merged [1] and backported for 2.4.1.0.
We're not going to work around the bug in Ansible 2.4.0.0 and as such,
blacklist that version and coordinate a new ARA release with Ansible
2.4.1.0.

[1]: ansible/ansible#31200

Change-Id: I691ef992c9c6b698f03927e2b69de26f0c1d57d1
(cherry picked from commit 8747ff4)
openstack-gerrit pushed a commit to ansible-community/ara that referenced this pull request Oct 5, 2017
Due to a misunderstanding of how configuration loading occured in
Ansible 2.4, we did not load the configuration file. It turns out
we have to do it ourselves now so let's do that.

This also requires a fix in the Ansible get_config method which
was merged [1] and backported for 2.4.1.0.
We're not going to work around the bug in Ansible 2.4.0.0 and as such,
blacklist that version and coordinate a new ARA release with Ansible
2.4.1.0.

[1]: ansible/ansible#31200

Change-Id: I691ef992c9c6b698f03927e2b69de26f0c1d57d1
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 6, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.5 This issue/PR affects Ansible v2.5 bug This issue/PR relates to a bug. constants support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
No open projects
2.4.x Blocker List
Done in 2.4.1
Development

Successfully merging this pull request may close these issues.

None yet

3 participants