Actions
Bug #9326
closedSetting nodeProperty over API does fail on bad key order
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:
Description
The outcome of updateNodeProperty depends on in which order the JSON hash's string has it's keys ordered.
See:
Good:
$ curl -H "X-API-Token: $token" -X POST -H "Content-Type: application/json" https://$fqdn/rudder/api/latest/nodes/7485da1a-4cea-4c2e-99f6-f9fa465ec26c -d '{ "properties" : [ { "name": "env_type", "value": "production" } ] }'; echo ; {"action": "updateNodeProperties","id": "7485da1a-4cea-4c2e-99f6-f9fa465ec26c","result": "success","data": {"properties": [{"name": "env_type","value": "production"}]}}
Bad (data is the same):
$ curl -H "X-API-Token: $token" -X POST -H "Content-Type: application/json" https://$fqdn/rudder/api/latest/nodes/7485da1a-4cea-4c2e-99f6-f9fa465ec26c -d '{ "properties" : [ { "value": "production", "name": "env_type" } ] }'; echo ; {"action": "updateNodeProperties","id": "7485da1a-4cea-4c2e-99f6-f9fa465ec26c","result": "error","errorDetails": "Error when trying to parse new property: '{\"value\":\"production\",\"name\":\"env_type\"}'. The awaited format is: {\"name\": string, \"value\": json}"}
Found in:
rudder-reports-3.1.15.release-1.SLES.11 rudder-jetty-3.1.15.release-1.SLES.11 rudder-techniques-3.1.15.release-1.SLES.11 rudder-server-root-3.1.15.release-1.SLES.11 rudder-plugin-external-node-information-2.11.4-1 rudder-webapp-3.1.15.release-1.SLES.11 rudder-inventory-ldap-3.1.15.release-1.SLES.11 rudder-agent-3.1.15.release-1.SLES.11 rudder-inventory-endpoint-3.1.15.release-1.SLES.11
Updated by François ARMAND about 8 years ago
- Assignee set to François ARMAND
- Priority changed from N/A to 3
- Target version set to 3.1.17
Updated by François ARMAND about 8 years ago
- Status changed from New to In progress
Updated by François ARMAND about 8 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from François ARMAND to Vincent MEMBRÉ
- Pull Request set to https://github.com/Normation/rudder/pull/1263
Updated by François ARMAND about 8 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset rudder|a49bca393ebd14bb650586441fb34301cb3f6d83.
Updated by Vincent MEMBRÉ about 8 years ago
- Status changed from Pending release to Released
Actions