Value error creating a postgresql replica
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack DBaaS (Trove) |
New
|
Undecided
|
Unassigned |
Bug Description
This is master from a week or so ago (last commit 24 Jun). I'm running it via devstack. The host VM is Ubuntu bionic and the guest image is xenial with Postgres 9.6. The scenario is:
- create a database instance
- add a database and create a table with a few rows
- create another instance, which is a replica thereof
2nd one gets ERROR status, Showing it displays:
File "/home/
| | version = int(self.
| | |
| | ValueError: invalid literal for int() with base 10: '9.6'
This is reasonable as the 'version' is the string '9.6' and you can't call int() on that. I fixed this by editing service.py to use a float intermediate cast:
version = int(float(
I could create a replica ok then.
Unfortunately this is *hard* to reproduce - after reverting my changes today in order to provide more detail on the failure I cannot reproduce even after 5 or so attempts. However the code is clearly doing something dangerous.