puppetlabs/puppet · warning · Puppet::Util::Windows::Error

Retrieving NFS reparse point data is unsupported

Error message

Retrieving NFS reparse point data is unsupported

What it means

Inside get_reparse_point_data, after DeviceIoControl(FSCTL_GET_REPARSE_POINT) returns the tag, a tag of IO_REPARSE_TAG_NFS raises this Puppet::Util::Windows::Error. NFS reparse points (files accessed through Windows' Services-for-NFS / WSL network filesystems) carry symlink data in an undocumented layout, and Puppet's reader only understands SYMLINK and MOUNT_POINT buffers - so it refuses rather than misparse.

Source

Thrown at lib/puppet/util/windows/file.rb:154

    raise Puppet::Util::Windows::Error, "CreateFile(#{file_name}, #{desired_access.to_s(8)}, #{share_mode.to_s(8)}, " \
                                        "#{security_attributes}, #{creation_disposition.to_s(8)}, " \
                                        "#{flags_and_attributes.to_s(8)}, #{template_file_handle})"
  end

  def self.get_reparse_point_data(handle, &block)
    # must be multiple of 1024, min 10240
    FFI::MemoryPointer.new(MAXIMUM_REPARSE_DATA_BUFFER_SIZE) do |reparse_data_buffer_ptr|
      device_io_control(handle, FSCTL_GET_REPARSE_POINT, nil, reparse_data_buffer_ptr)

      reparse_tag = reparse_data_buffer_ptr.read_win32_ulong
      buffer_type = case reparse_tag
                    when IO_REPARSE_TAG_SYMLINK
                      SYMLINK_REPARSE_DATA_BUFFER
                    when IO_REPARSE_TAG_MOUNT_POINT
                      MOUNT_POINT_REPARSE_DATA_BUFFER
                    when IO_REPARSE_TAG_NFS
                      raise Puppet::Util::Windows::Error, "Retrieving NFS reparse point data is unsupported"
                    else
                      raise Puppet::Util::Windows::Error, "DeviceIoControl(#{handle}, " \
                                                          "FSCTL_GET_REPARSE_POINT) returned unknown tag 0x#{reparse_tag.to_s(16).upcase}"
                    end

      yield buffer_type.new(reparse_data_buffer_ptr)
    end

    # underlying struct MemoryPointer has been cleaned up by this point, nothing to return
    nil
  end

  def self.get_reparse_point_tag(handle)
    reparse_tag = nil

    # must be multiple of 1024, min 10240
    FFI::MemoryPointer.new(MAXIMUM_REPARSE_DATA_BUFFER_SIZE) do |reparse_data_buffer_ptr|
      device_io_control(handle, FSCTL_GET_REPARSE_POINT, nil, reparse_data_buffer_ptr)

View on GitHub (pinned to e227c27540)

Solutions

  1. Rescue this specific error and treat the entry as an opaque/regular file
  2. Pre-check the tag with get_reparse_point_tag(handle) and skip NFS-tagged entries
  3. Serve the affected files from a native Windows filesystem (SMB/NTFS) instead of NFS
  4. Avoid managing NFS-symlinked paths with resources that dereference links

Example fix

// before
Puppet::Util::Windows::File.get_reparse_point_data(handle) { |buf| ... }  # NFS tag -> raise

// after
tag = Puppet::Util::Windows::File.get_reparse_point_tag(handle)
if tag == Puppet::Util::Windows::File::IO_REPARSE_TAG_NFS
  Puppet.debug("skipping NFS reparse point")
else
  Puppet::Util::Windows::File.get_reparse_point_data(handle) { |buf| ... }
end
Defensive patterns

Strategy: validation

Validate before calling

tag = Puppet::Util::Windows::File.get_reparse_point_tag(handle)
if tag == Puppet::Util::Windows::File::IO_REPARSE_TAG_NFS
  Puppet.debug("#{path}: NFS reparse point - skipping")
  return nil
end
Puppet::Util::Windows::File.get_reparse_point_data(handle) { |buf| process(buf) }

Try / catch

begin
  Puppet::Util::Windows::File.get_reparse_point_data(handle) { |buf| process(buf) }
rescue Puppet::Util::Windows::Error => e
  raise unless e.message.include?('NFS reparse point')
  # NFS layout is unreadable here - treat as plain file
end

Prevention

When it happens

Trigger: Calling get_reparse_point_data (directly or via symlink inspection like readlink/get_stat) on a file whose reparse tag is IO_REPARSE_TAG_NFS - i.e. a symlink created on an NFS share mounted through Windows NFS client.

Common situations: Site data served from NFS and consumed on Windows agents; mixed Unix/Windows shops where Unix masters create symlinks that land on NFS mounts; CI against NFS-backed test fixtures.

Related errors


AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21). Data as JSON: /api/errors/146d71be07f6c2a0. Report an issue: GitHub.