RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1743589 - virt-who run fails with TypeError: argument of type 'NoneType' is not iterable
Summary: virt-who run fails with TypeError: argument of type 'NoneType' is not iterable
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-who
Version: 7.6
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: Eko
URL:
Whiteboard:
Depends On:
Blocks: 1882382
TreeView+ depends on / blocked
 
Reported: 2019-08-20 09:17 UTC by Michal Dekan
Modified: 2023-12-07 08:51 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1882382 (view as bug list)
Environment:
Last Closed: 2023-12-07 08:51:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin virt-who pull 238 0 'None' closed 1743589: Content type header null coverage 2021-02-18 14:32:45 UTC

Description Michal Dekan 2019-08-20 09:17:46 UTC
Description of problem:

virt-who-0.24.7-1.el7.noarch running on satellite 6.4.3 is failing to connect to vcenter:

2019-08-17 15:34:56,516 [virtwho.main DEBUG] MainProcess(25436):Thread-2 @esx.py:_prepare:130 - Log into ESX
2019-08-17 15:34:56,670 [virtwho.main ERROR] MainProcess(25436):Thread-2 @virt.py:run:421 - Thread 'virt-who-config-5' fails with exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/virtwho/virt/virt.py", line 412, in run
    self._run()
  File "/usr/lib/python2.7/site-packages/virtwho/virt/esx/esx.py", line 143, in _run
    self._prepare()
  File "/usr/lib/python2.7/site-packages/virtwho/virt/esx/esx.py", line 131, in _prepare
    self.login()
  File "/usr/lib/python2.7/site-packages/virtwho/virt/esx/esx.py", line 349, in login
    self.sc = self.client.service.RetrieveServiceContent(_this=self.moRef)
  File "/usr/lib/python2.7/site-packages/suds/client.py", line 542, in __call__
    return client.invoke(args, kwargs)
  File "/usr/lib/python2.7/site-packages/suds/client.py", line 602, in invoke
    result = self.send(soapenv)
  File "/usr/lib/python2.7/site-packages/suds/client.py", line 641, in send
    reply = transport.send(request)
  File "/usr/lib/python2.7/site-packages/virtwho/virt/esx/esx.py", line 102, in send
    if 'application/soap+xml' not in ct and 'text/xml' not in ct:
TypeError: argument of type 'NoneType' is not iterable

Version-Release number of selected component (if applicable):

virt-who-0.24.7-1.el7.noarch
satellite-6.4.3-2.el7sat.noarch
redhat-release-server-7.6-4.el7.x86_64

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:

TypeError: argument of type 'NoneType' is not iterable

Expected results:

Real error message instead of TypeError, suggested this to the customer, to get real error:

/usr/lib/python2.7/site-packages/virtwho/virt/esx/esx.py

- ct = resp.headers.get('content-type')
+ ct = resp.headers.get('content-type', '')

Comment 3 Michal Dekan 2019-08-20 14:42:15 UTC
virt-who -od with code modification mentioned in the description:

2019-08-20 21:33:34,899 [virtwho.rhsm_log DEBUG] MainProcess(13380):MainThread @config.py:init_config:1499 - [virt-who-config-5]: Value for "simplified_vim" not set, using default: True
2019-08-20 21:33:34,899 [virtwho.rhsm_log WARNING] MainProcess(13380):MainThread @config.py:init_config:1499 - [virt-who-config-5]: Ignoring unknown configuration option "env"
2019-08-20 21:33:34,899 [virtwho.rhsm_log DEBUG] MainProcess(13380):MainThread @config.py:init_config:1499 - [global]: Value for "interval" not set, using default: 3600
2019-08-20 21:33:34,899 [virtwho.rhsm_log DEBUG] MainProcess(13380):MainThread @config.py:init_config:1499 - [global]: Value for "log_per_config" not set, using default: False
2019-08-20 21:33:34,899 [virtwho.rhsm_log DEBUG] MainProcess(13380):MainThread @config.py:init_config:1499 - [global]: Value for "print_" not set, using default: False
2019-08-20 21:33:34,899 [virtwho.rhsm_log DEBUG] MainProcess(13380):MainThread @config.py:init_config:1499 - [global]: Value for "reporter_id" not set, using default: satellite-1393b5edfa9d10bf51f71e9600000016
2019-08-20 21:33:34,900 [virtwho.rhsm_log DEBUG] MainProcess(13380):MainThread @config.py:init_config:1499 - [global]: Value for "log_dir" not set, using default: /var/log/rhsm
2019-08-20 21:33:34,900 [virtwho.rhsm_log DEBUG] MainProcess(13380):MainThread @config.py:init_config:1499 - [global]: Value for "configs" not set, using default: []
2019-08-20 21:33:34,900 [virtwho.rhsm_log DEBUG] MainProcess(13380):MainThread @config.py:init_config:1499 - [global]: Value for "log_file" not set, using default: rhsm.log
2019-08-20 21:33:34,900 [virtwho.rhsm_log INFO] MainProcess(13380):MainThread @executor.py:__init__:54 - Using config named 'virt-who-config-5'
2019-08-20 21:33:34,901 [virtwho.rhsm_log INFO] MainProcess(13380):MainThread @main.py:main:162 - Using configuration "virt-who-config-5" ("esx" mode)
2019-08-20 21:33:34,901 [virtwho.rhsm_log INFO] MainProcess(13380):MainThread @main.py:main:164 - Using reporter_id='satellite-1393b5edfa9d10bf51f71e9600000016'
2019-08-20 21:33:34,915 [rhsm.https DEBUG] MainProcess(13380):MainThread @https.py:<module>:56 - Using standard libs to provide httplib and ssl
2019-08-20 21:33:34,922 [virtwho.main DEBUG] MainProcess(13380):Thread-2 @virt.py:run:407 - Thread 'virt-who-config-5' started
2019-08-20 21:33:34,923 [virtwho.main DEBUG] MainProcess(13380):Thread-2 @esx.py:_prepare:130 - Log into ESX
2019-08-20 21:33:35,013 [virtwho.main ERROR] MainProcess(13380):Thread-2 @virt.py:run:416 - Thread 'virt-who-config-5' fails with error: 403 Client Error: Forbidden
2019-08-20 21:33:35,013 [virtwho.main INFO] MainProcess(13380):Thread-2 @virt.py:_send_data:969 - Report for config "virt-who-config-5" gathered, placing in datastore
2019-08-20 21:33:35,014 [virtwho.main DEBUG] MainProcess(13380):Thread-2 @virt.py:run:435 - Thread 'virt-who-config-5' stopped after running once
2019-08-20 21:33:35,924 [virtwho.destination_6931689818818942579 DEBUG] MainProcess(13380):Thread-3 @virt.py:run:407 - Thread 'destination_6931689818818942579' started
2019-08-20 21:33:35,924 [virtwho.destination_6931689818818942579 DEBUG] MainProcess(13380):Thread-3 @virt.py:_send_data:649 - ErrorReport received for source: virt-who-config-5
2019-08-20 21:33:35,925 [virtwho.destination_6931689818818942579 DEBUG] MainProcess(13380):Thread-3 @virt.py:_send_data:744 - At least one report for each connected source has been sent. Terminating.
2019-08-20 21:33:35,925 [virtwho.destination_6931689818818942579 DEBUG] MainProcess(13380):Thread-3 @virt.py:run:426 - Thread 'destination_6931689818818942579' terminated
2019-08-20 21:33:36,926 [virtwho.main DEBUG] MainProcess(13380):MainThread @__main__.py:main:25 - virt-who terminated
2019-08-20 21:33:36,926 [virtwho.main DEBUG] MainProcess(13380):MainThread @executor.py:terminate:225 - virt-who is shutting down

Comment 10 William Poteat 2019-11-11 20:50:57 UTC
Michal - Can you give us more information as to how you were able to get the 403 error to be returned [a bogus configuration, perhaps?] That seems to be the missing piece for validation on our end.

Comment 11 Michal Dekan 2019-11-13 13:22:56 UTC
William - When I checked attach case, it seems that they were getting 403 when accessing vcernter hostname using curl:

 curl -k -v https://<vcenter_fqdn>/mob

    <title>
      Web Filter Violation
    </title>

It looks like corporate proxy was intercepting SSL connection when virt-who was trying to connect to virt-who.

Comment 12 Michal Dekan 2019-11-13 13:25:49 UTC
EDIT: My English is falling apart: "It looks like corporate proxy was intercepting SSL connection when virt-who was trying to connect to virt-who." Should be It looks like corporate proxy was intercepting SSL connection when virt-who was trying to connect to vcenter.....

--Michal


Note You need to log in before you can comment on or make changes to this bug.