← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1657930] [NEW] neutron-db-manage fails with ImportError

 

Public bug reported:

Hi,

I am upgrading our OpenStack cluster from liberty to newton. But, I am
getting the following error when I run neutron-db-manage to sync the
neutron database. The upgrade of nova was successful but the neutron
processes fail to start (I am working on controller node for now). I am
guessing it is because of the fact that first I need to sync the
database where I get the following ImportError.

I am following the official Guide of the newtown installation (to
complete the upgrade) and every thing was fine to the point before
calling neutron-db-manage.

Can you please let me know your suggestion to fix this issue? 
 

root@controller:/var/log# /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf \  --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron
Traceback (most recent call last):
  File "/usr/local/bin/neutron-db-manage", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/dist-packages/neutron/db/migration/cli.py", line 686, in main
    return_val |= bool(CONF.command.func(config, CONF.command.name))
  File "/usr/lib/python2.7/dist-packages/neutron/db/migration/cli.py", line 205, in do_upgrade
    run_sanity_checks(config, revision)
  File "/usr/lib/python2.7/dist-packages/neutron/db/migration/cli.py", line 670, in run_sanity_checks
    script_dir.run_env()
  File "/usr/local/lib/python2.7/dist-packages/alembic/script/base.py", line 407, in run_env
    util.load_python_file(self.dir, 'env.py')
  File "/usr/local/lib/python2.7/dist-packages/alembic/util/pyfiles.py", line 93, in load_python_file
    module = load_module_py(module_id, path)
  File "/usr/local/lib/python2.7/dist-packages/alembic/util/compat.py", line 79, in load_module_py
    mod = imp.load_source(module_id, path, fp)
  File "/usr/lib/python2.7/dist-packages/neutron/db/migration/alembic_migrations/env.py", line 17, in <module>
    from neutron_lib.db import model_base
ImportError: cannot import name model_base


I can not even start neutron-server and the log file is empty. 


ahmad@controller:/var/log$ sudo service neutron-server start
ahmad@controller:/var/log$ 
ahmad@controller:/var/log$ 
ahmad@controller:/var/log$ service neutron-server status
● neutron-server.service - OpenStack Neutron Server
   Loaded: loaded (/lib/systemd/system/neutron-server.service; enabled; vendor preset: enabled)
   Active: inactive (dead) (Result: exit-code) since Thu 2017-01-19 19:48:12 EST; 6s ago
  Process: 13772 ExecStart=/etc/init.d/neutron-server systemd-start (code=exited, status=1/FAILURE)
  Process: 13769 ExecStartPre=/bin/chown neutron:adm /var/log/neutron (code=exited, status=0/SUCCESS)
  Process: 13766 ExecStartPre=/bin/chown neutron:neutron /var/lock/neutron /var/lib/neutron (code=exited, stat
  Process: 13763 ExecStartPre=/bin/mkdir -p /var/lock/neutron /var/log/neutron /var/lib/neutron (code=exited, 
 Main PID: 13772 (code=exited, status=1/FAILURE)

Jan 19 19:48:12 controller systemd[1]: neutron-server.service: Unit entered failed state.
Jan 19 19:48:12 controller systemd[1]: neutron-server.service: Failed with result 'exit-code'.
Jan 19 19:48:12 controller systemd[1]: neutron-server.service: Service hold-off time over, scheduling restart.
Jan 19 19:48:12 controller systemd[1]: Stopped OpenStack Neutron Server.
Jan 19 19:48:12 controller systemd[1]: neutron-server.service: Start request repeated too quickly.
Jan 19 19:48:12 controller systemd[1]: Failed to start OpenStack Neutron Server.
ahmad@controller:/var/log$ 
ahmad@controller:/var/log$ cat /var/log/neutron/neutron-server.log
ahmad@controller:/var/log$

** Affects: neutron
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1657930

Title:
  neutron-db-manage fails with ImportError

Status in neutron:
  New

Bug description:
  Hi,

  I am upgrading our OpenStack cluster from liberty to newton. But, I am
  getting the following error when I run neutron-db-manage to sync the
  neutron database. The upgrade of nova was successful but the neutron
  processes fail to start (I am working on controller node for now). I
  am guessing it is because of the fact that first I need to sync the
  database where I get the following ImportError.

  I am following the official Guide of the newtown installation (to
  complete the upgrade) and every thing was fine to the point before
  calling neutron-db-manage.

  Can you please let me know your suggestion to fix this issue? 
   

  root@controller:/var/log# /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf \  --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron
  Traceback (most recent call last):
    File "/usr/local/bin/neutron-db-manage", line 10, in <module>
      sys.exit(main())
    File "/usr/lib/python2.7/dist-packages/neutron/db/migration/cli.py", line 686, in main
      return_val |= bool(CONF.command.func(config, CONF.command.name))
    File "/usr/lib/python2.7/dist-packages/neutron/db/migration/cli.py", line 205, in do_upgrade
      run_sanity_checks(config, revision)
    File "/usr/lib/python2.7/dist-packages/neutron/db/migration/cli.py", line 670, in run_sanity_checks
      script_dir.run_env()
    File "/usr/local/lib/python2.7/dist-packages/alembic/script/base.py", line 407, in run_env
      util.load_python_file(self.dir, 'env.py')
    File "/usr/local/lib/python2.7/dist-packages/alembic/util/pyfiles.py", line 93, in load_python_file
      module = load_module_py(module_id, path)
    File "/usr/local/lib/python2.7/dist-packages/alembic/util/compat.py", line 79, in load_module_py
      mod = imp.load_source(module_id, path, fp)
    File "/usr/lib/python2.7/dist-packages/neutron/db/migration/alembic_migrations/env.py", line 17, in <module>
      from neutron_lib.db import model_base
  ImportError: cannot import name model_base

  
  I can not even start neutron-server and the log file is empty. 

  
  ahmad@controller:/var/log$ sudo service neutron-server start
  ahmad@controller:/var/log$ 
  ahmad@controller:/var/log$ 
  ahmad@controller:/var/log$ service neutron-server status
  ● neutron-server.service - OpenStack Neutron Server
     Loaded: loaded (/lib/systemd/system/neutron-server.service; enabled; vendor preset: enabled)
     Active: inactive (dead) (Result: exit-code) since Thu 2017-01-19 19:48:12 EST; 6s ago
    Process: 13772 ExecStart=/etc/init.d/neutron-server systemd-start (code=exited, status=1/FAILURE)
    Process: 13769 ExecStartPre=/bin/chown neutron:adm /var/log/neutron (code=exited, status=0/SUCCESS)
    Process: 13766 ExecStartPre=/bin/chown neutron:neutron /var/lock/neutron /var/lib/neutron (code=exited, stat
    Process: 13763 ExecStartPre=/bin/mkdir -p /var/lock/neutron /var/log/neutron /var/lib/neutron (code=exited, 
   Main PID: 13772 (code=exited, status=1/FAILURE)

  Jan 19 19:48:12 controller systemd[1]: neutron-server.service: Unit entered failed state.
  Jan 19 19:48:12 controller systemd[1]: neutron-server.service: Failed with result 'exit-code'.
  Jan 19 19:48:12 controller systemd[1]: neutron-server.service: Service hold-off time over, scheduling restart.
  Jan 19 19:48:12 controller systemd[1]: Stopped OpenStack Neutron Server.
  Jan 19 19:48:12 controller systemd[1]: neutron-server.service: Start request repeated too quickly.
  Jan 19 19:48:12 controller systemd[1]: Failed to start OpenStack Neutron Server.
  ahmad@controller:/var/log$ 
  ahmad@controller:/var/log$ cat /var/log/neutron/neutron-server.log
  ahmad@controller:/var/log$

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1657930/+subscriptions


Follow ups