CLI: trove cluster-grow fails with mongodb/cluster
Bug #1705412 reported by
Javier Castillo
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack DBaaS (Trove) |
Fix Released
|
Medium
|
Fan Zhang |
Bug Description
Trying to grow a mongodb/cluster from CLI, fails with this weird error:
trove cluster-grow baca7b0f-
ERROR: b"The value [u'replica'] for key type is invalid. Allowed values are ['replica', 'query_router']. (HTTP 400)"
Changed in trove: | |
assignee: | nobody → Trevor McCasland (twm2016) |
Changed in trove: | |
importance: | Undecided → Medium |
Changed in trove: | |
assignee: | Javier Castillo (javcasalc) → Fan Zhang (fanzhang) |
To post a comment you must log in.
Looks like a python3 vs python2 issue. explanation https:/ /stackoverflow. com/questions/ 16471332/ how-can- i-compare- a-unicode- type-to- a-string- in-python
We just need to change: 'utf-8' ) not in valid_values:" git.openstack. org/cgit/ openstack/ trove/tree/ trove/common/ strategies/ cluster/ experimental/ mongodb/ api.py# n188
"if valid_values and value not in valid_values:"
to
"if valid_values and value.encode(
from
http://