Bug 1819568 - no_proxy in overcloudrc gets duplicated items if no_proxy is set by overcoudrc
Summary: no_proxy in overcloudrc gets duplicated items if no_proxy is set by overcoudrc
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-common
Version: 13.0 (Queens)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Adriano Petrich
QA Contact: David Rosenfeld
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-01 04:47 UTC by Takashi Kajinami
Modified: 2023-09-07 22:42 UTC (History)
6 users (show)

Fixed In Version: openstack-tripleo-common-8.7.1-22.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-28 18:23:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1870017 0 None None None 2020-04-01 04:50:18 UTC
OpenStack gerrit 731341 0 None MERGED Prevent duplicated hosts in overcloudrc no_proxy 2020-09-14 12:27:28 UTC
Red Hat Issue Tracker OSP-28395 0 None None None 2023-09-07 22:42:08 UTC
Red Hat Product Errata RHBA-2020:4388 0 None None None 2020-10-28 18:24:00 UTC

Description Takashi Kajinami 2020-04-01 04:47:09 UTC
Description of problem:

Currently overcloudrc sets no_proxy environment parameter, while stackrc doesn't.

This means that if an operator run
 $ source ~/overcloudrc
 $ source ~/stackrc
no_proxy parameter is not unset by stackrc and keeps vip ips.

If an operator updates overcloud with commands like 'openstack overcloud deploy' then,
the command is executed with no_proxy parameter set.
The command generates overcloudrc with combining current no_proxy parameter and overcloud vips,
it ends up in putting duplicated ips in overcloudrc.

~~~
(undercloud) [stack@undercloud-0 ~]$ openstack stack list
+--------------------------------------+------------+----------------------------------+-----------------+----------------------+--------------+
| ID                                   | Stack Name | Project                          | Stack Status    | Creation Time        | Updated Time |
+--------------------------------------+------------+----------------------------------+-----------------+----------------------+--------------+
| 0aed599e-1463-4951-b2c8-86fdd84f8445 | overcloud  | 16d31b5c4e284a7e8ae6f842d8ab228d | CREATE_COMPLETE | 2020-04-01T01:08:05Z | None         |
+--------------------------------------+------------+----------------------------------+-----------------+----------------------+--------------+
(undercloud) [stack@undercloud-0 ~]$ openstack port list | egrep -e 10.0.0.124 -e 192.168.24.8
| 1178fbda-2d3c-4f47-b77c-45f976ba59ad | control_virtual_ip      | fa:16:3e:7f:72:10 | ip_address='192.168.24.8', subnet_id='38bf9304-f15d-49b2-891d-aba9ae54f521'  | DOWN   |
| 58155b41-802d-4b9b-810b-bef9443e372d | public_virtual_ip       | fa:16:3e:37:ba:39 | ip_address='10.0.0.124', subnet_id='3f719ed1-4746-4358-a6aa-44b6a78251dc'    | DOWN   |
(undercloud) [stack@undercloud-0 ~]$ cat overcloudrc 
# Clear any old environment that may conflict.
for key in $( set | awk '{FS="="}  /^OS_/ {print $1}' ); do unset $key ; done
export OS_NO_CACHE=True
export COMPUTE_API_VERSION=1.1
export OS_USERNAME=admin
export no_proxy=,10.0.0.124,192.168.24.8 <==========(*)
export OS_REGION_NAME=regionOne
export OS_USER_DOMAIN_NAME=Default
export OS_VOLUME_API_VERSION=3
export OS_CLOUDNAME=overcloud
export OS_AUTH_URL=http://10.0.0.124:5000//v3
export NOVA_VERSION=1.1
export OS_IMAGE_API_VERSION=2
export OS_PASSWORD=PASSWORD
export OS_PROJECT_DOMAIN_NAME=Default
export OS_IDENTITY_API_VERSION=3
export OS_PROJECT_NAME=admin
export OS_AUTH_TYPE=password
export PYTHONWARNINGS='ignore:Certificate has no, ignore:A true SSLContext object is not available'

# Add OS_CLOUDNAME to PS1
if [ -z "${CLOUDPROMPT_ENABLED:-}" ]; then
    export PS1=${PS1:-""}
    export PS1=\${OS_CLOUDNAME:+"(\$OS_CLOUDNAME)"}\ $PS1
    export CLOUDPROMPT_ENABLED=1
fi
(undercloud) [stack@undercloud-0 ~]$ source overcloudrc 
(overcloud) [stack@undercloud-0 ~]$ source stackrc 
(undercloud) [stack@undercloud-0 ~]$ printenv | grep no_proxy
no_proxy=,10.0.0.124,192.168.24.8
(undercloud) [stack@undercloud-0 ~]$ ./overcloud_deploy_nologs.sh
...
2020-04-01 04:00:52Z [overcloud]: UPDATE_COMPLETE  Stack UPDATE completed successfully

 Stack overcloud UPDATE_COMPLETE 

Started Mistral Workflow tripleo.deployment.v1.get_horizon_url. Execution ID: 259851c1-3675-4bf5-8aea-022646b0cce8
Overcloud Endpoint: http://10.0.0.124:5000/
Overcloud Horizon Dashboard URL: http://10.0.0.124:80/dashboard
Overcloud rc file: /home/stack/overcloudrc
Overcloud Deployed
(undercloud) [stack@undercloud-0 ~]$ cat overcloudrc 
# Clear any old environment that may conflict.
for key in $( set | awk '{FS="="}  /^OS_/ {print $1}' ); do unset $key ; done
export OS_NO_CACHE=True
export COMPUTE_API_VERSION=1.1
export OS_USERNAME=admin
export no_proxy=,10.0.0.124,192.168.24.8,10.0.0.124,192.168.24.8 <==========(*)
export OS_REGION_NAME=regionOne
export OS_USER_DOMAIN_NAME=Default
export OS_VOLUME_API_VERSION=3
export OS_CLOUDNAME=overcloud
export OS_AUTH_URL=http://10.0.0.124:5000//v3
export NOVA_VERSION=1.1
export OS_IMAGE_API_VERSION=2
export OS_PASSWORD=PASSWORD
export OS_PROJECT_DOMAIN_NAME=Default
export OS_IDENTITY_API_VERSION=3
export OS_PROJECT_NAME=admin
export OS_AUTH_TYPE=password
export PYTHONWARNINGS='ignore:Certificate has no, ignore:A true SSLContext object is not available'

# Add OS_CLOUDNAME to PS1
if [ -z "${CLOUDPROMPT_ENABLED:-}" ]; then
    export PS1=${PS1:-""}
    export PS1=\${OS_CLOUDNAME:+"(\$OS_CLOUDNAME)"}\ $PS1
    export CLOUDPROMPT_ENABLED=1
fi
(undercloud) [stack@undercloud-0 ~]$ 
~~~

Version-Release number of selected component (if applicable):

How reproducible:
Always

Steps to Reproduce:
1. deploy overcloud
2. Run '$ source ~/overcloudrc; source ~/stackrc'
3. rerun 'openstack overcloud deploy'

Actual results:
no_proxy in overcloud has duplicated items

Expected results:
no_proxy in overcloud doesn't have duplicated items

Additional info:

Comment 17 errata-xmlrpc 2020-10-28 18:23:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform 13.0 director bug fix advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4388


Note You need to log in before you can comment on or make changes to this bug.