cannot run pool-set action when attempting to apply and integer as a value
Bug #1838650 reported by
Jeff Hillman
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceph Monitor Charm |
Fix Released
|
High
|
Unassigned |
Bug Description
Per the actions.yaml, when running the pool-set action, "Any valid Ceph key from http://
However, when running
---
$ juju run-action ceph-mon/0 pool-set name=xfs-pool key=size value=3
---
I get the message "ERROR validation failed: (root).value : must be of type string, given 3"
I have tried putting the 3 in "'s and not change.
Per the above linked ceph doc, this particular value is an integer, not a string.
Changed in charm-ceph-mon: | |
assignee: | nobody → Alex Kavanagh (ajkavanagh) |
milestone: | none → 20.08 |
status: | Triaged → In Progress |
Changed in charm-ceph-mon: | |
assignee: | Alex Kavanagh (ajkavanagh) → nobody |
Changed in charm-ceph-mon: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Yup, this can't work looking at the code. The action says that value is a str, but not type conversion is done for ints fro the action type. i.e. the code should attempt to parse the string to the required value, as it can never actually be the value in the validator.
Relevant line: https:/ /github. com/openstack/ charm-ceph- mon/blob/ 86536fb52abf068 d815209df790a28 ec61025eb5/ actions/ pool_set. py#L30
This request will always have a str value for the value, but handle_ set_pool_ value() already expects "request" to be the correct type for the value.