← Back to team overview

group.of.nepali.translators team mailing list archive

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

 

** Also affects: cloud-archive/pike
   Importance: Undecided
       Status: New

** Also affects: cloud-archive/ocata
   Importance: Undecided
       Status: New

** Also affects: cloud-archive/newton
   Importance: Undecided
       Status: New

** Also affects: cloud-archive/mitaka
   Importance: Undecided
       Status: New

** Changed in: cloud-archive/mitaka
   Importance: Undecided => High

** Changed in: cloud-archive/mitaka
       Status: New => Triaged

** Changed in: cloud-archive/newton
   Importance: Undecided => High

** Changed in: cloud-archive/newton
       Status: New => Triaged

** Changed in: cloud-archive/ocata
   Importance: Undecided => High

** Changed in: cloud-archive/ocata
       Status: New => Triaged

** Changed in: cloud-archive/pike
   Importance: Undecided => High

** Changed in: cloud-archive/pike
       Status: New => Triaged

-- 
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 Ubuntu Cloud Archive:
  Triaged
Status in Ubuntu Cloud Archive mitaka series:
  Triaged
Status in Ubuntu Cloud Archive newton series:
  Triaged
Status in Ubuntu Cloud Archive ocata series:
  Triaged
Status in Ubuntu Cloud Archive pike series:
  Triaged
Status in aodh package in Ubuntu:
  Fix Released
Status in ceilometer package in Ubuntu:
  Fix Released
Status in cinder package in Ubuntu:
  Fix Released
Status in glance package in Ubuntu:
  Fix Released
Status in ironic package in Ubuntu:
  Fix Released
Status in keystone package in Ubuntu:
  Fix Released
Status in manila package in Ubuntu:
  Fix Released
Status in nova package in Ubuntu:
  Fix Released
Status in openstack-trove package in Ubuntu:
  Fix Released
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:
  Fix Released
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:
  Fix Released
Status in manila source package in Artful:
  Fix Released
Status in nova source package in Artful:
  Fix Released
Status in openstack-trove source package in Artful:
  Fix Released
Status in panko source package in Artful:
  Fix Released

Bug description:
  [Impact]

  nova-compute service does not need access to the database, systems
  where nova.conf is configured without a database connection the nova-
  common package will fail to get configured

  [Test Case]

  Using this deployer bundle -> http://paste.ubuntu.com/25426891/
  juju-deployer -c bundle.yaml -d -v -s 10 xenial-mitaka
  # once everything is installed
  git clone https://github.com/openstack-charmers/openstack-charms-tools.git
  cd openstack-charms-tools/
  ./os-upgrade.py -o cloud:xenial-newton

  Expected result:

  nova-compute units upgrade their packages to newton without errors

  Actual result:

  nova-common fails to configure itself in the nova-compute units

  [Regression Potential]

  This change was tested in a staging environment and no regressions
  were detected, but any possible regression will express itself as a
  failure running "nova-manage db sync".

  [Other Info]
  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/cloud-archive/+bug/1713059/+subscriptions