maas-deployer failed on already install maas

Bug #1545574 reported by Narinder Gupta
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
maas-deployer
New
Wishlist
Unassigned

Bug Description

I am seeing this issue when i am trying to deploy maas on orange pod2 again. MAAS is up and running but when i tried to redploy it then getting the below issue. Looks like something is fishy in this environment.

+ sudo maas-deployer -c deployment.yaml -d --force
Traceback (most recent call last):
  File "/usr/bin/maas-deployer", line 9, in <module>
    load_entry_point('maas-deployer==0.0.1', 'console_scripts', 'maas-deployer')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 558, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
    return ep.load()openstack-charmers
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2355, in load
    return self.resolve()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2361, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python2.7/dist-packages/maas_deployer/cli.py", line 25, in <module>
    from maas_deployer.vmaas.engine import DeploymentEngine
  File "/usr/lib/python2.7/dist-packages/maas_deployer/vmaas/engine.py", line 28, in <module>
    from maas_deployer.vmaas.maasclient import (
  File "/usr/lib/python2.7/dist-packages/maas_deployer/vmaas/maasclient/__init__.py", line 8, in <module>
    from maas_deployer.vmaas.maasclient.apidriver import APIDriver
  File "/usr/lib/python2.7/dist-packages/maas_deployer/vmaas/maasclient/apidriver.py", line 9, in <module>
    from apiclient import maas_client as maas
ImportError: cannot import name maas_client
FAILED - MAAS Deploy FAILED
Build step 'Execute shell' marked build as failure
Finished: FAILURE

Revision history for this message
Edward Hope-Morley (hopem) wrote :

Hi Narinder, first comment i'd make which is not directly related is that you should not run maas-deployer as root (there is no need to). Second, can you tell me what version of python-maas-client you have installed? (the above would indicate that somehow you do not have this installed anymore yet it is a package dependency of maas-deployer).

Revision history for this message
Narinder Gupta (narindergupta) wrote :

I tried all means removing the maas-deployer and python-maas-client and other components. And still finding the same issue only on this server. I have two other systems where issue was not seen. I can not reimage this server as this is main CI server.

here is pytthon maas-client.
python-maas-client:
  Installed: 1.9.0+bzr4533-0ubuntu1~trusty1
  Candidate: 1.9.0+bzr4533-0ubuntu1~trusty1
  Version table:
 *** 1.9.0+bzr4533-0ubuntu1~trusty1 0
        500 http://ppa.launchpad.net/maas/stable/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
     1.7.6+bzr3376-0ubuntu2~14.04.1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
     1.5.4+bzr2294-0ubuntu1.2 0
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     1.5+bzr2252-0ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
jenkins@jumphost2:~$

jenkins@jumphost2:~$ sudo apt-cache policy maas-deployer
maas-deployer:
  Installed: 0.0.5-0ubuntu0
  Candidate: 0.0.5-0ubuntu0
  Version table:
 *** 0.0.5-0ubuntu0 0
        500 http://ppa.launchpad.net/maas-deployers/stable/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
jenkins@jumphost2:~$

Revision history for this message
Narinder Gupta (narindergupta) wrote :

Today i got another unit exhibiting the same behavior so virus is spreading before it affects the real customers. We need to understand the issue and find the root cause.

Revision history for this message
Narinder Gupta (narindergupta) wrote :

+ sudo maas-deployer -c deployment.yaml -d --force
Traceback (most recent call last):
  File "/usr/bin/maas-deployer", line 9, in <module>
    load_entry_point('maas-deployer==0.0.6', 'console_scripts', 'maas-deployer')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 558, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2355, in load
    return self.resolve()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2361, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python2.7/dist-packages/maas_deployer/cli.py", line 25, in <module>
    from maas_deployer.vmaas.engine import DeploymentEngine
  File "/usr/lib/python2.7/dist-packages/maas_deployer/vmaas/engine.py", line 28, in <module>
    from maas_deployer.vmaas.maasclient import (
  File "/usr/lib/python2.7/dist-packages/maas_deployer/vmaas/maasclient/__init__.py", line 8, in <module>
    from maas_deployer.vmaas.maasclient.apidriver import APIDriver
  File "/usr/lib/python2.7/dist-packages/maas_deployer/vmaas/maasclient/apidriver.py", line 9, in <module>
    from apiclient import maas_client as maas
ImportError: cannot import name maas_client
jenkins@jumphostpod6:~/opnfv/slave_root/workspace/joid-deploy-intel-pod6-daily-master/ci$

Revision history for this message
Edward Hope-Morley (hopem) wrote :

Hi Narinder, can I ask you for the following:

  * please upgrade to the latest maas client
  * confirm that the issue still exists with the latest packages (currently 1.9.1+bzr4543-0ubuntu1~trusty1)
  * provide the output of dpkg -l| grep maas

Revision history for this message
Narinder Gupta (narindergupta) wrote :

i still can see same issue with latest maas client as well.
any maas commands can not run simple export also failing.

jenkins@jumphost2:~$ maas maas nodes list
/usr/bin/python: No module named maas_client; 'maascli' is a package and cannot be directly executed
jenkins@jumphost2:~$

jenkins@jumphost2:~$ dpkg -l | grep maas
ii maas-cli 1.9.1+bzr4543-0ubuntu1~trusty1 all MAAS command line API tool
ii maas-deployer 0.0.6-0ubuntu0.1 all MAAS cluster deployment tool.
ii python-maas-client 1.9.1+bzr4543-0ubuntu1~trusty1 all MAAS python API client
jenkins@jumphost2:~$

Revision history for this message
Billy Olsen (billy-olsen) wrote :

I think something is FUBAR with the python-maas-client installation here. I think purging and reinstalling may fix your problem.

Revision history for this message
Narinder Gupta (narindergupta) wrote :

still finding the same issue after doing the purge and reinstall.

Revision history for this message
Narinder Gupta (narindergupta) wrote :

finally got the problem when we pip install google-api-python-client then it creates an path entry of /usr/local/lib/python2.7/dist-packages/googleapiclient
so /usr/local/lib/python2.7/dist-packages/ is before /usr/lib/python2.7/dist-packages/ in path which casues the issue. After removing the google-api-python-client it worked fine but I think it has to be fixed in package also so in case of mutiple option in path it should able to figure it out.

Changed in maas-deployer:
importance: Undecided → Wishlist
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.