[ 4.0.3.0-113] Server-Manager: In preconfig.py, Connection to server is failing

Bug #1731181 reported by Ankit Jain
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
New
Undecided
Abhay Joshi
R4.0
New
Undecided
Abhay Joshi

Bug Description

preconfig.py fails with the following error when the provisioning is issued.

The issue is seen only when it's not a fresh install. Fresh provisioning works as expected, re triggering the provisioning script ( provision_containers.sh or preconfig.py) fails.

Please provision the system, and once the setup is up and running then issue the following cmd to reproduce the issue..

/opt/contrail/server_manager/client/preconfig.py --server-json /var/log/contrail/sm_provisioning/2017_11_08__13_34_06/server.json --server-manager-ip 10.204.217.117 --server-manager-repo-port 80

> [2017-11-08 19:50:33,952: exec_cmd] [error_on_fail]: Cmd (DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" install ifenslave-2.6) Failed
Traceback (most recent call last):
  File "/opt/contrail/server_manager/client/preconfig.py", line 646, in <module>
    Utils.preconfig(args)
  File "/opt/contrail/server_manager/client/preconfig.py", line 112, in preconfig
    raise RuntimeError('Connection to (%s) Failed' % hostobj.ip)
RuntimeError: Connection to (10.204.217.31) Failed

Workaround for this is:-

>>> mkdir /etc/apt/restore ; mv /etc/apt/sources.list.d/* /etc/apt/restore/ ; apt-get update

Run the above commands on all the servers vm1 to vm5 before preconfig/provision_containers is run

self.exec_cmd('mkdir /etc/apt/restore ; mv /etc/apt/sources.list.d/* /etc/apt/restore/ ; apt-get update')

    def install_packages(self, sku):
        os_type, version, misc = self.os_version
        if os_type.lower() == 'ubuntu' and version == '12.04':
            packages_list = self.extra_packages_12_04
        elif os_type.lower() == 'ubuntu' and version == '14.04':
            packages_list = self.extra_packages_14_04
        elif os_type.lower() == 'ubuntu' and version == '16.04':
            if sku != 'ocata':
                packages_list = self.extra_packages_16_04
            else:
                packages_list = self.extra_packages_16_04_no_puppet
        else:
            raise RuntimeError('UnSupported OS type (%s)' % self.os_version)
        #self.exec_cmd('mkdir /etc/apt/restore ; mv /etc/apt/sources.list.d/* /etc/apt/restore/ ; apt-get update')
        for package in packages_list:
            self.exec_cmd('DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" install %s' % package, error_on_fail=True)
        # remove the existing the driver to install the one you want
        self.exec_cmd('rmmod i40e')
        self.exec_cmd('modprobe i40e')
        self.exec_cmd('rmmod bnxt_en')
        self.exec_cmd('modprobe bnxt_en')
        self.exec_cmd('update-initramfs -k all -u')

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.