← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1413859] [NEW] neutron-db-manage sync failed

 

Public bug reported:

when use this "su -s /bin/sh -c "neutron-db-manage --config-file
/etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini upgrade
head" neutron " , report error below:

INFO  [alembic.migration] Context impl MySQLImpl.
INFO  [alembic.migration] Will assume non-transactional DDL.
Traceback (most recent call last):
  File "/usr/bin/neutron-db-manage", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 141, in main
    CONF.command.func(config, CONF.command.name)
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 78, in do_upgrade_downgrade
    do_alembic_command(config, cmd, revision, sql=CONF.command.sql)
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 57, in do_alembic_command
    getattr(alembic_command, cmd)(config, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/alembic/command.py", line 125, in upgrade
    script.run_env()
  File "/usr/lib/python2.7/site-packages/alembic/script.py", line 203, in run_env
    util.load_python_file(self.dir, 'env.py')
  File "/usr/lib/python2.7/site-packages/alembic/util.py", line 212, in load_python_file
    module = load_module_py(module_id, path)
  File "/usr/lib/python2.7/site-packages/alembic/compat.py", line 58, in load_module_py
    mod = imp.load_source(module_id, path, fp)
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/alembic_migrations/env.py", line 103, in <module>
    run_migrations_online()
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/alembic_migrations/env.py", line 87, in run_migrations_online
    options=build_options())
  File "<string>", line 7, in run_migrations
  File "/usr/lib/python2.7/site-packages/alembic/environment.py", line 688, in run_migrations
    self.get_context().run_migrations(**kw)
  File "/usr/lib/python2.7/site-packages/alembic/migration.py", line 242, in run_migrations
    self):
  File "/usr/lib/python2.7/site-packages/alembic/command.py", line 114, in upgrade
    return script._upgrade_revs(revision, rev)
  File "/usr/lib/python2.7/site-packages/alembic/script.py", line 183, in _upgrade_revs
    for script in reversed(list(revs))
  File "/usr/lib/python2.7/site-packages/alembic/script.py", line 165, in _iterate_revisions
    lower = self.get_revision(lower)
  File "/usr/lib/python2.7/site-packages/alembic/script.py", line 102, in get_revision
    return self._revision_map[id_]
  File "/usr/lib/python2.7/site-packages/alembic/util.py", line 268, in __get__
    obj.__dict__[self.__name__] = result = self.fget(obj)
  File "/usr/lib/python2.7/site-packages/alembic/script.py", line 213, in _revision_map
    script = Script._from_filename(self, self.versions, file_)
  File "/usr/lib/python2.7/site-packages/alembic/script.py", line 496, in _from_filename
    module = util.load_python_file(dir_, filename)
  File "/usr/lib/python2.7/site-packages/alembic/util.py", line 212, in load_python_file
    module = load_module_py(module_id, path)
  File "/usr/lib/python2.7/site-packages/alembic/compat.py", line 58, in load_module_py
    mod = imp.load_source(module_id, path, fp)
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/alembic_migrations/versions/d06e871c0d5_set_admin_state_up_not_null_ml2.py", line 38, in <module>
    @migration.skip_if_offline
AttributeError: 'module' object has no attribute 'skip_if_offline'

** 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/1413859

Title:
  neutron-db-manage sync failed

Status in OpenStack Neutron (virtual network service):
  New

Bug description:
  when use this "su -s /bin/sh -c "neutron-db-manage --config-file
  /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini
  upgrade head" neutron " , report error below:

  INFO  [alembic.migration] Context impl MySQLImpl.
  INFO  [alembic.migration] Will assume non-transactional DDL.
  Traceback (most recent call last):
    File "/usr/bin/neutron-db-manage", line 10, in <module>
      sys.exit(main())
    File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 141, in main
      CONF.command.func(config, CONF.command.name)
    File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 78, in do_upgrade_downgrade
      do_alembic_command(config, cmd, revision, sql=CONF.command.sql)
    File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 57, in do_alembic_command
      getattr(alembic_command, cmd)(config, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/alembic/command.py", line 125, in upgrade
      script.run_env()
    File "/usr/lib/python2.7/site-packages/alembic/script.py", line 203, in run_env
      util.load_python_file(self.dir, 'env.py')
    File "/usr/lib/python2.7/site-packages/alembic/util.py", line 212, in load_python_file
      module = load_module_py(module_id, path)
    File "/usr/lib/python2.7/site-packages/alembic/compat.py", line 58, in load_module_py
      mod = imp.load_source(module_id, path, fp)
    File "/usr/lib/python2.7/site-packages/neutron/db/migration/alembic_migrations/env.py", line 103, in <module>
      run_migrations_online()
    File "/usr/lib/python2.7/site-packages/neutron/db/migration/alembic_migrations/env.py", line 87, in run_migrations_online
      options=build_options())
    File "<string>", line 7, in run_migrations
    File "/usr/lib/python2.7/site-packages/alembic/environment.py", line 688, in run_migrations
      self.get_context().run_migrations(**kw)
    File "/usr/lib/python2.7/site-packages/alembic/migration.py", line 242, in run_migrations
      self):
    File "/usr/lib/python2.7/site-packages/alembic/command.py", line 114, in upgrade
      return script._upgrade_revs(revision, rev)
    File "/usr/lib/python2.7/site-packages/alembic/script.py", line 183, in _upgrade_revs
      for script in reversed(list(revs))
    File "/usr/lib/python2.7/site-packages/alembic/script.py", line 165, in _iterate_revisions
      lower = self.get_revision(lower)
    File "/usr/lib/python2.7/site-packages/alembic/script.py", line 102, in get_revision
      return self._revision_map[id_]
    File "/usr/lib/python2.7/site-packages/alembic/util.py", line 268, in __get__
      obj.__dict__[self.__name__] = result = self.fget(obj)
    File "/usr/lib/python2.7/site-packages/alembic/script.py", line 213, in _revision_map
      script = Script._from_filename(self, self.versions, file_)
    File "/usr/lib/python2.7/site-packages/alembic/script.py", line 496, in _from_filename
      module = util.load_python_file(dir_, filename)
    File "/usr/lib/python2.7/site-packages/alembic/util.py", line 212, in load_python_file
      module = load_module_py(module_id, path)
    File "/usr/lib/python2.7/site-packages/alembic/compat.py", line 58, in load_module_py
      mod = imp.load_source(module_id, path, fp)
    File "/usr/lib/python2.7/site-packages/neutron/db/migration/alembic_migrations/versions/d06e871c0d5_set_admin_state_up_not_null_ml2.py", line 38, in <module>
      @migration.skip_if_offline
  AttributeError: 'module' object has no attribute 'skip_if_offline'

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


Follow ups

References