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

Facter executes `which lsblk` and `which blkid` for each partition

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: FACT 4.2.0
    • Component/s: None
    • Labels:
    • Template:
    • Team:
      Night's Watch
    • Story Points:
      2
    • Sprint:
      NW - 2021-06-02
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      This release fixes a bug where Facter would execute `which lsblk` and `which blkid` for each partition. Now the commands are executed once per Facter run, providing a performance improvement and improving log readability.
    • QA Risk Assessment:
      Needs Assessment

      Description

      The partitions resolver executes which lsblk and which blkid for each partition which seems unnecessary:

      bx facter --debug 2>&1 >/dev/null | grep 'Executing command'
      ...
      [2021-05-05 12:36:48.294630 ] DEBUG Facter::Core::Execution::Posix - Executing command: /opt/puppetlabs/puppet/bin/augparse --version 2>&1 
      [2021-05-05 12:36:48.298000 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.298912 ] DEBUG Facter::Core::Execution::Posix - Executing command: blkid 
      [2021-05-05 12:36:48.300803 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.301583 ] DEBUG Facter::Core::Execution::Posix - Executing command: lsblk -fp 
      [2021-05-05 12:36:48.308699 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.310093 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.312506 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.313412 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.314210 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.315012 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.315835 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.316695 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.317802 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.318814 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.319540 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.320294 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.321010 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.321846 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.322570 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.324456 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.325494 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.326518 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.327414 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.328384 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.329082 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.329822 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.330468 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.331234 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.331937 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.332707 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.333450 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.335049 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.335784 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.336643 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.337515 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.338420 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.339205 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.340127 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.341078 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.342076 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.342928 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.343740 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.344441 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.345235 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.345883 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.346608 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.347262 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.347984 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.348632 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.349322 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.350006 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.351430 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.352085 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.352791 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.353420 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.354145 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.354800 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.355512 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.356138 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.356865 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.357515 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.358230 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.358938 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      [2021-05-05 12:36:48.359673 ] DEBUG Facter::Core::Execution::Posix - Executing command: which blkid 
      [2021-05-05 12:36:48.360281 ] DEBUG Facter::Core::Execution::Posix - Executing command: which lsblk 
      

        Attachments

          Activity

            People

            Assignee:
            luchian.nemes Luchian Nemes
            Reporter:
            josh Josh Cooper
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support