Comment 7 for bug 1943938

Revision history for this message
chandan kumar (chkumar246) wrote :

By testing with dnm patch https://review.opendev.org/c/openstack/tripleo-quickstart/+/837455/ with depends on https://review.opendev.org/c/openstack/tripleo-heat-templates/+/836596, the above issue is fixed but now undercloud-upgrade is failing with different error [1].
```
Failure running exec 'keystone_bootstrap'. rc=1, stdout=, stderr=
2022-04-12 07:18:43 | 2022-04-12 07:18:43.486121 | fa163e9f-c470-b3fd-9b14-000000001b51 | FATAL | Create containers managed by Podman for /var/lib/tripleo-config/container-startup-config/step_3 | undercloud | error={"changed": false, "msg": "Failed containers: ironic_db_sync, keystone_bootstrap"}
```
and while taking a look at failed container logs
https://6ef3897d43ca5b2f7eff-13a1490981ac67093979241f62e5a9df.ssl.cf2.rackcdn.com/837455/1/check/tripleo-ci-centos-9-undercloud-upgrade/181b185/logs/undercloud/var/log/extra/podman/containers/ironic_db_sync/stdout.log

```
+ echo 'Running command: '\''/usr/bin/bootstrap_host_exec ironic_api su ironic -s /bin/bash -c '\''ironic-dbsync --config-file /etc/ironic/ironic.conf'\'''\'''
Running command: '/usr/bin/bootstrap_host_exec ironic_api su ironic -s /bin/bash -c 'ironic-dbsync --config-file /etc/ironic/ironic.conf''
+ exec /usr/bin/bootstrap_host_exec ironic_api su ironic -s /bin/bash -c ''\''ironic-dbsync' --config-file '/etc/ironic/ironic.conf'\'''
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
INFO [alembic.runtime.migration] Running upgrade -> 2581ebaf0cb2, initial migration
INFO [alembic.runtime.migration] Running upgrade 2581ebaf0cb2 -> 21b331f883ef, Add provision_updated_at
INFO [alembic.runtime.migration] Running upgrade 21b331f883ef -> 3cb628139ea4, Nodes add console enabled
INFO [alembic.runtime.migration] Running upgrade 3cb628139ea4 -> 31baaf680d2b, Add Node instance info
INFO [alembic.runtime.migration] Running upgrade 31baaf680d2b -> 3bea56f25597, add unique constraint to instance_uuid
CRITI [ironic] Unhandled error
Traceback (most recent call last):
  File "/usr/bin/ironic-dbsync", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.9/site-packages/ironic/cmd/dbsync.py", line 342, in main
    CONF.command.func()
  File "/usr/lib/python3.9/site-packages/ironic/cmd/dbsync.py", line 121, in upgrade
    migration.upgrade(CONF.command.revision)
  File "/usr/lib/python3.9/site-packages/ironic/db/migration.py", line 36, in upgrade
    return get_backend().upgrade(version)
  File "/usr/lib/python3.9/site-packages/ironic/db/sqlalchemy/migration.py", line 56, in upgrade
    alembic.command.upgrade(config, revision or 'head')
  File "/usr/lib/python3.9/site-packages/alembic/command.py", line 320, in upgrade
    script.run_env()
  File "/usr/lib/python3.9/site-packages/alembic/script/base.py", line 563, in run_env
    util.load_python_file(self.dir, "env.py")
  File "/usr/lib/python3.9/site-packages/alembic/util/pyfiles.py", line 92, in load_python_file
    module = load_module_py(module_id, path)
  File "/usr/lib/python3.9/site-packages/alembic/util/pyfiles.py", line 108, in load_module_py
    spec.loader.exec_module(module) # type: ignore
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/lib/python3.9/site-packages/ironic/db/sqlalchemy/alembic/env.py", line 61, in <module>
    run_migrations_online()
  File "/usr/lib/python3.9/site-packages/ironic/db/sqlalchemy/alembic/env.py", line 58, in run_migrations_online
    context.run_migrations()
  File "<string>", line 8, in run_migrations
  File "/usr/lib/python3.9/site-packages/alembic/runtime/environment.py", line 851, in run_migrations
    self.get_context().run_migrations(**kw)
  File "/usr/lib/python3.9/site-packages/alembic/runtime/migration.py", line 612, in run_migrations
    step.migration_fn(**kw)
  File "/usr/lib/python3.9/site-packages/ironic/db/sqlalchemy/alembic/versions/3bea56f25597_add_unique_constraint_to_instance_uuid.py", line 32, in upgrade
    op.create_unique_constraint("uniq_nodes0instance_uuid", "nodes",
  File "<string>", line 8, in create_unique_constraint
  File "<string>", line 3, in create_unique_constraint
  File "/usr/lib/python3.9/site-packages/alembic/operations/ops.py", line 478, in create_unique_constraint
    return operations.invoke(op)
  File "/usr/lib/python3.9/site-packages/alembic/operations/base.py", line 387, in invoke
    return fn(self, operation)
  File "/usr/lib/python3.9/site-packages/alembic/operations/toimpl.py", line 175, in create_constraint
    operations.impl.add_constraint(
  File "/usr/lib/python3.9/site-packages/alembic/ddl/sqlite.py", line 68, in add_constraint
    raise NotImplementedError(
NotImplementedError: No support for ALTER of constraints in SQLite dialectPlease refer to the batch mode feature which allows for SQLite migrations using a copy-and-move strategy.

```

[1]. https://6ef3897d43ca5b2f7eff-13a1490981ac67093979241f62e5a9df.ssl.cf2.rackcdn.com/837455/1/check/tripleo-ci-centos-9-undercloud-upgrade/181b185/logs/undercloud/home/zuul/undercloud_upgrade.log