new register-nodes does not accept ints for numeric input
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
os-cloud-config |
Fix Released
|
Critical
|
Ghe Rivero |
Bug Description
Consider the following node definition:
{
"arch": "amd64",
"cpu": 24,
"disk": 800,
"mac": [
],
"memory": 49152,
"pm_addr": "10.0.0.132",
"pm_type": "pxe_ipmitool",
"pm_user": "admin"
}
The previous incarnation of register-nodes would pipe this through jq, something like this:
stack@
properties/
Because jq explicitly converts the values to strings, the memory, cpu count, and disk figures could all be specified as integers or as strings.
The new register-nodes barfs on the same input:
2014-10-17 01:28:35 - root - ERROR - Unexpected error during command execution
Traceback (most recent call last):
File "/home/
File "/home/
File "/home/
File "/home/
return self._update(
File "/home/
resp, body = self.api.
File "/home/
resp, body_iter = self._http_
File "/home/
BadRequest: Invalid input for field/attribute value. Value: '49152'. Wrong type. Expected '<type 'unicode'>', got '<type 'int'>' (HTTP 400)
This is a backwards-
Changed in os-cloud-config: | |
status: | New → Triaged |
importance: | Undecided → Critical |
Changed in os-cloud-config: | |
assignee: | nobody → Ghe Rivero (ghe.rivero) |
Changed in os-cloud-config: | |
status: | Fix Committed → Fix Released |
Fix proposed to branch: master /review. openstack. org/129950
Review: https:/