SMLite:mainline:3037:Provisioning does not start with error at pre-config due to SM process running over docker0 IP

Bug #1663224 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

SMLite:mainline:3037:Provisioning does not start with error at pre-config

1) Install SM Lite on the box
2) issue provision using

/opt/contrail/contrail_server_manager/provision.sh -c /root/contrail-install-packages_4.0.0.0-3037-mitaka.tgz -t /root/testbed_smgr_multi_interface.py -cid cluster_single

testbed.py used
https://github.com/Juniper/contrail-tools/blob/master/testbeds/testbed_smgr_multi_interface.py.ubuntu-14.04

3) SM installation happens succesfully and the SM process runs over docker0 IP

netstat -anp | grep 9001
tcp 0 0 172.17.0.1:9001 0.0.0.0:* LISTEN 27385/python
root@nodec35:~#

Subsequent Provision fails
----> Provision contrail local repo
    ----> Creating local lepo -- /opt/contrail/contrail_local_repo
dpkg-scanpackages: warning: package libvirt-bin (filename ./libvirt-bin_1.3.1-1ubuntu10.3~cloud0_amd64.deb) is repeat but newer version;
dpkg-scanpackages: warning: used that one and ignored data from ./libvirt-bin_1.3.1-1ubuntu10.1~cloud0+contrail1_amd64.deb!
dpkg-scanpackages: warning: package cassandra (filename ./cassandra_2.0.17_all.deb) is repeat;
dpkg-scanpackages: warning: ignored that one and using data from ./cassandra_2.1.9_all.deb!
dpkg-scanpackages: warning: package cassandra (filename ./cassandra_2.2.5_all.deb) is repeat but newer version;
dpkg-scanpackages: warning: used that one and ignored data from ./cassandra_2.1.9_all.deb!
dpkg-scanpackages: warning: package libvirt0 (filename ./libvirt0_1.3.1-1ubuntu10.1~cloud0+contrail1_amd64.deb) is repeat;
dpkg-scanpackages: warning: ignored that one and using data from ./libvirt0_1.3.1-1ubuntu10.3~cloud0_amd64.deb!
dpkg-scanpackages: info: Wrote 810 entries to output Packages file.
----> Install server manager without cobbler option
----> This install is being logged at: /var/log/contrail/install_logs/install_2017_02_09__03_54_19.log
    ----> Cleaning up existing sources.list and Server Manager sources file
    ----> Allow Install of Unauthenticated APT packages
    ----> Setting up Internet Repos
    ----> Installing dependent packages for Setting up Smgr repos
dpkg-scanpackages: warning: package python-urllib3 (filename ./python-urllib3_1.13.1-2~cloud0_all.deb) is repeat;
dpkg-scanpackages: warning: ignored that one and using data from ./python-urllib3_1.13.1-2_all.deb!
dpkg-scanpackages: info: Wrote 30 entries to output Packages file.
----> Server Manager
    ----> Using default puppet certificate name nodec35.englab.juniper.net
Notice: /File[/etc/puppet/environments/production]/ensure: created
Notice: Signed certificate request for ca
    ----> Installing package Puppetmaster Passenger
    ----> Installing package Server Manager Lite
Configuring Ansible
- extracting docker to /etc/ansible/roles/docker
- docker was installed successfully
- downloading role 'curl', owned by andrewrothstein
- downloading role from https://github.com/andrewrothstein/ansible-curl/archive/v1.0.1.tar.gz
- extracting andrewrothstein.curl to /etc/ansible/roles/andrewrothstein.curl
- andrewrothstein.curl was installed successfully
Starting docker registry
Unable to find image 'registry:2' locally
2: Pulling from library/registry
b7f33cc0b48e: Pulling fs layer
46730e1e05c9: Pulling fs layer
458210699647: Pulling fs layer
0cf045fea0fd: Pulling fs layer
b78a03aa98b7: Pulling fs layer
0cf045fea0fd: Waiting
b78a03aa98b7: Waiting
46730e1e05c9: Verifying Checksum
46730e1e05c9: Download complete
b7f33cc0b48e: Verifying Checksum
b7f33cc0b48e: Download complete
b7f33cc0b48e: Pull complete
0cf045fea0fd: Verifying Checksum
0cf045fea0fd: Download complete
46730e1e05c9: Pull complete
b78a03aa98b7: Download complete
458210699647: Download complete
458210699647: Pull complete
0cf045fea0fd: Pull complete
b78a03aa98b7: Pull complete
Digest: sha256:0e40793ad06ac099ba63b5a8fae7a83288e64b50fe2eafa2b59741de85fd3b97
Status: Downloaded newer image for registry:2
f524d17ed50a2c5fb22871e5c7a5a3090c03d79499a43161bc32f5d506771978
Installing pip2pi ...
Downloading/unpacking pip2pi
/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/packages/urllib3/util/ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  Real name of requirement pip2pi is pip2pi
  Downloading pip2pi-0.6.8-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): pip>=1.1 in /usr/lib/python2.7/dist-packages (from pip2pi)
Installing collected packages: pip2pi
Successfully installed pip2pi
Cleaning up...
Create pip repo for required thirdparty packages ...
----> Completed Installing Server Manager
----> Server Manager Cliff Client
    ----> Installing package Server Manager Cliff Client
----> Completed Installing Server Manager Cliff Client
----> Web Server Manager
    ----> Installing package Contrail Web Core
    ----> Installing package Contrail Web Server Manager
----> Completed Installing Web Server Manager
        ----> Starting Server Manager Lite Service
----> Reverting Repos to old state
SM installation took 10 minutes and 10 seconds.
    ----> Convert testbed.py to server manager entities
----> Pre provision checks to make sure setup is ready for contrail provisioning
Configuring => nodec33
[2017-02-09 04:04:42,005: exec_cmd] [error_on_fail]: Cmd (ping -q -c 1 puppet > /dev/null 2>@1) Failed
Traceback (most recent call last):
  File "/opt/contrail/server_manager/client/preconfig.py", line 488, in <module>
    Utils.preconfig(args)
  File "/opt/contrail/server_manager/client/preconfig.py", line 92, in preconfig
    hostobj.preconfig()
  File "/opt/contrail/server_manager/client/preconfig.py", line 226, in preconfig
    self.preconfig_hosts_file()
  File "/opt/contrail/server_manager/client/preconfig.py", line 263, in preconfig_hosts_file
    self.verify_puppet_host()
  File "/opt/contrail/server_manager/client/preconfig.py", line 255, in verify_puppet_host
    self.exec_cmd(ping_cmd, error_on_fail=True)
  File "/opt/contrail/server_manager/client/preconfig.py", line 210, in exec_cmd
    raise RuntimeError('[error_on_fail]: Cmd (%s) Failed' % original_cmd)
RuntimeError: [error_on_fail]: Cmd (ping -q -c 1 puppet > /dev/null 2>@1) Failed
Connection to 10.204.221.58 closed.

Issue seen only in SM Lite; Not seen in SM

sundarkh (sundar-kh)
tags: added: blocker
summary: SMLite:mainline:3037:Provisioning does not start with error at pre-
- config
+ config due to SM process running over docker0 IP
Revision history for this message
Nitish Krishna Kaveri (nitishk) wrote :

You need to give --hostip option to provision script if SM host has multiple interfaces OTHER than docker0.
This requirement hasn’t changed. You don’t have to give --hostip if docker0 is the only other interface.

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

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.