Hello
I have problems for upgrading my wazo 18.03 to 19.12
- Upgrade commands
root@pvoiall001:~# wazo-dist phoenix-stretch
root@pvoiall001:~# LANG=C
root@pvoiall001:~# wazo-upgrade
- Multiple errors about service
Created symlink /etc/systemd/system/multi-user.target.wants/wazo-provd.service -> /lib/systemd/system/wazo-provd.service.
Job for wazo-provd.service failed because of unavailable resources or another system error.
See "systemctl status wazo-provd.service" and "journalctl -xe" for details.
wazo-provd.service couldn't start.
Created symlink /etc/systemd/system/multi-user.target.wants/wazo-agid.service -> /lib/systemd/system/wazo-agid.service.
Job for wazo-agid.service failed because the control process exited with error code.
See "systemctl status wazo-agid.service" and "journalctl -xe" for details.
wazo-agid.service couldn't start.
Created symlink /etc/systemd/system/multi-user.target.wants/wazo-dird.service -> /lib/systemd/system/wazo-dird.service.
Job for wazo-dird.service failed because the control process exited with error code.
See "systemctl status wazo-dird.service" and "journalctl -xe" for details.
wazo-dird.service couldn't start.
Created symlink /etc/systemd/system/multi-user.target.wants/wazo-agentd.service -> /lib/systemd/system/wazo-agentd.service.
Job for wazo-agentd.service failed because the control process exited with error code.
See "systemctl status wazo-agentd.service" and "journalctl -xe" for details.
wazo-agentd.service couldn't start.
Setting up wazo-calld (19.12~20190822.163516.b4fb728.deb9) ...
Created symlink /etc/systemd/system/multi-user.target.wants/wazo-calld.service -> /lib/systemd/system/wazo-calld.service.
Job for wazo-calld.service failed because the control process exited with error code.
See "systemctl status wazo-calld.service" and "journalctl -xe" for details.
wazo-calld.service couldn't start.
Created symlink /etc/systemd/system/multi-user.target.wants/wazo-phoned.service -> /lib/systemd/system/wazo-phoned.service.
Job for wazo-phoned.service failed because the control process exited with error code.
See "systemctl status wazo-phoned.service" and "journalctl -xe" for details.
wazo-phoned.service couldn't start.
- Python errors / missing file
Executing upgrade script /usr/share/xivo-upgrade/pre-start.d/00-run-xivo-check-db...
Checking database...
NOK (current revision is 28443bfc4fb1)
Executing upgrade script /usr/share/xivo-upgrade/pre-start.d/000-wazo-update-keys...
401 Client Error: UNAUTHORIZED for url: https://localhost:9497/0.1/token
401 Client Error: UNAUTHORIZED for url: https://localhost:9497/0.1/token
Executing upgrade script /usr/share/xivo-upgrade/pre-start.d/001-update-database-until-entity-tenant.sh...
Executing upgrade script /usr/share/xivo-upgrade/pre-start.d/002-create-tenants-from-entities.py...
Could not read config file /var/lib/wazo-auth-keys/wazo-upgrade-key.yml: [Errno 2] No such file or directory: '/var/lib/wazo-auth-keys/wazo-upgrade-key.yml'
Traceback (most recent call last):
File "/usr/share/xivo-upgrade/pre-start.d/002-create-tenants-from-entities.py", line 128, in <module>
main()
File "/usr/share/xivo-upgrade/pre-start.d/002-create-tenants-from-entities.py", line 120, in main
config = _load_config()
File "/usr/share/xivo-upgrade/pre-start.d/002-create-tenants-from-entities.py", line 24, in _load_config
key_config = _load_key_file(ChainMap(file_config, _DEFAULT_CONFIG))
File "/usr/share/xivo-upgrade/pre-start.d/002-create-tenants-from-entities.py", line 30, in _load_key_file
return {'auth': {'username': key_file['service_id'],
KeyError: 'service_id'
Executing upgrade script /usr/share/xivo-upgrade/pre-start.d/003-load-wazo-user-from-file.py...
load-wazo-user-from-file: 002-create-tenants-from_entities.py should be executed first
Executing upgrade script /usr/share/xivo-upgrade/pre-start.d/004-load-wazo-user-external-api-from-file.py...
load-wazo-user-external-api-from-file: 002-create-tenants-from-entities.py should be executed first
Executing upgrade script /usr/share/xivo-upgrade/pre-start.d/005-load-wazo-user-admin-from-file.py...
load-wazo-user-admin-from-file: 002-create-tenants-from-entities.py should be executed first
Executing upgrade script /usr/share/xivo-upgrade/pre-start.d/006-update-database-until-head.sh...
update-database-until-head: 002-create-tenants-from-entities.py should be executed first
Executing upgrade script /usr/share/xivo-upgrade/pre-start.d/01-remove_unused_packages.sh...
- SQL Error
Executing upgrade script /usr/share/xivo-upgrade/pre-start.d/02-run-xivo-update-config...
Updating Wazo config
Traceback (most recent call last):
File "/usr/sbin/xivo-create-config", line 192, in <module>
main()
File "/usr/sbin/xivo-create-config", line 41, in main
config = load_config()
File "/usr/sbin/xivo-create-config", line 49, in load_config
result.update(load_config_dhcp(session))
File "/usr/sbin/xivo-create-config", line 63, in load_config_dhcp
Dhcp.network_interfaces,
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2659, in first
ret = list(self[0:1])
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2457, in __getitem__
return list(res)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2761, in __iter__
return self._execute_and_instances(context)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2776, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
return meth(self, multiparams, params)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
compiled_sql, distilled_params
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
context)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
exc_info
File "/usr/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
context)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) column dhcp.network_interfaces does not exist
LINE 1: ... dhcp_pool_start, dhcp.pool_end AS dhcp_pool_end, dhcp.netwo...
^
[SQL: 'SELECT dhcp.active AS dhcp_active, dhcp.pool_start AS dhcp_pool_start, dhcp.pool_end AS dhcp_pool_end, dhcp.network_interfaces AS dhcp_network_interfaces \nFROM dhcp \n LIMIT %(param_1)s'] [parameters: {'param_1': 1}]
Generating configuration
ERROR: generation from template 'dhcp' failed because all variables could not be expanded:
subnet #XIVO_DHCP_NET4_SUBNET# netmask #XIVO_DHCP_NET4_NETMASK# { /tmp/tmp.L1qM3nY4i8/dhcp/etc/dhcp/dhcpd_subnet.conf.head: option subnet-mask #XIVO_DHCP_NET4_NETMASK#; /tmp/tmp.L1qM3nY4i8/dhcp/etc/dhcp/dhcpd_subnet.conf.head: option routers #XIVO_DHCP_NET4_IP#;
- Missing file / python error
Executing upgrade script /usr/share/xivo-upgrade/post-start.d/09_provd_add_phonebook_ip.sh...
Could not read config file /var/lib/wazo-auth-keys/wazo-provd-cli-key.yml: [Errno 2] No such file or directory: '/var/lib/wazo-auth-keys/wazo-provd-cli-key.yml'
Traceback (most recent call last):
File "/usr/bin/wazo-provd-cli", line 3, in <module>
from wazo_provd_cli import cli
File "/usr/lib/python2.7/dist-packages/wazo_provd_cli/cli.py", line 89, in <module>
auth_client = AuthClient(username=key_file['service_id'], password=key_file['service_key'], **_CONFIG['auth'])
KeyError: 'service_id'
Executing upgrade script /usr/share/xivo-upgrade/post-start.d/18_upgrade_official_plugins.py...
Could not read config file /var/lib/wazo-auth-keys/wazo-upgrade-key.yml: [Errno 2] No such file or directory: '/var/lib/wazo-auth-keys/wazo-upgrade-key.yml'
Traceback (most recent call last):
File "/usr/share/xivo-upgrade/post-start.d/18_upgrade_official_plugins.py", line 58, in <module>
main()
File "/usr/share/xivo-upgrade/post-start.d/18_upgrade_official_plugins.py", line 38, in main
config = load_config()
File "/usr/share/xivo-upgrade/post-start.d/18_upgrade_official_plugins.py", line 27, in load_config
key_config = _load_key_file(ChainMap(file_config, _DEFAULT_CONFIG))
File "/usr/share/xivo-upgrade/post-start.d/18_upgrade_official_plugins.py", line 33, in _load_key_file
return {'auth': {'username': key_file['service_id'],
KeyError: 'service_id'
Executing upgrade script /usr/share/xivo-upgrade/post-start.d/20_reset_unassociated_devices_to_autoprov...
Could not read config file /var/lib/wazo-auth-keys/wazo-upgrade-key.yml: [Errno 2] No such file or directory: '/var/lib/wazo-auth-keys/wazo-upgrade-key.yml'
Traceback (most recent call last):
File "/usr/share/xivo-upgrade/post-start.d/20_reset_unassociated_devices_to_autoprov", line 34, in <module>
config = load_config()
File "/usr/share/xivo-upgrade/post-start.d/20_reset_unassociated_devices_to_autoprov", line 24, in load_config
key_config = _load_key_file(ChainMap(file_config, _DEFAULT_CONFIG))
File "/usr/share/xivo-upgrade/post-start.d/20_reset_unassociated_devices_to_autoprov", line 30, in _load_key_file
return {'auth': {'username': key_file['service_id'],
KeyError: 'service_id'
Executing upgrade script /usr/share/xivo-upgrade/post-start.d/25_dird_tenant_migration.py...
Could not read config file /var/lib/wazo-auth-keys/wazo-upgrade-key.yml: [Errno 2] No such file or directory: '/var/lib/wazo-auth-keys/wazo-upgrade-key.yml'
Traceback (most recent call last):
File "/usr/share/xivo-upgrade/post-start.d/25_dird_tenant_migration.py", line 134, in <module>
main()
File "/usr/share/xivo-upgrade/post-start.d/25_dird_tenant_migration.py", line 116, in main
migrate_tenants()
File "/usr/share/xivo-upgrade/post-start.d/25_dird_tenant_migration.py", line 81, in migrate_tenants
config = _load_config()
File "/usr/share/xivo-upgrade/post-start.d/25_dird_tenant_migration.py", line 31, in _load_config
key_config = _load_key_file(ChainMap(file_config, _DEFAULT_CONFIG))
File "/usr/share/xivo-upgrade/post-start.d/25_dird_tenant_migration.py", line 38, in _load_key_file
'auth': {'username': key_file['service_id'], 'password': key_file['service_key']},
KeyError: 'service_id'
Executing upgrade script /usr/share/xivo-upgrade/post-start.d/26-dird-auto-create-config.py...
Could not read config file /var/lib/wazo-auth-keys/wazo-upgrade-key.yml: [Errno 2] No such file or directory: '/var/lib/wazo-auth-keys/wazo-upgrade-key.yml'
Traceback (most recent call last):
File "/usr/share/xivo-upgrade/post-start.d/26-dird-auto-create-config.py", line 251, in <module>
main()
File "/usr/share/xivo-upgrade/post-start.d/26-dird-auto-create-config.py", line 233, in main
_auto_create_config()
File "/usr/share/xivo-upgrade/post-start.d/26-dird-auto-create-config.py", line 124, in _auto_create_config
config = _load_config()
File "/usr/share/xivo-upgrade/post-start.d/26-dird-auto-create-config.py", line 109, in _load_config
key_config = _load_key_file(ChainMap(file_config, _DEFAULT_CONFIG))
File "/usr/share/xivo-upgrade/post-start.d/26-dird-auto-create-config.py", line 117, in _load_key_file
'username': key_file['service_id'],
KeyError: 'service_id'
Executing upgrade script /usr/share/xivo-upgrade/post-start.d/30_provd_default_passwords...
Executing upgrade script /usr/share/xivo-upgrade/post-start.d/50-autoprov-generate-config.py...
Could not read config file /var/lib/wazo-auth-keys/wazo-upgrade-key.yml: [Errno 2] No such file or directory: '/var/lib/wazo-auth-keys/wazo-upgrade-key.yml'
Traceback (most recent call last):
File "/usr/share/xivo-upgrade/post-start.d/50-autoprov-generate-config.py", line 46, in <module>
config = load_config()
File "/usr/share/xivo-upgrade/post-start.d/50-autoprov-generate-config.py", line 36, in load_config
key_config = _load_key_file(ChainMap(file_config, _DEFAULT_CONFIG))
File "/usr/share/xivo-upgrade/post-start.d/50-autoprov-generate-config.py", line 42, in _load_key_file
return {'auth': {'username': key_file['service_id'],
KeyError: 'service_id'
Executing upgrade script /usr/share/xivo-upgrade/post-start.d/55_provd_device_tenant_migration.py...
Could not read config file /var/lib/wazo-auth-keys/wazo-upgrade-key.yml: [Errno 2] No such file or directory: '/var/lib/wazo-auth-keys/wazo-upgrade-key.yml'
Traceback (most recent call last):
File "/usr/share/xivo-upgrade/post-start.d/55_provd_device_tenant_migration.py", line 141, in <module>
main()
File "/usr/share/xivo-upgrade/post-start.d/55_provd_device_tenant_migration.py", line 123, in main
migrate_tenants()
File "/usr/share/xivo-upgrade/post-start.d/55_provd_device_tenant_migration.py", line 70, in migrate_tenants
config = _load_config()
File "/usr/share/xivo-upgrade/post-start.d/55_provd_device_tenant_migration.py", line 35, in _load_config
key_config = _load_key_file(ChainMap(file_config, _DEFAULT_CONFIG))
File "/usr/share/xivo-upgrade/post-start.d/55_provd_device_tenant_migration.py", line 42, in _load_key_file
'auth': {'username': key_file['service_id'], 'password': key_file['service_key']},
KeyError: 'service_id'
Executing upgrade script /usr/share/xivo-upgrade/post-start.d/56_provd_device_new_status_migration.py...
Could not read config file /var/lib/wazo-auth-keys/wazo-upgrade-key.yml: [Errno 2] No such file or directory: '/var/lib/wazo-auth-keys/wazo-upgrade-key.yml'
Traceback (most recent call last):
File "/usr/share/xivo-upgrade/post-start.d/56_provd_device_new_status_migration.py", line 121, in <module>
main()
File "/usr/share/xivo-upgrade/post-start.d/56_provd_device_new_status_migration.py", line 103, in main
migrate_new_status()
File "/usr/share/xivo-upgrade/post-start.d/56_provd_device_new_status_migration.py", line 69, in migrate_new_status
config = _load_config()
File "/usr/share/xivo-upgrade/post-start.d/56_provd_device_new_status_migration.py", line 34, in _load_config
key_config = _load_key_file(ChainMap(file_config, _DEFAULT_CONFIG))
File "/usr/share/xivo-upgrade/post-start.d/56_provd_device_new_status_migration.py", line 41, in _load_key_file
'auth': {'username': key_file['service_id'], 'password': key_file['service_key']},
KeyError: 'service_id'
Executing upgrade script /usr/share/xivo-upgrade/post-start.d/57-provd-reconfigure-all-devices.py...
Could not read config file /var/lib/wazo-auth-keys/wazo-upgrade-key.yml: [Errno 2] No such file or directory: '/var/lib/wazo-auth-keys/wazo-upgrade-key.yml'
Traceback (most recent call last):
File "/usr/share/xivo-upgrade/post-start.d/57-provd-reconfigure-all-devices.py", line 102, in <module>
main()
File "/usr/share/xivo-upgrade/post-start.d/57-provd-reconfigure-all-devices.py", line 84, in main
reconfigure_all_devices()
File "/usr/share/xivo-upgrade/post-start.d/57-provd-reconfigure-all-devices.py", line 56, in reconfigure_all_devices
config = _load_config()
File "/usr/share/xivo-upgrade/post-start.d/57-provd-reconfigure-all-devices.py", line 30, in _load_config
key_config = _load_key_file(ChainMap(file_config, _DEFAULT_CONFIG))
File "/usr/share/xivo-upgrade/post-start.d/57-provd-reconfigure-all-devices.py", line 37, in _load_key_file
'auth': {'username': key_file['service_id'], 'password': key_file['service_key']},
KeyError: 'service_id'
Executing upgrade script /usr/share/xivo-upgrade/post-start.d/60-provd-remove-null-values-config.py...
Could not read config file /var/lib/wazo-auth-keys/wazo-upgrade-key.yml: [Errno 2] No such file or directory: '/var/lib/wazo-auth-keys/wazo-upgrade-key.yml'
Traceback (most recent call last):
File "/usr/share/xivo-upgrade/post-start.d/60-provd-remove-null-values-config.py", line 110, in <module>
main()
File "/usr/share/xivo-upgrade/post-start.d/60-provd-remove-null-values-config.py", line 92, in main
remove_null_values()
File "/usr/share/xivo-upgrade/post-start.d/60-provd-remove-null-values-config.py", line 65, in remove_null_values
config = _load_config()
File "/usr/share/xivo-upgrade/post-start.d/60-provd-remove-null-values-config.py", line 30, in _load_config
key_config = _load_key_file(ChainMap(file_config, _DEFAULT_CONFIG))
File "/usr/share/xivo-upgrade/post-start.d/60-provd-remove-null-values-config.py", line 37, in _load_key_file
'auth': {'username': key_file['service_id'], 'password': key_file['service_key']},
KeyError: 'service_id'
Executing upgrade script /usr/share/xivo-upgrade/post-start.d/61_webhookd_tenant_migration.py...
Could not read config file /var/lib/wazo-auth-keys/wazo-upgrade-key.yml: [Errno 2] No such file or directory: '/var/lib/wazo-auth-keys/wazo-upgrade-key.yml'
Traceback (most recent call last):
File "/usr/share/xivo-upgrade/post-start.d/61_webhookd_tenant_migration.py", line 139, in <module>
main()
File "/usr/share/xivo-upgrade/post-start.d/61_webhookd_tenant_migration.py", line 121, in main
migrate_tenants()
File "/usr/share/xivo-upgrade/post-start.d/61_webhookd_tenant_migration.py", line 80, in migrate_tenants
config = _load_config()
File "/usr/share/xivo-upgrade/post-start.d/61_webhookd_tenant_migration.py", line 31, in _load_config
key_config = _load_key_file(ChainMap(file_config, _DEFAULT_CONFIG))
File "/usr/share/xivo-upgrade/post-start.d/61_webhookd_tenant_migration.py", line 38, in _load_key_file
'auth': {'username': key_file['service_id'], 'password': key_file['service_key']},
KeyError: 'service_id'
Executing upgrade script /usr/share/xivo-upgrade/post-start.d/62_call_logd_tenant_migration.py...
Could not read config file /var/lib/wazo-auth-keys/wazo-upgrade-key.yml: [Errno 2] No such file or directory: '/var/lib/wazo-auth-keys/wazo-upgrade-key.yml'
Traceback (most recent call last):
File "/usr/share/xivo-upgrade/post-start.d/62_call_logd_tenant_migration.py", line 144, in <module>
main()
File "/usr/share/xivo-upgrade/post-start.d/62_call_logd_tenant_migration.py", line 126, in main
migrate_tenants()
File "/usr/share/xivo-upgrade/post-start.d/62_call_logd_tenant_migration.py", line 82, in migrate_tenants
config = _load_config()
File "/usr/share/xivo-upgrade/post-start.d/62_call_logd_tenant_migration.py", line 32, in _load_config
key_config = _load_key_file(ChainMap(file_config, _DEFAULT_CONFIG))
File "/usr/share/xivo-upgrade/post-start.d/62_call_logd_tenant_migration.py", line 39, in _load_key_file
'auth': {'username': key_file['service_id'], 'password': key_file['service_key']},
KeyError: 'service_id'
- services status
root@pvoiall001:~# wazo-service status
Checking database...
NOK (current revision is 01b4c79b3d47)
Checking services...
running dahdi
failed wazo-plugind
running wazo-webhookd
running xivo-sysconfd
running xivo-confgend
running wazo-confd
running wazo-auth
stopped wazo-call-logd
running xivo-dxtora
running wazo-provd
failed wazo-agid
stopped asterisk
stopped xivo-amid
failed wazo-agentd
failed wazo-dird
failed wazo-phoned
failed wazo-calld
stopped wazo-websocketd
failed wazo-chatd
- Restart
root@pvoiall001:~# wazo-service restart
Closing port 5060.
Waiting for services to stop successfully...
Waiting for services to start successfully...
starting dahdi ... OK
starting wazo-plugind ... OK
starting wazo-webhookd ... OK
starting xivo-sysconfd ... OK
starting xivo-confgend ... OK
starting wazo-confd ... OK
starting wazo-auth ... OK
starting xivo-dxtora ... OK
starting wazo-provd ... OK
starting wazo-agid ...Job for wazo-agid.service failed because the control process exited with error code.
See "systemctl status wazo-agid.service" and "journalctl -xe" for details.
NOK
Opening port 5060.
- status wazo-agid
root@pvoiall001:~# systemctl status wazo-agid
* wazo-agid.service - wazo-agid server
Loaded: loaded (/lib/systemd/system/wazo-agid.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2020-02-19 09:00:53 EST; 26s ago
Process: 34435 ExecStart=/usr/bin/wazo-agid (code=exited, status=1/FAILURE)
Process: 34432 ExecStartPre=/usr/bin/install -d -o wazo-agid -g wazo-agid /var/run/wazo-agid (code=exited, status=0/SUCCESS)
Feb 19 09:00:53 pvoiall001 wazo-agid[34435]: main()
Feb 19 09:00:53 pvoiall001 wazo-agid[34435]: File "/usr/lib/python2.7/dist-packages/wazo_agid/bin/agid.py", line 58, in main
Feb 19 09:00:53 pvoiall001 wazo-agid[34435]: key_config = _load_key_file(ChainMap(cli_config, file_config, _DEFAULT_CONFIG))
Feb 19 09:00:53 pvoiall001 wazo-agid[34435]: File "/usr/lib/python2.7/dist-packages/wazo_agid/bin/agid.py", line 115, in _load_key_file
Feb 19 09:00:53 pvoiall001 wazo-agid[34435]: return {'auth': {'service_id': key_file['service_id'],
Feb 19 09:00:53 pvoiall001 wazo-agid[34435]: KeyError: 'service_id'
Feb 19 09:00:53 pvoiall001 systemd[1]: wazo-agid.service: Control process exited, code=exited status=1
Feb 19 09:00:53 pvoiall001 systemd[1]: Failed to start wazo-agid server.
Feb 19 09:00:53 pvoiall001 systemd[1]: wazo-agid.service: Unit entered failed state.
Feb 19 09:00:53 pvoiall001 systemd[1]: wazo-agid.service: Failed with result 'exit-code'.