← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 1713059] Re: drop db sync commands from OpenStack packages

 

This bug was fixed in the package aodh - 5.0.0-0ubuntu2

---------------
aodh (5.0.0-0ubuntu2) artful; urgency=medium

  * d/aodh-common.postinst: Drop db sync (LP: #1713059).

 -- Corey Bryant <corey.bryant@xxxxxxxxxxxxx>  Tue, 29 Aug 2017 10:57:40
-0400

** Changed in: aodh (Ubuntu Artful)
       Status: Triaged => Fix Released

** Changed in: ceilometer (Ubuntu Artful)
       Status: Triaged => Fix Released

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1713059

Title:
  drop db sync commands from OpenStack packages

Status in aodh package in Ubuntu:
  Fix Released
Status in ceilometer package in Ubuntu:
  Fix Released
Status in cinder package in Ubuntu:
  Triaged
Status in glance package in Ubuntu:
  Fix Released
Status in ironic package in Ubuntu:
  Fix Released
Status in keystone package in Ubuntu:
  Triaged
Status in manila package in Ubuntu:
  Triaged
Status in nova package in Ubuntu:
  Confirmed
Status in openstack-trove package in Ubuntu:
  Triaged
Status in panko package in Ubuntu:
  Fix Released
Status in aodh source package in Xenial:
  Invalid
Status in ceilometer source package in Xenial:
  Invalid
Status in cinder source package in Xenial:
  Invalid
Status in glance source package in Xenial:
  Invalid
Status in ironic source package in Xenial:
  Invalid
Status in keystone source package in Xenial:
  Invalid
Status in manila source package in Xenial:
  Invalid
Status in nova source package in Xenial:
  Triaged
Status in openstack-trove source package in Xenial:
  Invalid
Status in panko source package in Xenial:
  Invalid
Status in aodh source package in Zesty:
  Invalid
Status in ceilometer source package in Zesty:
  Invalid
Status in cinder source package in Zesty:
  Invalid
Status in glance source package in Zesty:
  Invalid
Status in ironic source package in Zesty:
  Invalid
Status in keystone source package in Zesty:
  Invalid
Status in manila source package in Zesty:
  Invalid
Status in nova source package in Zesty:
  Triaged
Status in openstack-trove source package in Zesty:
  Invalid
Status in panko source package in Zesty:
  Invalid
Status in aodh source package in Artful:
  Fix Released
Status in ceilometer source package in Artful:
  Fix Released
Status in cinder source package in Artful:
  Triaged
Status in glance source package in Artful:
  Fix Released
Status in ironic source package in Artful:
  Fix Released
Status in keystone source package in Artful:
  Triaged
Status in manila source package in Artful:
  Triaged
Status in nova source package in Artful:
  Confirmed
Status in openstack-trove source package in Artful:
  Triaged
Status in panko source package in Artful:
  Fix Released

Bug description:
  The original reason this bug was opened is that nova db sync is
  executed when the 'connection' is not defined. Let's fix that and at
  the same time drop all db syncs from OpenStack packages in Pike.

  More on the nova issue:

  When the 'connection' configuration key is NOT defined in
  /etc/nova/nova.conf the nova-common.postinst script still tries to run
  'nova-manage db sync'

  root@juju-b24bc9-mno-18:~# grep connection /etc/nova/nova.conf
  root@juju-b24bc9-mno-18:~# dpkg-reconfigure nova-common
  Option "logdir" from group "DEFAULT" is deprecated. Use option "log-dir" from group "DEFAULT".
  Option "verbose" from group "DEFAULT" is deprecated for removal.  Its value may be silently ignored in the future.
  ERROR: could not access cell mapping database - has api db been created?
  An error has occurred:
  Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/nova/cmd/manage.py", line 1602, in main
      ret = fn(*fn_args, **fn_kwargs)
    File "/usr/lib/python2.7/dist-packages/nova/cmd/manage.py", line 645, in sync
      return migration.db_sync(version)
    File "/usr/lib/python2.7/dist-packages/nova/db/migration.py", line 26, in db_sync
      return IMPL.db_sync(version=version, database=database, context=context)
    File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/migration.py", line 57, in db_sync
      repository, version)
    File "/usr/lib/python2.7/dist-packages/migrate/versioning/api.py", line 186, in upgrade
      return _migrate(url, repository, version, upgrade=True, err=err, **opts)
    File "<decorator-gen-15>", line 2, in _migrate
    File "/usr/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py", line 160, in with_engine
      return f(*a, **kw)
    File "/usr/lib/python2.7/dist-packages/migrate/versioning/api.py", line 366, in _migrate
      schema.runchange(ver, change, changeset.step)
    File "/usr/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 93, in runchange
      change.run(self.engine, step)
    File "/usr/lib/python2.7/dist-packages/migrate/versioning/script/py.py", line 148, in run
      script_func(engine)
    File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/migrate_repo/versions/345_require_online_migration_completion.py", line 44, in upgrade
      raise exception.ValidationError(detail=msg)
  ValidationError: Migration cannot continue until all these have been migrated to the api database. Please run `nova-manage db online_migrations' on Newton code before continuing.There are still 5 unmigrated flavors.

  Running the postinst script manually with -x

  root@juju-b24bc9-mno-18:~# bash -ex /var/lib/dpkg/info/nova-common.postinst configure
  + '[' configure = configure ']'
  + getent group nova
  + getent passwd nova
  + '[' -z '' ']'
  + chown -R nova:nova /var/lib/nova/
  + chown -R nova:nova /etc/nova
  + chown -R nova:adm /var/log/nova
  + '[' -z '' ']'
  + chown -R nova:nova /var/lib/nova/
  + chmod 0640 /etc/nova/nova.conf
  + chmod 0640 /etc/nova/api-paste.ini
  + chmod 0750 /etc/nova
  + chmod 0750 /var/log/nova
  + chown root:root /etc/nova/rootwrap.conf
  + chown root:root /etc/nova/rootwrap.d
  + chmod 0755 /etc/nova/rootwrap.d
  + grep -qE '^(sql_)?connection( )?=.*' /etc/nova/nova.conf
  + su -s /bin/sh -c 'nova-manage db sync' nova
  Option "logdir" from group "DEFAULT" is deprecated. Use option "log-dir" from group "DEFAULT".
  Option "verbose" from group "DEFAULT" is deprecated for removal.  Its value may be silently ignored in the future.
  ERROR: could not access cell mapping database - has api db been created?
  An error has occurred:
  Traceback (most recent call last):
  ...
  ValidationError: Migration cannot continue until all these have been migrated to the api database. Please run `nova-manage db online_migrations' on Newton code before continuing.There are still 5 unmigrated flavors.

  The condition to run the sync operation should be that the connection
  config key is defined in nova.conf

  # diff -u /var/lib/dpkg/info/nova-common.postinst ./nova-common.postinst
  --- /var/lib/dpkg/info/nova-common.postinst     2017-06-19 08:12:49.000000000 +0000
  +++ ./nova-common.postinst      2017-08-25 13:08:48.852744427 +0000
  @@ -47,8 +47,8 @@
       chown root:root /etc/nova/rootwrap.d
       chmod 0755 /etc/nova/rootwrap.d

  -    if ! grep -qE "^(sql_)?connection( )?=.*" /etc/nova/nova.conf || \
  -         grep -qE "^(sql_)?connection.*sqlite.*" /etc/nova/nova.conf
  +    if grep -qE "^(sql_)?connection( )?=.*" /etc/nova/nova.conf || \
  +       grep -qE "^(sql_)?connection.*sqlite.*" /etc/nova/nova.conf
       then
         su -s /bin/sh -c 'nova-manage db sync' nova
       fi

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/aodh/+bug/1713059/+subscriptions