kilo : ImportErrors due to packages missing : urllib3

Bug #1689675 reported by Sarath
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R4.0
Fix Committed
Critical
Nikhil Bansal
Trunk
Fix Committed
Critical
Nikhil Bansal

Bug Description

This is seen on Sanity / kilo

root@5a10s31:~# contrail-status
ssh root@10.87.36.18
Traceback (most recent call last):
  File "/usr/bin/contrail-status", line 14, in <module>
    from requests.packages.urllib3.exceptions import SubjectAltNameWarning
ImportError: No module named packages.urllib3.exceptions

======================================================================
ERROR: setUpClass (scripts.ecmp.test_ecmp.TestECMPSanityIPv6)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "scripts/ecmp/test_ecmp.py", line 955, in setUpClass
    super(TestECMPSanityIPv6, cls).setUpClass()
  File "scripts/ecmp/test_ecmp.py", line 27, in setUpClass
    super(TestECMPSanity, cls).setUpClass()
  File "common/ecmp/base.py", line 9, in setUpClass
    super(ECMPTestBase, cls).setUpClass()
  File "common/base.py", line 55, in setUpClass
    super(GenericTestBase, cls).setUpClass()
  File "test_v1.py", line 38, in setUpClass
    cls.admin_isolated_creds.setUp()
  File "common/isolated_creds.py", line 135, in setUp
    password=self.password)
  File "common/connections.py", line 62, in __init__
    self.vnc_lib = self.get_vnc_lib_h()
  File "common/connections.py", line 150, in get_vnc_lib_h
    env[attr].setUp()
  File "/contrail-test/fixtures/vnc_api_test.py", line 112, in setUp
    if self.orch:
  File "/contrail-test/fixtures/vnc_api_test.py", line 166, in orch
    self._orch = self.get_orch_h()
  File "/contrail-test/fixtures/vnc_api_test.py", line 178, in get_orch_h
    inputs=self.inputs)
  File "/contrail-test/fixtures/openstack.py", line 22, in __init__
    self.vcntr_handle = self.get_vcenter_handle()
  File "/contrail-test/fixtures/openstack.py", line 39, in get_vcenter_handle
    logger=self.logger)
  File "/contrail-test/fixtures/vcenter.py", line 134, in __init__
    self._nfs_ds = NFSDatastore(self._inputs, self)
  File "tcutils/util.py", line 1010, in __call__
    Singleton, cls).__call__(*args, **kwargs)
  File "/contrail-test/fixtures/vcenter.py", line 88, in __init__
    host.configManager.datastoreSystem.CreateNasDatastore(spec)
  File "/usr/local/lib/python2.7/dist-packages/pyVmomi/VmomiSupport.py", line 553, in <lambda>
    self.f(*(self.args + (obj,) + args), **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pyVmomi/VmomiSupport.py", line 362, in _InvokeMethod
    return self._stub.InvokeMethod(self, info, args)
  File "/usr/local/lib/python2.7/dist-packages/pyVmomi/SoapAdapter.py", line 1240, in InvokeMethod
    raise obj # pylint: disable-msg=E0702
vim.fault.PlatformConfigFault: (vim.fault.PlatformConfigFault) {
   dynamicType = <unset>,
   dynamicProperty = (vmodl.DynamicProperty) [],
   msg = 'An error occurred during host configuration.',
   faultCause = <unset>,
   faultMessage = (vmodl.LocalizableMessage) [
      (vmodl.LocalizableMessage) {
         dynamicType = <unset>,
         dynamicProperty = (vmodl.DynamicProperty) [],
         key = 'vob.sysinfo.set.failed',
         arg = (vmodl.KeyAnyValue) [
            (vmodl.KeyAnyValue) {
               dynamicType = <unset>,
               dynamicProperty = (vmodl.DynamicProperty) [],
               key = '1',
               value = 'VSI_MODULE_NODE_mount'
            },
            (vmodl.KeyAnyValue) {
               dynamicType = <unset>,
               dynamicProperty = (vmodl.DynamicProperty) [],
               key = '2',
               value = 'Unable to connect to NFS server'
            }
         ],
         message = 'Sysinfo set operation VSI_MODULE_NODE_mount failed with error status Unable to connect to NFS server.\n'
      },
      (vmodl.LocalizableMessage) {
         dynamicType = <unset>,
         dynamicProperty = (vmodl.DynamicProperty) [],
         key = 'vob.vmfs.nfs.mount.error.connect.failed',
         arg = (vmodl.KeyAnyValue) [
            (vmodl.KeyAnyValue) {
               dynamicType = <unset>,
               dynamicProperty = (vmodl.DynamicProperty) [],
               key = '1',
               value = '10.87.36.11'
            },
            (vmodl.KeyAnyValue) {
               dynamicType = <unset>,
               dynamicProperty = (vmodl.DynamicProperty) [],
               key = '2',
               value = '/nfs'
            }
         ],
         message = 'NFS mount 10.87.36.11:/nfs failed: Unable to connect to NFS server.'
      }
   ],
   text = ''
}

----------------------------------------------------------------------
Ran 0 tests in 39.662s

Sarath (nsarath)
summary: - Vcenter-as-compute: kilo : ImportErrors due to packages missing :
- urllib3
+ kilo : ImportErrors due to packages missing : urllib3
tags: added: packaging
Revision history for this message
Sarath (nsarath) wrote :

nsarath@ubuntu-build04:/auto/cores/1689675$ ls -ltrd *
-rwxrwxrwx 1 nsarath test 9779200 May 9 16:12 Ctrl-A-Utils.tar
-rwxrwxrwx 1 nsarath test 22743040 May 9 16:12 Esxi-2-log.tar
-rwxrwxrwx 1 nsarath test 22784000 May 9 16:12 Esxi-1-log.tar
-rwxrwxrwx 1 nsarath test 21401600 May 9 16:12 Kvm-1-log.tar
-rwxrwxrwx 1 nsarath test 121436160 May 9 16:12 Ctrl-A-log.tar
-rwxrwxrwx 1 nsarath test 197509120 May 9 16:12 Ctrl-B-log.tar
-rwxrwxrwx 1 nsarath test 226385920 May 9 16:12 Ctrl-C-log.tar

tags: removed: provisioning
Jeba Paulaiyan (jebap)
tags: added: provisioning sanity
Revision history for this message
amudhar (amudha) wrote :

root@5a10s23:~# contrail-status
Traceback (most recent call last):
  File "/usr/bin/contrail-status", line 14, in <module>
    from requests.packages.urllib3.exceptions import SubjectAltNameWarning
ImportError: No module named packages.urllib3.exceptions
root@5a10s23:~# dpkg -l | grep urllib3
ii python-urllib3 1.13.1-2 all HTTP library with thread-safe connection pooling for Python
ii python-urllib3-whl 1.9.1-3~cloud0 all HTTP library with thread-safe connection pooling
root@5a10s23:~#

The package is installed. The error seems to be due to some module we are calling from python-urllib3, which might have changed.

Please let analytics team take a look.

Thanks,
Amudha

Revision history for this message
Sarath (nsarath) wrote :

Assigning to analytics team per Amudha triaging comments.

Revision history for this message
Raj Reddy (rajreddy) wrote :

looks like version of requests is different in kilo

root@5a10s31:~# dpkg --list | grep requests
ii python-requests 2.2.1-1ubuntu0.3 all elegant and simple HTTP library for Python, built for human beings
ii python-requests-whl 2.4.3-6~cloud0 all elegant and simple HTTP library for Python, built for human beings

Versus on mitaka
root@a1s33:/opt/contrail/utils# dpkg --list | grep requests
ii python-requests 2.9.1-3~cloud0 all elegant and simple HTTP library for Python2, built for human beings
ii python-requests-whl 2.9.1-1ubuntu1~cloud0 all elegant and simple HTTP library for Python, built for human beings
ii python-requestsexceptions 1.1.2-0ubuntu1~cloud0 all import exceptions from bundled packages in requests. - Python 2.7

Raj Reddy (rajreddy)
tags: added: analytics
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.0

Review in progress for https://review.opencontrail.org/31373
Submitter: Nikhil Bansal (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/31374
Submitter: Nikhil Bansal (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/31373
Committed: http://github.com/Juniper/contrail-controller/commit/b866f7937808ec6fd71f0f878d83b37927f097e3
Submitter: Zuul (<email address hidden>)
Branch: R4.0

commit b866f7937808ec6fd71f0f878d83b37927f097e3
Author: Nikhil B <email address hidden>
Date: Thu May 11 08:47:35 2017 +0530

using system level urllib3 if not preent in requests package

Some requests packages have their own urllib3 package bundled but some others
don't. Need to take care of both the cases
Closes-Bug: #1689675

Change-Id: Ia88e5e110544e8f4c2a3ac2dc5b72ed0fa0d087b

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

Review in progress for https://review.opencontrail.org/31374
Submitter: Nikhil Bansal (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/31374
Committed: http://github.com/Juniper/contrail-controller/commit/22ecd1060f86150cde40063d1ad0a24d1937b909
Submitter: Zuul (<email address hidden>)
Branch: master

commit 22ecd1060f86150cde40063d1ad0a24d1937b909
Author: Nikhil B <email address hidden>
Date: Thu May 11 08:47:35 2017 +0530

using system level urllib3 if not preent in requests package

Some requests packages have their own urllib3 package bundled but some others
don't. Need to take care of both the cases
Closes-Bug: #1689675
Closes-Bug: #1691603
Change-Id: Ia88e5e110544e8f4c2a3ac2dc5b72ed0fa0d087b
(cherry picked from commit b866f7937808ec6fd71f0f878d83b37927f097e3)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.