{"action":"created","issue":{"url":"https://api.github.com/repos/fboender/ansible-cmdb/issues/2","labels_url":"https://api.github.com/repos/fboender/ansible-cmdb/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/fboender/ansible-cmdb/issues/2/comments","events_url":"https://api.github.com/repos/fboender/ansible-cmdb/issues/2/events","html_url":"https://github.com/fboender/ansible-cmdb/issues/2","id":100103668,"number":2,"title":"ZeroDivisionError when there are no partitions of disk","user":{"login":"Atoms","id":9615,"avatar_url":"https://avatars.githubusercontent.com/u/9615?v=3","gravatar_id":"","url":"https://api.github.com/users/Atoms","html_url":"https://github.com/Atoms","followers_url":"https://api.github.com/users/Atoms/followers","following_url":"https://api.github.com/users/Atoms/following{/other_user}","gists_url":"https://api.github.com/users/Atoms/gists{/gist_id}","starred_url":"https://api.github.com/users/Atoms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Atoms/subscriptions","organizations_url":"https://api.github.com/users/Atoms/orgs","repos_url":"https://api.github.com/users/Atoms/repos","events_url":"https://api.github.com/users/Atoms/events{/privacy}","received_events_url":"https://api.github.com/users/Atoms/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-10T16:06:05Z","updated_at":"2015-08-10T16:30:42Z","closed_at":null,"body":"I'm trying to add in cmdb overview Citrix xenserver, Citrix xenserver by default has mounted iso \r\n\r\n/opt/xensource/packages/iso/XenCenter.iso\r\n                       56M   56M     0 100% /var/xen/xc-install\r\n\r\nin ansible facts gathered it shows under ansible_mounts as \r\n\r\n            {\r\n                \"device\": \"/opt/xensource/packages/iso/XenCenter.iso\",.\r\n                \"fstype\": \"iso9660\",.\r\n                \"mount\": \"/var/xen/xc-install\",.\r\n                \"options\": \"ro,loop=/dev/loop0\",.\r\n                \"size_available\": 0,.\r\n                \"size_total\": 53665792,.\r\n                \"uuid\": \"NA\"\r\n            },.\r\nIt's not the only one mount point which has size_available 0.\r\n\r\n# ansible-cmdb  out/ > cmdb/overview.html\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/ansible-cmdb\", line 134, in <module>\r\n    sys.stdout.write(mytemplate.render(hosts=ansible.hosts))\r\n  File \"/usr/lib/python2.7/site-packages/mako/template.py\", line 443, in render\r\n    return runtime._render(self, self.callable_, args, data)\r\n  File \"/usr/lib/python2.7/site-packages/mako/runtime.py\", line 783, in _render\r\n    **_kwargs_for_callable(callable_, data))\r\n  File \"/usr/lib/python2.7/site-packages/mako/runtime.py\", line 815, in _render_context\r\n    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)\r\n  File \"/usr/lib/python2.7/site-packages/mako/runtime.py\", line 841, in _exec_template\r\n    callable_(context, *args, **kwargs)\r\n  File \"_usr_local_lib_ansible_cmdb_html_fancy_tpl\", line 184, in render_body\r\n  File \"_usr_local_lib_ansible_cmdb_html_fancy_tpl\", line 36, in col_disk_usage\r\n  File \"_usr_local_lib_ansible_cmdb_html_fancy_tpl\", line 607, in render_col_disk_usage\r\nZeroDivisionError: float division by zero\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/fboender/ansible-cmdb/issues/comments/129518128","html_url":"https://github.com/fboender/ansible-cmdb/issues/2#issuecomment-129518128","issue_url":"https://api.github.com/repos/fboender/ansible-cmdb/issues/2","id":129518128,"user":{"login":"fboender","id":2477515,"avatar_url":"https://avatars.githubusercontent.com/u/2477515?v=3","gravatar_id":"","url":"https://api.github.com/users/fboender","html_url":"https://github.com/fboender","followers_url":"https://api.github.com/users/fboender/followers","following_url":"https://api.github.com/users/fboender/following{/other_user}","gists_url":"https://api.github.com/users/fboender/gists{/gist_id}","starred_url":"https://api.github.com/users/fboender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fboender/subscriptions","organizations_url":"https://api.github.com/users/fboender/orgs","repos_url":"https://api.github.com/users/fboender/repos","events_url":"https://api.github.com/users/fboender/events{/privacy}","received_events_url":"https://api.github.com/users/fboender/received_events","type":"User","site_admin":false},"created_at":"2015-08-10T16:30:42Z","updated_at":"2015-08-10T16:30:42Z","body":"Hey Atoms,\r\n\r\nThanks for you bug report!\r\n\r\nI can't seem to reproduce this problem. A size_available of 0 shouldn't be a problem with the latest version (v1.1 or master branch from Github), since the col_disk_usage is calculated as: (size_total - size_available) / size_total. I have several squashfs filesystems that have 0 available size.\r\n\r\nCould you send me your entire out directory (ferry.boender@gmail.com) or a reduced/redacted minimal sample that reproduces the error?"}}