Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #12421: Missing fixes in parent ticket #735

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions tree/30_generic_methods/service_disabled.cf
Expand Up @@ -53,9 +53,6 @@ bundle agent service_disabled(service_name)
usebundle => ncf_services("${service_name}", "disable"),
ifvarclass => "(!has_promiser_stack.service_check_disabled_at_boot_${canonified_service_name}_not_ok)|(has_promiser_stack.${class_prefix}_check_disabled_not_ok)";

any::
"reenable_reporting_${old_class_prefix}" usebundle => enable_reporting,
ifvarclass => "should_report";
!windows::
"already undefined"
usebundle => _classes_success("${old_class_prefix}"),
Expand All @@ -82,6 +79,8 @@ bundle agent service_disabled(service_name)
ifvarclass => "${class_prefix}_action_reached";

any::
"reenable_reporting_${old_class_prefix}" usebundle => enable_reporting,
ifvarclass => "should_report";
"report"
usebundle => _log("Ensure service ${service_name} is disabled at boot", "${old_class_prefix}", "${class_prefix}", @{args}),
ifvarclass => "(!has_promiser_stack.${old_class_prefix}_reached)|(has_promiser_stack.${class_prefix}_reached)";
Expand Down
5 changes: 2 additions & 3 deletions tree/30_generic_methods/service_enabled.cf
Expand Up @@ -52,9 +52,6 @@ bundle agent service_enabled(service_name)
usebundle => ncf_services("${service_name}", "enable"),
ifvarclass => "(!has_promiser_stack.service_check_started_at_boot_${canonified_service_name}_not_ok)|(has_promiser_stack.${class_prefix}_check_at_boot_not_ok)";

any::
"reenable_reporting_${old_class_prefix}" usebundle => enable_reporting,
ifvarclass => "should_report";
!windows::
"already defined"
usebundle => _classes_success("${old_class_prefix}"),
Expand All @@ -81,6 +78,8 @@ bundle agent service_enabled(service_name)
ifvarclass => "${class_prefix}_action_reached";

any::
"reenable_reporting_${old_class_prefix}" usebundle => enable_reporting,
ifvarclass => "should_report";
"report"
usebundle => _log("Ensure service ${service_name} is started at boot", "${old_class_prefix}", "${class_prefix}", @{args}),
ifvarclass => "(!has_promiser_stack.${old_class_prefix}_reached)|(has_promiser_stack.${class_prefix}_reached)";
Expand Down
5 changes: 2 additions & 3 deletions tree/30_generic_methods/service_started.cf
Expand Up @@ -49,9 +49,6 @@ bundle agent service_started(service_name)
usebundle => service_start("${service_name}"),
ifvarclass => "!${class_prefix}_check_running_kept";

any::
"reenable_reporting_${old_class_prefix}" usebundle => enable_reporting,
ifvarclass => "should_report";
!windows.has_promiser_stack::
"class copy if not running"
usebundle => _classes_copy("${class_prefix}_start_if_not_running", "${class_prefix}"),
Expand Down Expand Up @@ -83,6 +80,8 @@ bundle agent service_started(service_name)
ifvarclass => "${class_prefix}_action_reached";

any::
"reenable_reporting_${old_class_prefix}" usebundle => enable_reporting,
ifvarclass => "should_report";
"report"
usebundle => _log("Ensure that service ${service_name} is running", "${old_class_prefix}", "${class_prefix}", @{args}),
ifvarclass => "(!has_promiser_stack.${old_class_prefix}_reached)|(has_promiser_stack.${class_prefix}_reached)";
Expand Down
5 changes: 2 additions & 3 deletions tree/30_generic_methods/service_started_path.cf
Expand Up @@ -51,9 +51,6 @@ bundle agent service_started_path(service_name, service_path)
usebundle => service_start("${service_name}"),
ifvarclass => "!${class_prefix}_check_running_kept";

any::
"reenable_reporting_${old_class_prefix}" usebundle => enable_reporting,
ifvarclass => "should_report";
!windows.has_promiser_stack::
"class copy if not running"
usebundle => _classes_copy("${class_prefix}_start_if_not_running", "${class_prefix}"),
Expand Down Expand Up @@ -85,6 +82,8 @@ bundle agent service_started_path(service_name, service_path)
ifvarclass => "${class_prefix}_action_reached";

any::
"reenable_reporting_${old_class_prefix}" usebundle => enable_reporting,
ifvarclass => "should_report";
"report"
usebundle => _log("Ensure that service ${service_name} is running", "${old_class_prefix}", "${class_prefix}", @{args}),
ifvarclass => "(!has_promiser_stack.${old_class_prefix}_reached)|(has_promiser_stack.${class_prefix}_reached)";
Expand Down
5 changes: 2 additions & 3 deletions tree/30_generic_methods/service_stopped.cf
Expand Up @@ -54,9 +54,6 @@ bundle agent service_stopped(service_name)

# If service_check_running has no detected any process, it will not result
# in a success so the result class of this promise should be the a success.
any::
"reenable_reporting_${old_class_prefix}" usebundle => enable_reporting,
ifvarclass => "should_report";
!windows::
"create success class"
usebundle => _classes_success("${old_class_prefix}"),
Expand All @@ -81,6 +78,8 @@ bundle agent service_stopped(service_name)
ifvarclass => "${class_prefix}_action_reached";

any::
"reenable_reporting_${old_class_prefix}" usebundle => enable_reporting,
ifvarclass => "should_report";
"report"
usebundle => _log("Ensure that service ${service_name} is stopped", "${old_class_prefix}", "${class_prefix}", @{args}),
ifvarclass =>"(!has_promiser_stack.${old_class_prefix}_reached)|(has_promiser_stack.!${class_prefix}_reached)";
Expand Down