XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Parsing
    • Labels:
      None
    • Platform:
      Linux

      Description

      So I've just run into this:

      expand.c:287: ProgrammingError: ExpandAndMapIteratorsFromScalar called with invalid strlen

      This was found once I added the following into my codebase:

      bundle agent ensure_collectd_configuration
      {
      vars:
      debian.found_installed_collectd::
      "collectd_configuration_file" string => "/etc/collectd/collectd.conf",
      policy => "free";

      files:
      "$(collectd_configuration_file)"
      create => "true",
      edit_template => "$(def.templates_location)/collectd/collectd.conf.tpl",
      comment => "All macines should have this collectd configuration",
      handle => "ensure_collectd_configuration_collectd_file",
      classes => if_repaired("collectd_configuration_file_changed");

      commands:
      collectd_configuration_file_changed::
      "service collectd restart";

      reports:
      collectd_configuration_file_changed.spn_debug::
      "[SPN-DBG] $(sys.host) at $(sys.ipv4[eth0]) has restarted collectd daemon as configuration file was repaired";
      }

      This is the -v output from cf-agent:

      2014-02-18T16:58:22+0000 verbose: Comment 'All macines should have this collectd configuration'
      2014-02-18T16:58:22+0000 verbose: Using literal pathtype for '/etc/collectd/collectd.conf'
      2014-02-18T16:58:22+0000 verbose: /ensure_collectd_configuration/files/'$(collectd_configuration_file)': Additional promise info: handle 'ensure_collectd_configuration_collectd_file' version 'Community Promises.cf 3.5.3' source path '/var/cfengine/inputs/services/ensure/ensure_collectd_configuration.cf' at line 10 comment 'All macines should have this collectd configuration'
      2014-02-18T16:58:22+0000 verbose: /ensure_collectd_configuration/files/'$(collectd_configuration_file)': File '/etc/collectd/collectd.conf' exists as promised
      2014-02-18T16:58:22+0000 verbose: Handling file existence constraints on '/etc/collectd/collectd.conf'
      2014-02-18T16:58:22+0000 verbose: Build file model from a blank slate (emptying)
      2014-02-18T16:58:22+0000 verbose: Resolving variables in bundle 'temp_cf_bundle__var_cfengine_inputs_services_templates_collectd_collectd_conf_tpl'
      expand.c:287: ProgrammingError: ExpandAndMapIteratorsFromScalar called with invalid strlen

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              khushildep Khushil Dep
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel