Changes to global_environment_variables cause duplication

Bug #1573131 reported by Travis Truman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Undecided
Travis Truman

Bug Description

Scenario:

Set the global_environment_variables dict to:

global_environment_variables:
    http_proxy: "http://someproxy.example.com"
    https_proxy: "http://someproxy.example.com"

Run host and container playbooks:

openstack-ansible setup-hosts.yml

Change the values of global_environment_variables dict to:

global_environment_variables:
    http_proxy: "http://adifferentproxy.example.com"
    https_proxy: "http://adifferentproxy.example.com"

Run host and container playbooks:

openstack-ansible setup-hosts.yml

Expected behavior:

/etc/environment in both the host and container look like:

http_proxy=http://adifferentproxy.example.com
https_proxy=http://adifferentproxy.example.com

Actual behavior:

/etc/environment in both the host and container look like:

http_proxy=http://someproxy.example.com
https_proxy=http://someproxy.example.com
http_proxy=http://adifferentproxy.example.com
https_proxy=http://adifferentproxy.example.com

Changed in openstack-ansible:
assignee: nobody → Travis Truman (travis-truman)
Changed in openstack-ansible:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-openstack_hosts (master)

Reviewed: https://review.openstack.org/309128
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-openstack_hosts/commit/?id=bc21adddac233a9fb18336cf6c830c45b685cc7d
Submitter: Jenkins
Branch: master

commit bc21adddac233a9fb18336cf6c830c45b685cc7d
Author: Travis Truman <email address hidden>
Date: Thu Apr 21 13:49:57 2016 -0400

    Template /etc/environment rather than use lineinfile

    The existing lineinfile implementation is buggy when changing and removing
    entries from the global_environment_variables dict

    Change-Id: Ic9899b1a4a72e72d0bac26eb8f650681186332e1
    Partial-Bug: #1573131

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-lxc_container_create (master)

Reviewed: https://review.openstack.org/309517
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-lxc_container_create/commit/?id=f2646d36d89548bd7ed4154aa0ef75a86d94b7b5
Submitter: Jenkins
Branch: master

commit f2646d36d89548bd7ed4154aa0ef75a86d94b7b5
Author: Travis Truman <email address hidden>
Date: Fri Apr 22 12:58:37 2016 -0400

    Template /etc/environment rather than use lineinfile

    The existing lineinfile implementation is buggy when changing and removing
    entries from the global_environment_variables dict

    Significant refactoring of the role tests was necessary in order
    to get usable testing on the change as well as to resolve a few
    problems with the previous implementation of the role testing.

    Partial-Bug: #1573131

    Change-Id: I401763d277d179249973545e873796f9dd54049b

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-openstack_hosts (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/312109

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-lxc_container_create (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/312110

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on openstack-ansible-openstack_hosts (stable/mitaka)

Change abandoned by Jesse Pretorius (odyssey4me) (<email address hidden>) on branch: stable/mitaka
Review: https://review.openstack.org/312109
Reason: Abandoning in favor of https://review.openstack.org/312110

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-openstack_hosts (stable/mitaka)

Reviewed: https://review.openstack.org/312109
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-openstack_hosts/commit/?id=e7e0f03d1006d88b12e256e6487acc1eacd719ed
Submitter: Jenkins
Branch: stable/mitaka

commit e7e0f03d1006d88b12e256e6487acc1eacd719ed
Author: Travis Truman <email address hidden>
Date: Thu Apr 21 13:49:57 2016 -0400

    Template /etc/environment rather than use lineinfile

    The existing lineinfile implementation is buggy when changing and removing
    entries from the global_environment_variables dict

    Change-Id: Ic9899b1a4a72e72d0bac26eb8f650681186332e1
    Partial-Bug: #1573131
    (cherry picked from commit bc21adddac233a9fb18336cf6c830c45b685cc7d)

tags: added: in-stable-mitaka
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-lxc_container_create (stable/mitaka)

Reviewed: https://review.openstack.org/312110
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-lxc_container_create/commit/?id=533cec28371ecbee7ddb5dd7bfdea7e8b318cbad
Submitter: Jenkins
Branch: stable/mitaka

commit 533cec28371ecbee7ddb5dd7bfdea7e8b318cbad
Author: Travis Truman <email address hidden>
Date: Fri Apr 22 12:58:37 2016 -0400

    Template /etc/environment rather than use lineinfile

    The existing lineinfile implementation is buggy when changing and removing
    entries from the global_environment_variables dict

    Significant refactoring of the role tests was necessary in order
    to get usable testing on the change as well as to resolve a few
    problems with the previous implementation of the role testing.

    Partial-Bug: #1573131
    Cherry-Pick of:
      I401763d277d179249973545e873796f9dd54049b
      and
      Ifa7ed380432f60af3c9e68c1bfa2a43dc2d65473

    Change-Id: I401763d277d179249973545e873796f9dd54049b

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