Project

General

Profile

Actions

Bug #14404

closed

Reporting fails on NCF when service start/stop is guarded by a class

Added by Janos Mattyasovszky over 5 years ago. Updated over 2 years ago.

Status:
Released
Priority:
N/A
Category:
Web - Technique editor
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Getting started - demo | first install | Technique editor and level 1 Techniques
Effort required:
Priority:
88
Name check:
Fix check:
Regression:

Description

On 4.1.20 on SLES11:

I have an NCF methods that starts/stops a service (lldpd) based on the presence/absence of a class.

There is a group-based class the node either belongs to or does not belong to:

# cf-promises --show-classes | grep lld
group_lldpd_enabled                                          source=promise,inventory,attribute_name=rudder_groups

There is an NCF Method that consists of starting+enabling or stopping+disabling the service depending on the class:

bundle agent service_test
{
  vars:
    "class_prefix" string => canonify(join("_", "this.callers_promisers"));

  methods:
    "method_call" usebundle => service_ensure_started_at_boot("lldpd"),
      ifvarclass => concat("any.(group_lldpd_enabled)");
    "method_call" usebundle => service_ensure_running("lldpd"),
      ifvarclass => concat("any.(group_lldpd_enabled)");
    "method_call" usebundle => service_ensure_stopped("lldpd"),
      ifvarclass => concat("any.(!group_lldpd_enabled)");
    "method_call" usebundle => service_ensure_disabled_at_boot("lldpd"),
      ifvarclass => concat("any.(!group_lldpd_enabled)");
}

Same in NCF:

Now depending on the class, one half of those 4 promises are always missing reports:

Is this by design, a bug, or just user error?


Files

rudder_lldp.png (77.6 KB) rudder_lldp.png Janos Mattyasovszky, 2019-03-01 21:31
rudder_lldp_ncf.png (29.5 KB) rudder_lldp_ncf.png Janos Mattyasovszky, 2019-03-01 21:32
Actions

Also available in: Atom PDF