SM:mainline:4.0.0.0-3023: sm-config.ini file is picking the docker0 IP

Bug #1654531 reported by sundarkh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
Trunk
Fix Committed
Critical
Nitish Krishna Kaveri

Bug Description

SM:mainline:4.0.0.0-3023: sm-config.ini file is picking the docker0 IP

1) Install mainline 4.0.0.0-3023 ubuntu Mitaka SM
2) During installation of server packages, it brings up docker0 interface

docker0 Link encap:Ethernet HWaddr 02:42:7a:08:be:f9

          inet addr:172.17.0.1 Bcast:0.0.0.0 Mask:255.255.0.0

          inet6 addr: fe80::42:7aff:fe08:bef9/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

          RX packets:16 errors:0 dropped:0 overruns:0 frame:0

          TX packets:81 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:1072 (1.0 KB) TX bytes:9941 (9.9 KB)

3) sm-config.ini, sm-client-config.ini is populated with this docker interface IP. (Till now, management IP of SM box gets picked)
root@nodej3:~# cat /opt/contrail/server_manager/sm-config.ini
[SERVER-MANAGER]
listen_ip_addr = 172.17.0.1
listen_port = 9001
database_name = smgr_data.db
server_manager_base_dir = /etc/contrail_smgr/
html_root_dir = /var/www/html/
cobbler = true
monitoring = true
cobbler_ip_address = 172.17.0.1
cobbler_port =
cobbler_username = testing
cobbler_password = testing
ipmi_username = ADMIN
ipmi_password = ADMIN
ipmi_type = ipmilan
puppet_dir = /etc/puppet/

[CLUSTER]

[SERVER]

[IMAGE]
[SERVER-MANAGER]
monitoring = true
collectors = ['172.17.0.1:8086']
http_introspect_port = 8107
sandesh_log_level = SYS_ERR

[MONITORING]
monitoring_frequency = 300
monitoring_plugin = server_mgr_ipmi_monitoring.ServerMgrIPMIMonitoring

[INVENTORY]
inventory_plugin = server_mgr_inventory.ServerMgrInventory

cat /opt/contrail/server_manager/client/sm-client-config.ini
[SERVER-MANAGER]
; ip address of the server manager
; replace the following with proper server manager address
listen_ip_addr = 172.17.0.1
; server manager listening port
listen_port = 9001

[CLUSTER]

[SERVER]

4) This is leading to the SM being brought up in the docker interface

netstat -anp | grep 9001
tcp 0 0 172.17.0.1:9001 0.0.0.0:* LISTEN 25748/python

5) So, succesive activities, like reimage, add image fails

reimage fails with kickstart file being searched in 172.17.0.1

add image fails Error: (7, 'Failed to connect to 172.17.0.1 port 9001: Connection refused')

This parity needs to be fixed

sundarkh (sundar-kh)
description: updated
Revision history for this message
Nitish Krishna Kaveri (nitishk) wrote :

Workaround:
Please give --hostip=<IP> option to setup.sh script

sundarkh (sundar-kh)
tags: added: sanity
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/28297
Submitter: Nitish Krishna Kaveri (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/28297
Committed: http://github.org/Juniper/contrail-packaging/commit/ed70e5036b561440a66e158640af988dc27e1eeb
Submitter: Zuul (<email address hidden>)
Branch: master

commit ed70e5036b561440a66e158640af988dc27e1eeb
Author: nitishkrishna <email address hidden>
Date: Mon Jan 30 16:07:16 2017 -0800

Closes-Bug: #1654531 - Preventing SM from using docker0 as listen interface

During install, to automatically pickup correct interface to use, in case --hostip option is not given, we are explicitly blocking:

127.0.0.1 [localhost]
172.17.0.1 [docker0 default address]

Change-Id: I5c99882181804d3e3df23522d200c4570a0ea409

Revision history for this message
sundarkh (sundar-kh) wrote :

Tested with build 3035;

/opt/contrail/server_manager/sm-config.ini —> populated correctly with Host IP
but /etc/contrail/sm-client-config.ini still has docker IP ; Need fix here as well

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/28370
Submitter: Nitish Krishna Kaveri (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/28370
Committed: http://github.org/Juniper/contrail-server-manager/commit/20043397f0f8e2b906a6e46d20e0a720d086418b
Submitter: Zuul (<email address hidden>)
Branch: master

commit 20043397f0f8e2b906a6e46d20e0a720d086418b
Author: nitishkrishna <email address hidden>
Date: Thu Feb 2 09:37:17 2017 -0800

Closes-Bug: #1654531 - Prevent SM Cliff Client from using docker0 intf as listen addr

During install, to automatically pickup correct interface to use, in case --hostip option is not given, we are explicitly blocking:

127.0.0.1 [localhost]
172.17.0.1 [docker0 default address]

Change-Id: Icbe34861d133ce05d915f7dd47eac4a6667f34b7

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/28653
Submitter: Nitish Krishna Kaveri (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/28653
Committed: http://github.org/Juniper/contrail-packaging/commit/2f0e751ab3a973d4473bd59fd2ea707943bf668d
Submitter: Zuul (<email address hidden>)
Branch: master

commit 2f0e751ab3a973d4473bd59fd2ea707943bf668d
Author: nitishkrishna <email address hidden>
Date: Thu Feb 9 20:57:04 2017 -0800

Closes-Bug: #1663224 - SM lite listens on Docker0 interface

Closes-Bug: #1654531 - Preventing SM from using docker0 as listen interface

During install, to automatically pickup correct interface to use, in case --hostip option is not given, we are explicitly blocking:

127.0.0.1 [localhost]
172.17.0.1 [docker0 default address]

Pls note: --hostip is still MANDATORY for multi interface setups where it is required to specify which IP SM has to listen on

Change-Id: I543854d2904a015eca3d883069d9f930bfcfde7f

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/28718
Submitter: Nitish Krishna Kaveri (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/28718
Committed: http://github.org/Juniper/contrail-packaging/commit/f85d49d427643a8961c5601206754bb20aae10c6
Submitter: Zuul (<email address hidden>)
Branch: master

commit f85d49d427643a8961c5601206754bb20aae10c6
Author: nitishkrishna <email address hidden>
Date: Mon Feb 13 13:08:13 2017 -0800

Closes-Bug: #1654531 - SM upgrade has wrong DOCKER OPTS if docker0 is already there

The Docker opts gets set with wrong HOST IP (using docker IP instead of SM IP)

Change-Id: Icd4d4b0def6812c496d253567d575b688b2b6a87

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.