Jira (FACT-2964) Facter 4 outputs mountpoints facts differently on AIX

46 views
Skip to first unread message

Luchian Nemes (Jira)

unread,
Mar 12, 2021, 9:23:04 AM3/12/21
to puppe...@googlegroups.com
Luchian Nemes created an issue
 
Facter / Bug FACT-2964
Facter 4 outputs mountpoints facts differently on AIX
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2021/03/12 6:22 AM
Priority: Normal Normal
Reporter: Luchian Nemes

Running puppet facts diff on AIX 7.1 and AIX 7.2 gives the following output:

{
        "mountpoints./.capacity": {
          "new_value": "24.86%",
          "old_value": "57.10%"
        },
        "mountpoints./.used": {
          "new_value": "509.04 MiB",
          "old_value": "2.00 GiB"
        },
        "mountpoints./.used_bytes": {
          "new_value": 533770240,
          "old_value": 2147483648
        },
        "mountpoints./admin.capacity": {
          "new_value": "0.28%",
          "old_value": "50.07%"
        },
        "mountpoints./admin.used": {
          "new_value": "364.00 KiB",
          "old_value": "128.00 MiB"
        },
        "mountpoints./admin.used_bytes": {
          "new_value": 372736,
          "old_value": 134217728
        },
        "mountpoints./home.capacity": {
          "new_value": "0.02%",
          "old_value": "50.01%"
        },
        "mountpoints./home.used": {
          "new_value": "1004.00 KiB",
          "old_value": "4.00 GiB"
        },
        "mountpoints./home.used_bytes": {
          "new_value": 1028096,
          "old_value": 4294967296
        },
        "mountpoints./opt.capacity": {
          "new_value": "18.86%",
          "old_value": "55.20%"
        },
        "mountpoints./opt.used": {
          "new_value": "1.13 GiB",
          "old_value": "6.00 GiB"
        },
        "mountpoints./opt.used_bytes": {
          "new_value": 1214803968,
          "old_value": 6442450944
        },
        "mountpoints./tmp.capacity": {
          "new_value": "3.41%",
          "old_value": "50.87%"
        },
        "mountpoints./tmp.used": {
          "new_value": "69.89 MiB",
          "old_value": "2.00 GiB"
        },
        "mountpoints./tmp.used_bytes": {
          "new_value": 73281536,
          "old_value": 2147483648
        },
        "mountpoints./usr.capacity": {
          "new_value": "43.94%",
          "old_value": "64.08%"
        },
        "mountpoints./usr.used": {
          "new_value": "2.20 GiB",
          "old_value": "5.00 GiB"
        },
        "mountpoints./usr.used_bytes": {
          "new_value": 2358939648,
          "old_value": 5368709120
        },
        "mountpoints./var.capacity": {
          "new_value": "4.85%",
          "old_value": "51.24%"
        },
        "mountpoints./var.used": {
          "new_value": "446.80 MiB",
          "old_value": "9.00 GiB"
        },
        "mountpoints./var.used_bytes": {
          "new_value": 468504576,
          "old_value": 9663676416
        },
        "mountpoints./var/adm/ras/livedump.capacity": {
          "new_value": "0.14%",
          "old_value": "50.04%"
        },
        "mountpoints./var/adm/ras/livedump.used": {
          "new_value": "368.00 KiB",
          "old_value": "256.00 MiB"
        },
        "mountpoints./var/adm/ras/livedump.used_bytes": {
          "new_value": 376832,
          "old_value": 268435456
        }
}

More info: https://docs.google.com/document/d/1QlX_mv17fZ4eVZa9zHxvTRVJ5sq88aj3GjUC6lVFiz0/edit#heading=h.gnnvlmulav1v

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Luchian Nemes (Jira)

unread,
Mar 12, 2021, 9:24:03 AM3/12/21
to puppe...@googlegroups.com
Luchian Nemes updated an issue
Change By: Luchian Nemes
Running *puppet facts diff* on AIX 7.1 and AIX 7.2 gives the following output:
{code:json}

Luchian Nemes (Jira)

unread,
Mar 12, 2021, 9:25:03 AM3/12/21
to puppe...@googlegroups.com

Luchian Nemes (Jira)

unread,
Mar 12, 2021, 9:27:02 AM3/12/21
to puppe...@googlegroups.com

Luchian Nemes (Jira)

unread,
Mar 12, 2021, 9:27:03 AM3/12/21
to puppe...@googlegroups.com

Andrei Filipovici (Jira)

unread,
Mar 16, 2021, 8:45:03 AM3/16/21
to puppe...@googlegroups.com
Andrei Filipovici commented on Bug FACT-2964
 
Re: Facter 4 outputs mountpoints facts differently on AIX

Reproduced on aix71-power and aix72-power with:
Facter 3.14.16 (commit d3b0a04d6722084993ab2dd3ee4180718ad71942)
Facter 4.0.50

Facter 3.14.16 has an issue when it outputs the mountpoints data. The value for the mountpoint's size is identical to that of the mountpoint's used space.

For example:

/ => {
    available => "1.66 GiB",
    available_bytes => 1785569280,
    capacity => "54.60%",
    device => "/dev/hd4",
    filesystem => "jfs2",
    options => [
      "rw",
      "log=/dev/hd8"
    ],
    size => "*{color:red}2.00 GiB{color}*",
    size_bytes => *2147483648*,
    used => "*{color:red}2.00 GiB{color}*",
    used_bytes => *2147483648*
  },
  /admin => {
    available => "127.64 MiB",
    available_bytes => 133844992,
    capacity => "50.07%",
    device => "/dev/hd11admin",
    filesystem => "jfs2",
    options => [
      "rw",
      "log=/dev/hd8"
    ],
    size => "{color:red}*128.00 MiB*{color}",
    size_bytes => *134217728*,
    used => "*{color:red}128.00 MiB{color}*",
    used_bytes => *134217728*
  },

Also by subtracting the available space from the total size we don't get the used space.

On the other hand when requesting the mountpoints fact with Facter 4.0.50 we see that the only difference, is in the used_bytes and capacity values.

Data for the same mountpoints:

/ => {
    available => "1.66 GiB",
    available_bytes => 1785569280,
    capacity => "16.85%",
    size => "2.00 GiB",
    size_bytes => 2147483648,
    used => "345.15 MiB",
    used_bytes => 361914368
  },
  /admin => {
    available => "127.64 MiB",
    available_bytes => 133844992,
    capacity => "0.28%",
    size => "128.00 MiB",
    size_bytes => 134217728,
    used => "364.00 KiB",
    used_bytes => 372736
  },

Here we can see that the values make sense, the capacity is correctly calculated.
Also this data is backed up by what we see when running

df -P
 
Filesystem    512-blocks      Used Available Capacity  Mounted on
/dev/hd4         4194304    706864   3487440      17%  /
/dev/hd11admin     262144       728    261416       1%    /admin

In the above output capacities are rounded and the size, used and available values are calculated with the following formula:

value * 512 = value_in_bytes

Ex: mountpoint /:
Available: 3487440 * 512 = 1785569280 (what Facter 4 prints for available_bytes)
Used: 706864 *512 = 361914368 (what Facter 4 prints for used_bytes)
Size: 4194304 * 512 = 2147483648 (what Facter 4 prints for size_bytes)

Mihai Buzgau (Jira)

unread,
Mar 17, 2021, 2:13:04 AM3/17/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Apr 1, 2021, 12:44:03 PM4/1/21
to puppe...@googlegroups.com
Josh Cooper commented on Bug FACT-2964
 
Re: Facter 4 outputs mountpoints facts differently on AIX

It sounds like this is an bug in Facter 3? Can we add a known issue for this for users running puppet facts diff when upgrading to Facter 4/Puppet 7? Claire Cadman

 

Claire Cadman (Jira)

unread,
Apr 16, 2021, 5:33:01 AM4/16/21
to puppe...@googlegroups.com
Claire Cadman updated an issue
 
Change By: Claire Cadman
Labels: doc_reviewed
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Claire Cadman (Jira)

unread,
Apr 16, 2021, 5:33:02 AM4/16/21
to puppe...@googlegroups.com
Claire Cadman updated an issue
Change By: Claire Cadman
Labels: doc_reviewed known-issue-added

Gheorghe Popescu (Jira)

unread,
Apr 16, 2021, 5:42:01 AM4/16/21
to puppe...@googlegroups.com
Gheorghe Popescu updated an issue
Change By: Gheorghe Popescu
Facter 3 does not correctly detect mountpoints data on AIX.

Gheorghe Popescu (Jira)

unread,
Apr 16, 2021, 5:43:01 AM4/16/21
to puppe...@googlegroups.com
Gheorghe Popescu updated an issue
Facter 3 does not correctly detect mountpoints data on AIX. The value for the mountpoint's size is identical to that of the mountpoint's used space.

Running This is fixed in Facter 4 and it shows differences when tunning *puppet facts diff* on AIX 7.1 and AIX 7.2 gives the following output :

Gheorghe Popescu (Jira)

unread,
Apr 16, 2021, 5:43:02 AM4/16/21
to puppe...@googlegroups.com
Gheorghe Popescu updated an issue
Facter 3 does not correctly detect mountpoints data on AIX. The value for the mountpoint's size is identical to that of the mountpoint's used space.

This is fixed in Facter 4 and it shows differences when tunning *puppet facts diff* on AIX 7.1 and AIX 7.2:
Reply all
Reply to author
Forward
0 new messages