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
Actions