Uploaded image for project: 'Facter'
  1. Facter
  2. FACT-3060

AIX producing "Could not resolve mountpoints" with Facter 4

    XMLWordPrintable

Details

    • Night's Watch
    • 2
    • NW - 2021-08-25
    • Needs Assessment
    • 45161
    • 1
    • Bug Fix
    • Fixed faulty regex on AIX that would skip any lines that would have the substring `node` in them, resulting in the `Could not resolve mountpoints` error.(e.g If there would be a `nodev` option, the respective mountpoint would be skipped)
    • Needs Assessment

    Description

      After agent upgrade to puppet-agent-7.8.0-1.aix7.1.ppc.rpm with facter 4.2, facter is producing "Could not resolve mountpoints" errors. This was not the case when using facter 3.14

      facter 4 removes anything that contains the word node: https://github.com/puppetlabs/facter/blame/main/lib/facter/resolvers/aix/mountpoints.rb#L22

      but this is causing failures when we combine mount data with df data(from where node is not removed): https://github.com/puppetlabs/facter/blame/main/lib/facter/resolvers/aix/mountpoints.rb#L37

      in cfacter we do not skip node: https://github.com/puppetlabs/facter/blob/3.x/lib/src/facts/aix/filesystem_resolver.cc#L55-L62

      How to reproduce the issue:
      Add the following data to facter fixtures :

      # spec/fixtures/mount
       
        node       mounted        mounted over    vfs       date        options
      -------- ---------------  ---------------  ------ ------------ ---------------
               /dev/hd1         /                x   July 26 19:04 rw,log=/dev/hd3
               /dev/hd2         /usr             x   July 26 19:04 rw,nodev,log=/dev/hd3
       
       
      # spec/fixtures/df
       
      Filesystem    512-blocks      Used Available Capacity Mounted on
      /dev/hd1         1    1    1      1% /
      /dev/hd2         1    1    1      1% /usr
       
      
      

      debug the tests: bundle exec rspec spec/facter/resolvers/aix/mountpoints_spec.rb

      * Please see Zendesk Support tab for further comments and attachments.

      Attachments

        Issue Links

          Activity

            People

              victor.bobosila Victor Bobosila
              jordi.garcia Jordi Garcia
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support