Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More statvfs info for mount facts rebase 12073 #25454

Merged
merged 3 commits into from Jun 13, 2017
Merged

More statvfs info for mount facts rebase 12073 #25454

merged 3 commits into from Jun 13, 2017

Conversation

alikins
Copy link
Contributor

@alikins alikins commented Jun 7, 2017

SUMMARY

rebase of #12073 + test cases. Here mostly for CI.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lib/ansible/module_utils/facts/hardware/

ANSIBLE VERSION
ansible 2.4.0 (more_statvfs_facts_rebase_12073 ce67448c66) last updated 2017/06/07 18:16:06 (GMT -400)
  config file = 
  configured module search path = [u'/home/adrian/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/adrian/src/ansible/lib/ansible
  executable location = /home/adrian/src/ansible/bin/ansible
  python version = 2.7.13 (default, May 10 2017, 20:04:28) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)]

ADDITIONAL INFORMATION

Based on #12073

facts.utils.get_mount_size() now returns a dict of most
of the posix statvfs data, including block_size and inode
counts.

Update the facts.hardware classes that use get_mount_size() to
use the new info by mount_info.update(mount_statvfs_inof) to merge.
@ansibot ansibot added WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. affects_2.4 This issue/PR affects Ansible v2.4 bugfix_pull_request c:module_utils/ c:module_utils/facts needs_triage Needs a first human triage before being processed. labels Jun 8, 2017
@Yannig
Copy link
Contributor

Yannig commented Jun 8, 2017

Nice!

@alikins
Copy link
Contributor Author

alikins commented Jun 8, 2017

A diff of current devel vs this branch facts
(with some unrelated noisy facts filtered out)

--- devel.json	2017-06-08 11:45:12.885309758 -0400
+++ more_statvfs_facts_rebase_12073.json	2017-06-08 11:44:24.990471802 -0400

@@ -490,8 +490,15 @@
         "ansible_memtotal_mb": 31615, 
         "ansible_mounts": [
             {
+                "block_available": 10187429, 
+                "block_size": 4096, 
+                "block_total": 12868728, 
+                "block_used": 2681299, 
                 "device": "/dev/mapper/fedora-root", 
                 "fstype": "ext4", 
+                "inode_available": 3061664, 
+                "inode_total": 3276800, 
+                "inode_used": 215136, 
                 "mount": "/", 
                 "options": "rw,seclabel,relatime,data=ordered", 
                 "size_available": 41727709184, 
@@ -499,8 +506,15 @@
                 "uuid": "774186d0-d048-4ef1-ae3f-e743387adfdd"
             }, 
             {
+                "block_available": 187585, 
+                "block_size": 4096, 
+                "block_total": 249830, 
+                "block_used": 62245, 
                 "device": "/dev/sda1", 
                 "fstype": "ext4", 
+                "inode_available": 65096, 
+                "inode_total": 65536, 
+                "inode_used": 440, 
                 "mount": "/boot", 
                 "options": "rw,seclabel,relatime,data=ordered", 
                 "size_available": 768348160, 
@@ -508,17 +522,31 @@
                 "uuid": "91730e5b-e9d8-499b-b67c-69edaeb4ee7b"
             }, 
             {
+                "block_available": 100157959, 
+                "block_size": 4096, 
+                "block_total": 105871006, 
+                "block_used": 5713047, 
                 "device": "/dev/mapper/fedora-home", 
                 "fstype": "ext4", 
+                "inode_available": 26860303, 
+                "inode_total": 26902528, 
+                "inode_used": 42225, 
                 "mount": "/home", 
                 "options": "rw,seclabel,relatime,data=ordered", 
-                "size_available": 410246696960, 
+                "size_available": 410247000064, 
                 "size_total": 433647640576, 
                 "uuid": "6f7b50bc-bc80-43cb-9e99-9cc0ca85df19"
             }, 
             {
+                "block_available": 10187429, 
+                "block_size": 4096, 
+                "block_total": 12868728, 
+                "block_used": 2681299, 
                 "device": "/dev/mapper/fedora-root", 
                 "fstype": "ext4", 
+                "inode_available": 3061664, 
+                "inode_total": 3276800, 
+                "inode_used": 215136, 
                 "mount": "/var/lib/docker/devicemapper", 
                 "options": "rw,seclabel,relatime,data=ordered,bind", 
                 "size_available": 41727709184, 
@@ -675,7 +703,7 @@
             ], 
             "type": "tunnel"
         }, 

         "ansible_user_dir": "/home/adrian", 
         "ansible_user_gecos": "Adrian Likins", 
         "ansible_user_gid": 1000, 

@alikins alikins changed the title [WIP]/CIMore statvfs facts rebase 12073 More statvfs info for mount facts rebase 12073 Jun 8, 2017
@ansibot ansibot removed the WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. label Jun 8, 2017
@nitzmahone nitzmahone removed the needs_triage Needs a first human triage before being processed. label Jun 8, 2017
@alikins alikins merged commit 56b7483 into ansible:devel Jun 13, 2017
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 6, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.4 This issue/PR affects Ansible v2.4 bug This issue/PR relates to a bug. c:module_utils/facts c:module_utils/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants