<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Tim,</p>
    <p>Thank you for the detailed error report, I've been able to
      reproduce, and this is a bug in the evaluation of reports send by
      the agent.</p>
    <p>When we use iterator in generic method, the Rudder server has no
      way to know evaluation which element will be in the iterator
      (except for the easy use case), so we have an option to
      automatically accept multiple reports from generic method when we
      have a variable in a component (parameter "Unbounded reports by
      elements when a variable is used" in the Setting page)</p>
    <p>However, when it's only the condition which uses an iterator, as
      it is in your use case, we don't store this information, and don't
      aggregate the result of multiple reports from a given generic
      method - hence the "unexpected" reporting.</p>
    <p>Note that the "-" in the comment is expected, it is only the
      reporting that shows what was the condition used; when used as a
      class it is correctly canonified.</p>
    <p><br>
    </p>
    <p>As a <b>workaround</b>, you can define a variable string
      "grafana.service_name" with value "grafana", and in the
      service_restart generic method use ${grafana.service_name}; this
      will allows the reports aggregation.</p>
    <p>I've opened issue <a class="moz-txt-link-freetext" href="https://issues.rudder.io/issues/16105">https://issues.rudder.io/issues/16105</a> to
      correct this within Rudder,</p>
    <p><br>
    </p>
    <p>Thank you very much for your message, and sorry you had a bad
      experience<br>
    </p>
    <div class="moz-signature">Nicolas CHARLES</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">On 04/11/2019 20:22, tim taler wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CA+=NtHz6L7+knvYqkzOJfCoUBnZBTQzoc4G2XdfFEFu2j09aTw@mail.gmail.com">
      <pre class="moz-quote-pre" wrap="">Hi all
I'm new to rudder, and ran into an unexpected problem.

As an example I like to install grafana and some plugins.
For the plugins I created a list-variable over which a command promise
can iterate with grafana-cli to install the plugins.

After a plugin installation grafana needs to be restarted though, so
I tried to use the "repaired" class from the command promise to
trigger a service restart.

the compliance report but stays on:
"[Unexpected] Service restart grafana-server if
any.(command_execution__usr_sbin_grafana_cli_plugins_grafana-piechart-panel_repaired)
was not applicable"

As you might notice the plugins from the list contain "-" which AFAIK
are illegal for a class name - is there any easy way to canonicalize
them?

TIA

_______________________________________________
rudder-users mailing list
FAQ: <a class="moz-txt-link-freetext" href="https://faq.rudder.io/">https://faq.rudder.io/</a>
Bug Tracker: <a class="moz-txt-link-freetext" href="https://issues.rudder.io/">https://issues.rudder.io/</a>
<a class="moz-txt-link-abbreviated" href="mailto:rudder-users@lists.rudder-project.org">rudder-users@lists.rudder-project.org</a>
<a class="moz-txt-link-freetext" href="https://www.rudder-project.org/mailman/listinfo/rudder-users">https://www.rudder-project.org/mailman/listinfo/rudder-users</a>
</pre>
    </blockquote>
  </body>
</html>