Bug #12355
closedTags in directives are ignored in POST API
Description
Though "tags" array is present in the POST query for directive, e.g.
"tags": [{"ubuntu": "etc"}]
they are silently ignored. Problem presents till current Rudder 4.1.10.
Sample json containing tags (preformatted):
{ "policyMode": "default", "displayName": "/etc/init.d/atop", "parameters": { "section": { "sections": [ { "section": { "sections": [ { "section": { "sections": [ { "section": { "name": "Exclusion/Inclusion", "vars": [ { "var": { "name": "COPYFILE_EXCLUDE_INCLUDE", "value": "" } }, { "var": { "name": "COPYFILE_EXCLUDE_INCLUDE_OPTION", "value": "none" } } ] } } ], "name": "Copy file", "vars": [ { "var": { "name": "COPYFILE_COMPARE_METHOD", "value": "digest" } }, { "var": { "name": "COPYFILE_DESTINATION", "value": "/etc/init.d/atop" } }, { "var": { "name": "COPYFILE_GROUP", "value": "root" } }, { "var": { "name": "COPYFILE_NAME", "value": "atop/etc/init.d/atop" } }, { "var": { "name": "COPYFILE_OWNER", "value": "root" } }, { "var": { "name": "COPYFILE_PERM", "value": "755" } }, { "var": { "name": "COPYFILE_PURGE", "value": "false" } }, { "var": { "name": "COPYFILE_RECURSION", "value": "0" } }, { "var": { "name": "COPYFILE_SGID", "value": "false" } }, { "var": { "name": "COPYFILE_STICKY_FOLDER", "value": "false" } }, { "var": { "name": "COPYFILE_SUID", "value": "false" } } ] } }, { "section": { "name": "Post-modification hook", "vars": [ { "var": { "name": "COPYFILE_POST_HOOK_COMMAND", "value": "" } }, { "var": { "name": "COPYFILE_POST_HOOK_RUN", "value": "false" } } ] } } ], "name": "Copy file and PostHook" } } ], "name": "sections" } }, "tags": [ { "ubuntu": "etc" } ], "enabled": true, "system": false, "techniqueVersion": "2.1", "longDescription": "", "priority": 5, "techniqueName": "copyGitFile", "shortDescription": "atop fixed init script" }
Updated by François ARMAND over 6 years ago
- Severity set to Major - prevents use of part of Rudder | no simple workaround
- User visibility set to Operational - other Techniques | Technique editor | Rudder settings
- Effort required set to Very Small
- Priority changed from 0 to 80
Thanks for reporting !
Updated by Vincent MEMBRÉ over 6 years ago
- Target version changed from 4.1.11 to 4.1.12
Updated by Vincent MEMBRÉ over 6 years ago
- Target version changed from 4.1.12 to 4.1.13
Updated by Benoît PECCATTE over 6 years ago
- Target version changed from 4.1.13 to 411
Updated by Benoît PECCATTE over 6 years ago
- Target version changed from 411 to 4.1.13
Updated by François ARMAND over 6 years ago
- Assignee changed from Vincent MEMBRÉ to Pierre HAY
Updated by Pierre HAY over 6 years ago
Work in progess here: https://github.com/Haypierre/rudder/commit/433c546b8b91e2f10e43cd2caa95d2839af59553
Updated by Pierre HAY over 6 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Pierre HAY to Vincent MEMBRÉ
- Pull Request set to https://github.com/Normation/rudder/pull/1970
Updated by Anonymous over 6 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|95cca05c140065b99928c555876f5e0de93e8d84.
Updated by Vincent MEMBRÉ over 6 years ago
- Status changed from Pending release to Released
- Priority changed from 79 to 77
Updated by Dmitry Svyatogorov over 6 years ago
- Priority changed from 77 to 76
Please fix the same problem with rules, still exists in current Rudder 4.1.14.
Example json:
{"displayName": "#old test rule", "tags": [{"actual": "0"}], "enabled": true, "system": false, "id": "e848b263-2afb-403f-9c68-9e645caba5c9", "directives": [], "longDescription": "", "shortDescription": "", "targets": [{"exclude": {"or": []}, "include": {"or": []}}]}
Request is ok (I've tested it with POST), but nothing happens with tags in directive.
answer body is:
{"action":"updateRule","id":"e848b263-2afb-403f-9c68-9e645caba5c9","result":"success","data":{"rules":[{"id":"e848b263-2afb-403f-9c68-9e645caba5c9","displayName":"#old test rule","shortDescription":"","longDescription":"","directives":[],"targets":[{"include":{"or":[]},"exclude":{"or":[]}}],"enabled":true,"system":false,"tags":[{"actual":"1"}]}]}}
…and tags in web-interface remains in the same state.
Updated by Benoît PECCATTE over 6 years ago
- Related to Bug #13374: Tags in rules are ignored in POST API added
Updated by Benoît PECCATTE over 6 years ago
Dimitry: I created #13374 to follow the fixup of this case