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

windows directory file promise works but gives chdir errors

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.2
    • Component/s: Promise type: files
    • Labels:
      None

      Description

      The promise:

      files:
      windows::
      "/testme/."
      create => "true";

      First run - creates the directory (correctly), but gives error: Failed to chdir into ''

      <pre>
      C:\Users\Administrator>cf-agent -Kv | grep testme
      2014-06-08T08:54:55Coordinated Universal Time verbose: /default/sysinfo/files: Evaluating promise '
      /testme/.'
      2014-06-08T08:54:57Coordinated Universal Time error: /default/sysinfo/files/'/testme/.'[0]: Faile
      d to chdir into ''. (chdir: 'The filename, directory name, or volume label syntax is incorrect.')
      2014-06-08T08:54:57Coordinated Universal Time verbose: /default/sysinfo/files: Evaluating promise '
      /testme/.'
      2014-06-08T08:54:57Coordinated Universal Time verbose: /default/sysinfo/files/'/testme/.'[0]: Using
      literal pathtype for '/testme/.'
      2014-06-08T08:54:57Coordinated Universal Time info: /default/sysinfo/files/'/testme/.'[0]: Creat
      ed directory '/testme/.'
      2014-06-08T08:55:49Coordinated Universal Time verbose: /default/sysinfo/files: Evaluating promise '
      /testme/.'
      2014-06-08T08:55:49Coordinated Universal Time verbose: /default/sysinfo/files/'/testme/.'[0]: Using
      literal pathtype for '/testme/.'
      2014-06-08T08:55:49Coordinated Universal Time verbose: /default/sysinfo/files: Evaluating promise '
      /testme/.'
      2014-06-08T08:55:49Coordinated Universal Time verbose: /default/sysinfo/files/'/testme/.'[0]: Using
      literal pathtype for '/testme/.'
      </pre>

      Second run - directory now exists, will now each run get the error: Failed to chdir into ''

      <pre>
      C:\Users\Administrator>cf-agent -Kv | grep testme
      2014-06-08T08:56:41Coordinated Universal Time verbose: /default/sysinfo/files: Evaluating promise '
      /testme/.'
      2014-06-08T08:56:43Coordinated Universal Time error: /default/sysinfo/files/'/testme/.'[0]: Faile
      d to chdir into ''. (chdir: 'The filename, directory name, or volume label syntax is incorrect.')
      2014-06-08T08:56:43Coordinated Universal Time verbose: /default/sysinfo/files: Evaluating promise '
      /testme/.'
      2014-06-08T08:56:43Coordinated Universal Time verbose: /default/sysinfo/files/'/testme/.'[0]: Using
      literal pathtype for '/testme/.'
      2014-06-08T08:56:43Coordinated Universal Time verbose: /default/sysinfo/files/'/testme/.'[0]: Addit
      ional promise info: version 'CFEngine Promises.cf 3.6.0' source path 'C:\Program Files\Cfengine\inpu
      ts\sysinfo\sysinfo.cf' at line 22
      2014-06-08T08:56:43Coordinated Universal Time verbose: /default/sysinfo/files/'/testme/.'[0]: File
      '/testme/.' exists as promised
      2014-06-08T08:56:43Coordinated Universal Time verbose: /default/sysinfo/files/'/testme/.'[0]: Handl
      ing file existence constraints on '/testme'
      </pre>

        Attachments

          Activity

            People

            • Assignee:
              a10040 Kristian Amlie
              Reporter:
              jiraadmin Old User (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel