Upgrade from bionic-rocky to bionic-stein failed migrations.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| OpenStack Compute (nova) |
Undecided
|
Sahid Orentino | ||
| OpenStack nova-cloud-controller charm |
Critical
|
Sahid Orentino |
Bug Description
We were trying to upgrade from rocky to stein using the charm procedure described here:
and we got into this problem,
2019-07-02 09:56:44 ERROR juju-log online_
b'Running batches of 50 until complete\nError attempting to run <function fill_virtual_
What should we do to get this fixed?
Regards,
Angel Vargas (angelvargas) wrote : | #1 |
Sahid Orentino (sahid-ferdjaoui) wrote : | #2 |
Looks like an issue when executing 'nova-manager db online_
Can you share package version currently installed:
$ dpkg -s nova-common
Also sharing logs of nova-manage located under /var/log/nova may help.
If you have not configured your env in debug, please consider using:
$ juju config nova-cloud-
Then you could try to ru-run locally:
$ nova-manager db online_
Thanks,
s.
Angel Vargas (angelvargas) wrote : | #3 |
Hi,
this is how I have solved the problem, seems after the upgrade most of the packages got upgraded to python3 but there was missing a package for mysql
Logs showed:
/home/ubuntu# cat /var/log/
", line 534, in _setup_
2019-07-02 10:01:14.453 729831 ERROR nova.cmd.manage sql_connection=
2019-07-02 10:01:14.453 729831 ERROR nova.cmd.manage File "/usr/lib/
2019-07-02 10:01:14.453 729831 ERROR nova.cmd.manage return wrapped(*args, **kwargs)
2019-07-02 10:01:14.453 729831 ERROR nova.cmd.manage File "/usr/lib/
2019-07-02 10:01:14.453 729831 ERROR nova.cmd.manage engine = sqlalchemy.
2019-07-02 10:01:14.453 729831 ERROR nova.cmd.manage File "/usr/lib/
2019-07-02 10:01:14.453 729831 ERROR nova.cmd.manage return strategy.
2019-07-02 10:01:14.453 729831 ERROR nova.cmd.manage File "/usr/lib/
2019-07-02 10:01:14.453 729831 ERROR nova.cmd.manage dbapi = dialect_
2019-07-02 10:01:14.453 729831 ERROR nova.cmd.manage File "/usr/lib/
2019-07-02 10:01:14.453 729831 ERROR nova.cmd.manage return __import_
2019-07-02 10:01:14.453 729831 ERROR nova.cmd.manage ModuleNotFoundE
2019-07-02 10:01:14.453 729831 ERROR nova.cmd.manage
2019-07-02 10:01:14.463 729831 WARNING oslo_db.
2019-07-02 10:01:14.464 729831 WARNING nova.objects.
After see that in the logs, I checked and effectively there wasn't a lib for python - mysql
I did:
sudo apt-get install -y python3-mysqldb
and then all worked fine.
Is this a isolated case or is actually a bug? Why should be this package missing after the upgrade?
Sahid Orentino (sahid-ferdjaoui) wrote : | #4 |
Thanks for your investigation and sharing resolution. I don't think it's isolated case I saw several issues on other charms around that.
Changed in charm-nova-cloud-controller: | |
status: | New → Triaged |
importance: | Undecided → High |
Angel Vargas (angelvargas) wrote : | #5 |
Sorry @sahid-ferdjaoui I missed your questions:
Re: Package version where we hitted the bug:
ubuntu@
Package: nova-common
Status: install ok installed
Priority: extra
Section: net
Installed-Size: 505
Maintainer: Ubuntu Developers <email address hidden>
Architecture: all
Source: nova
Version: 2:19.0.
Replaces: nova-ajax-
Depends: adduser
Breaks: nova-ajax-
Conffiles:
/etc/logrotate
/etc/nova/
/etc/nova/
/etc/nova/
/etc/nova/
/etc/nova/
/etc/nova/
/etc/nova/
/etc/sudoers.
Description: OpenStack Compute - common files
OpenStack is a reliable cloud infrastructure. Its mission is to produce
the ubiquitous cloud computing platform that will meet the needs of public
and private cloud providers regardless of size, by being simple to implement
and massively scalable.
.
OpenStack Compute, codenamed Nova, is a cloud computing fabric controller. In
addition to its "native" API (the OpenStack API), it also supports the Amazon
EC2 API.
.
Nova is intended to be modular and easy to extend and adapt. I...
James Page (james-page) wrote : | #6 |
At Stein, the default sqlalchemy mysql driver was switched back to mysqldb; prior to stein we just used the default which was mysqldb in older releases, and pymysql from at least queens/
The pymysql package is installed, its just that the connection URL in the nova configuration file is not using the correct pymysql+ prefix to switch to the pymysql driver.
Changed in charm-nova-cloud-controller: | |
importance: | High → Critical |
James Page (james-page) wrote : | #7 |
Sahid and I chatted about this last night; the issue is that the DB urls written into the Nova DB for each cell only have the mysql:// prefix; with the switch of the default dialect to MySQLDB at stein, these need to be updated to be mysql+pymysql://.
Changed in charm-nova-cloud-controller: | |
assignee: | nobody → James Page (james-page) |
status: | Triaged → In Progress |
Changed in charm-nova-cloud-controller: | |
assignee: | James Page (james-page) → Sahid Orentino (sahid-ferdjaoui) |
milestone: | none → 19.07 |
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to charm-nova-cloud-controller (master) | #8 |
Related fix proposed to branch: master
Review: https:/
Fix proposed to branch: master
Review: https:/
Sahid Orentino (sahid-ferdjaoui) wrote : | #10 |
I also proposed a fix for nova since 'nova-manage cellv2 update_cell' is bugged for cell0.
tags: | added: cells nova-manage upgrade |
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to charm-nova-cloud-controller (master) | #11 |
Related fix proposed to branch: master
Review: https:/
OpenStack Infra (hudson-openstack) wrote : Related fix merged to charm-nova-cloud-controller (master) | #12 |
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: master
commit 3c806a23f6dada5
Author: James Page <email address hidden>
Date: Tue Jul 23 16:47:06 2019 +0100
stein: install python3-mysqldb for sqlalchemy dialect change
At Stein, the default mysql dialect in SQLAlchemy switched back
to MySQLDB in Ubuntu; as a result the db connection URL's stored
in the nova_api database for Nova cells are stale and need to
prefixed mysql+pymysql:// to work with the pymysql dialect.
However at this point in time there is no way to update the DB
URL for Nova Cell 0.
This fix works around this problem by installing python3-mysqldb
which provides the default dialect needed when using mysql://
prefixed DB connection URI's.
Change-Id: I3f74f18f649786
Related-Bug: 1835037
Alvaro Uria (aluria) wrote : | #13 |
I've hit this same issue. See https:/
tags: | added: canonical-bootstack |
Changed in charm-nova-cloud-controller: | |
milestone: | 19.07 → 19.10 |
Changed in charm-nova-cloud-controller: | |
milestone: | 19.10 → 20.01 |
tags: |
added: openstack-upgrade removed: upgrade |
Ryan Beisner (1chb1n) wrote : | #14 |
The fix merged in master and is in the current stable charms as of 19.10.
Changed in charm-nova-cloud-controller: | |
status: | In Progress → Fix Committed |
status: | Fix Committed → Fix Released |
Changed in nova: | |
status: | New → In Progress |
assignee: | nobody → Sahid Orentino (sahid-ferdjaoui) |
After about 15 minutes the process said has ended, but the outcome is mess, as we lost all the resources control, as many resources are missing and I can not access the hypervisors
:~/master- node/openstack/ juju-units- conf$ openstack hypervisor list bugs.launchpad. net/nova/ and attach the Nova API log if possible. Error'> (HTTP 500) (Request-ID: req-e2ec7d6c- b6c2-4d6c- a52e-fae80fbea3 24)
Unexpected API Error. Please report this at http://
<class 'ModuleNotFound