incompatible pickle protocol between python versions in Listener.insert_headers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
octavia |
New
|
Undecided
|
Unassigned |
Bug Description
Originally reported by Tobias Urdin at https:/
The type of the insert_headers column in the listener DB table is not always compatible across python version.
When doing rolling upgrades for instance, a controller with python 3.9 may write an entry in the database that cannot be read by older controllers (python 3.6)
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
2023-09-13 22:16:06.961 3126384 ERROR oslo_messaging.
The type of the data is PickleType (defined by SQLAlchemy)
https:/
By default it uses pickle.
https:/
For instance, in python 3.9, the data will be encoded with protocol version 5, which is not readable by python 3.6
To solve this issue, we could force the use of protocol version 4, this version is supported by all the python versions (>= python 3.4) used by the stable releases of OpenStack.
As a next step, we could also change the type to json, but it would introduce some changes in the DB (need to convert existing data) and that would be a non-backportable patch.