ansible-collections / community.vmware

Ansible Collection for VMware
GNU General Public License v3.0
349 stars 341 forks source link

vmware_host_logbundle: 'NoneType' object has no attribute 'read' #272

Closed goneri closed 3 years ago

goneri commented 4 years ago
2020-07-01 13:24:46.120994 | centos-8 | TASK [vmware_host_logbundle : fetch logbundle archive file from ESXi use performance_data param - connect to vCenter] ***
2020-07-01 13:24:46.121288 | centos-8 | task path: /home/zuul/.ansible/collections/ansible_collections/community/vmware/tests/integration/targets/vmware_host_logbundle/tasks/main.yml:155
2020-07-01 13:24:46.203071 | centos-8 | <testhost> ESTABLISH LOCAL CONNECTION FOR USER: zuul
2020-07-01 13:24:46.203661 | centos-8 | <testhost> EXEC /bin/sh -c 'echo ~zuul && sleep 0'
2020-07-01 13:24:46.214236 | centos-8 | <testhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/zuul/.ansible/tmp `"&& mkdir /home/zuul/.ansible/tmp/ansible-tmp-1593609886.2124255-36174-94851173737655 && echo ansible-tmp-1593609886.2124255-36174-94851173737655="` echo /home/zuul/.ansible/tmp/ansible-tmp-1593609886.2124255-36174-94851173737655 `" ) && sleep 0'
2020-07-01 13:24:46.232393 | centos-8 | Using module file /home/zuul/.ansible/collections/ansible_collections/community/vmware/plugins/modules/vmware_host_logbundle.py
2020-07-01 13:24:46.233697 | centos-8 | <testhost> PUT /home/zuul/.ansible/tmp/ansible-local-35204_ylgrzra/tmpmummd98c TO /home/zuul/.ansible/tmp/ansible-tmp-1593609886.2124255-36174-94851173737655/AnsiballZ_vmware_host_logbundle.py
2020-07-01 13:24:46.234822 | centos-8 | <testhost> EXEC /bin/sh -c 'chmod u+x /home/zuul/.ansible/tmp/ansible-tmp-1593609886.2124255-36174-94851173737655/ /home/zuul/.ansible/tmp/ansible-tmp-1593609886.2124255-36174-94851173737655/AnsiballZ_vmware_host_logbundle.py && sleep 0'
2020-07-01 13:24:46.245081 | centos-8 | <testhost> EXEC /bin/sh -c '/tmp/python-n9hz3_vz-ansible/python /home/zuul/.ansible/tmp/ansible-tmp-1593609886.2124255-36174-94851173737655/AnsiballZ_vmware_host_logbundle.py && sleep 0'
2020-07-01 13:24:57.418361 | centos-8 | <testhost> EXEC /bin/sh -c 'rm -f -r /home/zuul/.ansible/tmp/ansible-tmp-1593609886.2124255-36174-94851173737655/ > /dev/null 2>&1 && sleep 0'
2020-07-01 13:24:57.433718 | centos-8 | The full traceback is:
2020-07-01 13:24:57.433799 | centos-8 |   File "/tmp/ansible_vmware_host_logbundle_payload_i4ya807p/ansible_vmware_host_logbundle_payload.zip/ansible_collections/community/vmware/plugins/modules/vmware_host_logbundle.py", line 225, in get_logbundle
2020-07-01 13:24:57.434857 | centos-8 | fatal: [testhost]: FAILED! => {
2020-07-01 13:24:57.434894 | centos-8 |     "changed": false,
2020-07-01 13:24:57.434926 | centos-8 |     "invocation": {
2020-07-01 13:24:57.434955 | centos-8 |         "module_args": {
2020-07-01 13:24:57.434985 | centos-8 |             "dest": "./esxi-log.tgz",
2020-07-01 13:24:57.435013 | centos-8 |             "esxi_hostname": "esxi1.test",
2020-07-01 13:24:57.435062 | centos-8 |             "hostname": "vcenter.test",
2020-07-01 13:24:57.435085 | centos-8 |             "manifests": [
2020-07-01 13:24:57.435097 | centos-8 |                 "System:Base",
2020-07-01 13:24:57.435109 | centos-8 |                 "System:CoreDumps",
2020-07-01 13:24:57.435121 | centos-8 |                 "System:EsxImage",
2020-07-01 13:24:57.435145 | centos-8 |                 "System:IOFilter",
2020-07-01 13:24:57.435157 | centos-8 |                 "System:LoadESX",
2020-07-01 13:24:57.435168 | centos-8 |                 "System:Modules",
2020-07-01 13:24:57.435179 | centos-8 |                 "System:RDMA",
2020-07-01 13:24:57.435190 | centos-8 |                 "System:ResourceGroups",
2020-07-01 13:24:57.435201 | centos-8 |                 "System:TPM",
2020-07-01 13:24:57.435212 | centos-8 |                 "System:VFlash",
2020-07-01 13:24:57.435223 | centos-8 |                 "System:VMTools",
2020-07-01 13:24:57.435234 | centos-8 |                 "System:VmiofPlugins",
2020-07-01 13:24:57.435245 | centos-8 |                 "System:ntp",
2020-07-01 13:24:57.435256 | centos-8 |                 "System:uwstats",
2020-07-01 13:24:57.435266 | centos-8 |                 "Fcd:Catalog",
2020-07-01 13:24:57.435277 | centos-8 |                 "VirtualMachines:CoreDumps",
2020-07-01 13:24:57.435288 | centos-8 |                 "VirtualMachines:VirtualMachineStats",
2020-07-01 13:24:57.435300 | centos-8 |                 "VirtualMachines:base",
2020-07-01 13:24:57.435311 | centos-8 |                 "VirtualMachines:base",
2020-07-01 13:24:57.435322 | centos-8 |                 "VirtualMachines:diskinfo",
2020-07-01 13:24:57.435333 | centos-8 |                 "VirtualMachines:logs",
2020-07-01 13:24:57.435344 | centos-8 |                 "Storage:FCoE",
2020-07-01 13:24:57.435355 | centos-8 |                 "Storage:Multipathing",
2020-07-01 13:24:57.435366 | centos-8 |                 "Storage:NAS",
2020-07-01 13:24:57.435377 | centos-8 |                 "Storage:VSAN",
2020-07-01 13:24:57.435388 | centos-8 |                 "Storage:VSANHealth",
2020-07-01 13:24:57.435399 | centos-8 |                 "Storage:VSANIscsiTarget",
2020-07-01 13:24:57.435410 | centos-8 |                 "Storage:VSANPerfStats",
2020-07-01 13:24:57.435421 | centos-8 |                 "Storage:VSANPerfSvc",
2020-07-01 13:24:57.435431 | centos-8 |                 "Storage:VSANTraces",
2020-07-01 13:24:57.435442 | centos-8 |                 "Storage:VVOL",
2020-07-01 13:24:57.435453 | centos-8 |                 "Storage:base",
2020-07-01 13:24:57.435464 | centos-8 |                 "Storage:iodm",
2020-07-01 13:24:57.435475 | centos-8 |                 "Storage:iscsi",
2020-07-01 13:24:57.435486 | centos-8 |                 "FeatureStateSwitch:FeatureStateSwitch",
2020-07-01 13:24:57.435497 | centos-8 |                 "Userworld:HostAgent",
2020-07-01 13:24:57.435508 | centos-8 |                 "Userworld:ProcessInformation",
2020-07-01 13:24:57.435519 | centos-8 |                 "Configuration:System",
2020-07-01 13:24:57.435530 | centos-8 |                 "Logs:System",
2020-07-01 13:24:57.435541 | centos-8 |                 "hostProfiles:SystemImageCacheHostProfile",
2020-07-01 13:24:57.435574 | centos-8 |                 "hostProfiles:hostProfiles",
2020-07-01 13:24:57.435589 | centos-8 |                 "FileSystem:VMFSDiskDump",
2020-07-01 13:24:57.435601 | centos-8 |                 "FileSystem:base",
2020-07-01 13:24:57.435612 | centos-8 |                 "ActiveDirectory:base",
2020-07-01 13:24:57.435623 | centos-8 |                 "CIM:base",
2020-07-01 13:24:57.435634 | centos-8 |                 "Hardware:base",
2020-07-01 13:24:57.435659 | centos-8 |                 "Hardware:usb",
2020-07-01 13:24:57.435670 | centos-8 |                 "Installer:base",
2020-07-01 13:24:57.435681 | centos-8 |                 "Network:base",
2020-07-01 13:24:57.435692 | centos-8 |                 "Network:dvs",
2020-07-01 13:24:57.435702 | centos-8 |                 "Network:lacp",
2020-07-01 13:24:57.435727 | centos-8 |                 "Network:nscd",
2020-07-01 13:24:57.435738 | centos-8 |                 "Network:tcpip",
2020-07-01 13:24:57.435761 | centos-8 |                 "IntegrityChecks:md5sums"
2020-07-01 13:24:57.435788 | centos-8 |             ],
2020-07-01 13:24:57.435801 | centos-8 |             "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
2020-07-01 13:24:57.435813 | centos-8 |             "performance_data": {
2020-07-01 13:24:57.435829 | centos-8 |                 "duration": 10,
2020-07-01 13:24:57.435842 | centos-8 |                 "interval": 5
2020-07-01 13:24:57.435854 | centos-8 |             },
2020-07-01 13:24:57.435865 | centos-8 |             "port": 443,
2020-07-01 13:24:57.435877 | centos-8 |             "proxy_host": null,
2020-07-01 13:24:57.435888 | centos-8 |             "proxy_port": null,
2020-07-01 13:24:57.435899 | centos-8 |             "username": "administrator@vsphere.local",
2020-07-01 13:24:57.435911 | centos-8 |             "validate_certs": false
2020-07-01 13:24:57.435922 | centos-8 |         }
2020-07-01 13:24:57.435933 | centos-8 |     },
2020-07-01 13:24:57.435947 | centos-8 |     "msg": "Failed to fetch logbundle from https://esxi1.test/cgi-bin/vm-support.cgi?manifests=System:Base&System:CoreDumps&System:EsxImage&System:IOFilter&System:LoadESX&System:Modules&System:RDMA&System:ResourceGroups&System:TPM&System:VFlash&System:VMTools&System:VmiofPlugins&System:ntp&System:uwstats&Fcd:Catalog&VirtualMachines:CoreDumps&VirtualMachines:VirtualMachineStats&VirtualMachines:base&VirtualMachines:base&VirtualMachines:diskinfo&VirtualMachines:logs&Storage:FCoE&Storage:Multipathing&Storage:NAS&Storage:VSAN&Storage:VSANHealth&Storage:VSANIscsiTarget&Storage:VSANPerfStats&Storage:VSANPerfSvc&Storage:VSANTraces&Storage:VVOL&Storage:base&Storage:iodm&Storage:iscsi&FeatureStateSwitch:FeatureStateSwitch&Userworld:HostAgent&Userworld:ProcessInformation&Configuration:System&Logs:System&hostProfiles:SystemImageCacheHostProfile&hostProfiles:hostProfiles&FileSystem:VMFSDiskDump&FileSystem:base&ActiveDirectory:base&CIM:base&Hardware:base&Hardware:usb&Installer:base&Network:base&Network:dvs&Network:lacp&Network:nscd&Network:tcpip&IntegrityChecks:md5sums&performance=true&duration=10&interval=5: 'NoneType' object has no attribute 'read'"
2020-07-01 13:24:57.435961 | centos-8 | }
2020-07-01 13:24:57.464099 | centos-8 |
2020-07-01 13:24:57.464142 | centos-8 | PLAY RECAP *********************************************************************
2020-07-01 13:24:57.464156 | centos-8 | testhost                   : ok=55   changed=16   unreachable=0    failed=1    skipped=14   rescued=0    ignored=2
2020-07-01 13:24:57.464168 | centos-8 |
2020-07-01 13:24:57.824100 | centos-8 | Command exited with status 2 after 195.05032086372375 seconds.
2020-07-01 13:24:57.824930 | centos-8 | Run command: /home/zuul/venv/bin/python /home/zuul/venv/lib/python3.6/site-packages/ansible_test/_data/versions.py
2020-07-01 13:24:57.824992 | centos-8 | Working directory: /home/zuul/.ansible/collections/ansible_collections/community/vmware
2020-07-01 13:24:57.825105 | centos-8 | Program found: /home/zuul/venv/bin/python
2020-07-01 13:24:57.825176 | centos-8 | HOME=/home/zuul
2020-07-01 13:24:57.825226 | centos-8 | LC_ALL=en_US.UTF-8
2020-07-01 13:24:57.825274 | centos-8 | PATH=/home/zuul/venv/bin:/home/zuul/.local/bin:/home/zuul/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
2020-07-01 13:24:57.869088 | centos-8 | Command exited with status 0 after 0.04167914390563965 seconds.
2020-07-01 13:24:57.869158 | centos-8 | Run command: /home/zuul/venv/bin/python3 /home/zuul/venv/lib/python3.6/site-packages/ansible_test/_data/versions.py
2020-07-01 13:24:57.869188 | centos-8 | Working directory: /home/zuul/.ansible/collections/ansible_collections/community/vmware
2020-07-01 13:24:57.869202 | centos-8 | Program found: /home/zuul/venv/bin/python3
2020-07-01 13:24:57.869216 | centos-8 | HOME=/home/zuul
2020-07-01 13:24:57.869228 | centos-8 | LC_ALL=en_US.UTF-8
2020-07-01 13:24:57.869240 | centos-8 | PATH=/home/zuul/venv/bin:/home/zuul/.local/bin:/home/zuul/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
2020-07-01 13:24:57.911093 | centos-8 | Command exited with status 0 after 0.0421140193939209 seconds.
2020-07-01 13:24:57.911159 | centos-8 | Run command: /home/zuul/venv/bin/python3.6 /home/zuul/venv/lib/python3.6/site-packages/ansible_test/_data/versions.py
2020-07-01 13:24:57.911174 | centos-8 | Working directory: /home/zuul/.ansible/collections/ansible_collections/community/vmware
2020-07-01 13:24:57.911187 | centos-8 | Program found: /home/zuul/venv/bin/python3.6
2020-07-01 13:24:57.911200 | centos-8 | HOME=/home/zuul
2020-07-01 13:24:57.911212 | centos-8 | LC_ALL=en_US.UTF-8
2020-07-01 13:24:57.911224 | centos-8 | PATH=/home/zuul/venv/bin:/home/zuul/.local/bin:/home/zuul/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
2020-07-01 13:24:57.954089 | centos-8 | Command exited with status 0 after 0.041701555252075195 seconds.
2020-07-01 13:24:57.954136 | centos-8 | NOTICE: To resume at this test target, use the option: --start-at vmware_host_logbundle
2020-07-01 13:24:57.954151 | centos-8 | NOTICE: To resume after this test target, use the option: --start-at vmware_host_logbundle_info
2020-07-01 13:24:57.954164 | centos-8 | ERROR: Command "ansible-playbook vmware_host_logbundle-f6udmexi.yml -i ../../../../../../../venv/lib/python3.6/site-packages/ansible_test/_data/inventory --skip-tags False --diff -vvvvvv" returned exit status 2.

See: https://f89d326eaadae777999c-7705fcdeba92eee1a386f41ecfaacb90.ssl.cf1.rackcdn.com/270/f4ee8c8edd15cc5ef4769e029030e6c61fd50b67/check/ansible-test-cloud-integration-vcenter_1esxi_without_nested-python36_2_of_2/0665873/job-output.html

sky-joker commented 4 years ago

Thank you @goneri for reporting this issue. Does this error occur frequently?

goneri commented 4 years ago

You're welcome @sky-joker. It's the first time i see it.

sky-joker commented 4 years ago

Thank you for your response. It may be a temporary error.

ansibullbot commented 4 years ago

@goneri: Greetings! Thanks for taking the time to open this issue. In order for the community to handle your issue effectively, we need a bit more information.

Here are the items we could not find in your description:

Please set the description of this issue with this template: https://raw.githubusercontent.com/ansible/ansible/devel/.github/ISSUE_TEMPLATE/bug_report.md

click here for bot help

Akasurde commented 3 years ago

resolved_by_pr https://github.com/ansible-collections/community.vmware/pull/559