Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-2586

cf-runagent (v.3.10) does not start cf-agent on the remote host, returns instantly - bad quoting in the cfruncommand definition

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Rejected
    • Priority: Medium
    • Resolution: Won't Do
    • Affects Version/s: 3.10.0
    • Fix Version/s: None
    • Component/s: cf-runagent, cf-serverd
    • Labels:
      None
    • Environment:
      RHEL 7/Oracle Linux 7, Suse Leap 42
      rpm: cfengine-community-3.10.0-1.x86_64

      Description

      Hello Cfengineers!
      you can see the details about this issue and it's propable reason in a thread I opened in the cfengine mailing group:
      https://groups.google.com/forum/?utm_source=digest&utm_medium=email/#!topic/help-cfengine/sE2HeS7Eqfk

      Wherein I also posted the following conclusion/solution:

      ----------------------------
      I think I've found it: The cause of the problem is a wrong quoting in the cfruncommand in cf_serverd.cf that ends up with 2 double quotes right beside each other in the command to be executed on the client (red coloured here):
      bin/sh -c ""/var/cfengine/bin/cf-agent" -f /var/cfengine/inputs/update.cf" ; "/var/cfengine/bin/cf-agent" --bundlesequence ratest

      => This command executes correctly if you call it by hand on the shell command line, but not when it is called by cf-runagent!

      When I changed the cfruncommand for a test to just:
      cfruncommand => "$(sys.cf_agent) -K --debug --verbose";
      everything worked perfect on the client/remote host!
      ----------------------------

      Kind regards
      Jochem

        Attachments

          Activity

            People

            • Assignee:
              a10042 Nick Anderson
              Reporter:
              jochem_i Jochem Ippers
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel