Details
-
Type:
Bug
-
Status: Done
-
Priority:
Medium
-
Resolution: Fixed
-
Affects Version/s: 3.7.1, 3.7.4
-
Fix Version/s: 3.10.0
-
Component/s: Built-in functions
-
Labels:None
-
Environment:Centos 6/7
Description
It seems that the default service_method body translate a "reload" command to "restart" before sending it to the service_bundle. Its seems to do the same with "enable/disable" to "start/stop".
This seems to only affect the default service_method body as I've tested with a custom one as well as using methods, as shown below:
Unable to find source-code formatter for language: cfengine. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
# cat test_services.cf bundle agent main { services: "service" service_policy => "reload"; "service_test" service_policy => "reload", service_method => service_test; methods: "" usebundle => standard_services("service_method", "reload"); "" usebundle => non_standard_services("service_test_method", "reload"); } body service_method service_test { service_bundle => non_standard_services("$(this.promiser)","$(this.service_policy)"); } bundle agent non_standard_services(service,state) { reports: "Test non_standard_services promise for \"$(service)\" -> $(state)"; } bundle agent standard_services(service,state){ reports: "Test standard_service promise for \"$(service)\" -> $(state)"; } # cf-agent -KIf ./test_services.cf R: Test standard_service promise for "service_method" -> reload R: Test non_standard_services promise for "service_test_method" -> reload R: Test standard_service promise for "service" -> restart R: Test non_standard_services promise for "service_test" -> reload
Attachments
Issue Links
- duplicates
-
CFE-2402 services type promise service_policy values should be passed to the services bundle unaltered
-
- Done
-