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

NFS volumes are not mounted if they have similar path

    XMLWordPrintable

    Details

      Description

      When passed to a nfs storage promise this works:

      <pre>
      bundle common nfsglobals
      {
      vars:
      "volumes"
      data => parsejson('
      {
      "hosts" :
      {
      "host" : "nfshost.example.com",
      "volumes" :
      [
      "/PATH1",
      "/PATH10",
      ]
      }
      }');
      }
      </pre>

      While this doesn't work (PATHs interchanged):

      <pre>
      bundle common nfsglobals
      {
      vars:
      "volumes"
      data => parsejson('
      {
      "hosts" :
      {
      "host" : "nfshost.example.com",
      "volumes" :
      [
      "/PATH10",
      "/PATH1",
      ]
      }
      }');
      }
      </pre>

      Likely due to substring (strstr()) comparison; https://github.com/cfengine/core/blob/master/cf-agent/nfs.c#L667

        Attachments

          Activity

            People

            Assignee:
            a10003 Eystein Maloy Stenberg
            Reporter:
            a10003 Eystein Maloy Stenberg
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 day
                1d
                Remaining:
                Not Specified
                Logged:
                Time Not Required
                Not Specified