Hello,
Upgrading from 21.02 to 21.05 with wazo-upgrade cli command.
Two errors happened:
2021-05-03 12:21:21,367 [23754] (INFO) (wazo_call_logd.main_migrate_db): Removing old tables...
2021-05-03 12:21:21,422 [23754] (CRITICAL) (root): ERREUR: ne peut pas supprimer les objets désirés car d'autres objets en dépendent
DETAIL: contrainte cel_call_log_id_fkey sur table cel dépend de table call_log
HINT: Utilisez DROP ... CASCADE pour supprimer aussi les objets dépendants.
Traceback (most recent call last):
File "/bin/wazo-call-logd-migrate-db", line 11, in <module>
load_entry_point('wazo-call-logd==1.2', 'console_scripts', 'wazo-call-logd-migrate-db')()
File "/usr/lib/python3/dist-packages/wazo_call_logd/main_migrate_db.py", line 77, in main
migrate_call_log_tables(config, options.get('max_entries'))
File "/usr/lib/python3/dist-packages/wazo_call_logd/main_migrate_db.py", line 222, in migrate_call_log_tables
cel_cur.execute(query)
psycopg2.InternalError: ERREUR: ne peut pas supprimer les objets désirés car d'autres objets en dépendent
DETAIL: contrainte cel_call_log_id_fkey sur table cel dépend de table call_log
HINT: Utilisez DROP ... CASCADE pour supprimer aussi les objets dépendants.
Enabling Wazo services...
–
Executing upgrade script /usr/share/wazo-upgrade/post-start.d/45-confd-sync.sh...
2021-05-03 12:22:02,042 [24631] (CRITICAL) (root): (psycopg2.ProgrammingError) ERREUR: la colonne tenant.slug n'existe pas
LINE 1: SELECT tenant.uuid AS tenant_uuid, tenant.slug AS tenant_slu...
^
[SQL: 'SELECT tenant.uuid AS tenant_uuid, tenant.slug AS tenant_slug, tenant.sip_templates_generated AS tenant_sip_templates_generated, tenant.global_sip_template_uuid AS tenant_global_sip_template_uuid, tenant.webrtc_sip_template_uuid AS tenant_webrtc_sip_template_uuid, tenant.webrtc_video_sip_template_uuid AS tenant_webrtc_video_sip_template_uuid, tenant.registration_trunk_sip_template_uuid AS tenant_registration_trunk_sip_template_uuid, tenant.twilio_trunk_sip_template_uuid AS tenant_twilio_trunk_sip_template_uuid \nFROM tenant'] (Background on this error at: http://sqlalche.me/e/f405)
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1236, in _execute_context
cursor, statement, parameters, context
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 536, in do_execute
cursor.execute(statement, parameters)
psycopg2.ProgrammingError: ERREUR: la colonne tenant.slug n'existe pas
LINE 1: SELECT tenant.uuid AS tenant_uuid, tenant.slug AS tenant_slu...
^
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/bin/wazo-confd-sync-db", line 11, in <module>
load_entry_point('wazo-confd==0.1', 'console_scripts', 'wazo-confd-sync-db')()
File "/usr/lib/python3/dist-packages/wazo_confd/sync_db.py", line 79, in main
for tenant in session.query(Tenant).all():
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py", line 2925, in all
return list(self)
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py", line 3081, in __iter__
return self._execute_and_instances(context)
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py", line 3106, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 980, in execute
return meth(self, multiparams, params)
File "/usr/lib/python3/dist-packages/sqlalchemy/sql/elements.py", line 273, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1099, in _execute_clauseelement
distilled_params,
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1240, in _execute_context
e, statement, parameters, cursor, context
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1458, in _handle_dbapi_exception
util.raise_from_cause(sqlalchemy_exception, exc_info)
File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 296, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 276, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1236, in _execute_context
cursor, statement, parameters, context
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 536, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) ERREUR: la colonne tenant.slug n'existe pas
LINE 1: SELECT tenant.uuid AS tenant_uuid, tenant.slug AS tenant_slu...
^
[SQL: 'SELECT tenant.uuid AS tenant_uuid, tenant.slug AS tenant_slug, tenant.sip_templates_generated AS tenant_sip_templates_generated, tenant.global_sip_template_uuid AS tenant_global_sip_template_uuid, tenant.webrtc_sip_template_uuid AS tenant_webrtc_sip_template_uuid, tenant.webrtc_video_sip_template_uuid AS tenant_webrtc_video_sip_template_uuid, tenant.registration_trunk_sip_template_uuid AS tenant_registration_trunk_sip_template_uuid, tenant.twilio_trunk_sip_template_uuid AS tenant_twilio_trunk_sip_template_uuid \nFROM tenant'] (Background on this error at: http://sqlalche.me/e/f405)
Executing upgrade script /usr/share/wazo-upgrade/post-start.d/50-invalidate-wazo-confgend-cache.sh...
Module 'res_pjsip' reloaded successfully.