Bug 2059031
| Summary: | The insights-client fails to register host when using --group option in the command | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Nikhil Gupta <ngupta> |
| Component: | insights-client | Assignee: | CSI Client Tools Bugs <csi-client-tools-bugs> |
| Status: | CLOSED MIGRATED | QA Contact: | Red Hat subscription-manager QE Team <rhsm-qe> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 7.9 | CC: | cmarinea, fjansen, gchamoul, link, myllynen, pmendezh, shivagup, stomsa |
| Target Milestone: | rc | Keywords: | MigratedToJIRA, Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-09-14 11:32:42 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Reproduced it and happens every time w/o Satellite as well.
Just try to register and create the initial group called "whatever":
$ insights-client --register --group="whatever"
Fatal error
Traceback (most recent call last):
File "/var/lib/insights/newest.egg/insights/client/phase/v1.py", line 32, in _f
func(client, config)
File "/var/lib/insights/newest.egg/insights/client/phase/v1.py", line 198, in post_update
reg = client.register()
File "/var/lib/insights/newest.egg/insights/client/__init__.py", line 72, in _init_connection
return func(self, *args, **kwargs)
File "/var/lib/insights/newest.egg/insights/client/__init__.py", line 406, in register
return client.handle_registration(self.config, self.connection)
File "/var/lib/insights/newest.egg/insights/client/client.py", line 189, in handle_registration
return _legacy_handle_registration(config, pconn)
File "/var/lib/insights/newest.egg/insights/client/client.py", line 151, in _legacy_handle_registration
message, hostname, group, display_name = register(config, pconn)
File "/var/lib/insights/newest.egg/insights/client/client.py", line 109, in register
return pconn.register()
File "/var/lib/insights/newest.egg/insights/client/connection.py", line 786, in register
self.do_group()
File "/var/lib/insights/newest.egg/insights/client/connection.py", line 624, in do_group
self.group_systems(group_id, systems)
File "/var/lib/insights/newest.egg/insights/client/connection.py", line 599, in group_systems
api_group_id = get_group.json()['id']
TypeError: list indices must be integers, not str
Fatal error
Traceback (most recent call last):
File "/etc/insights-client/rpm.egg/insights/client/phase/v1.py", line 32, in _f
func(client, config)
File "/etc/insights-client/rpm.egg/insights/client/phase/v1.py", line 195, in post_update
reg = client.register()
File "/etc/insights-client/rpm.egg/insights/client/__init__.py", line 74, in _init_connection
return func(self, *args, **kwargs)
File "/etc/insights-client/rpm.egg/insights/client/__init__.py", line 408, in register
return client.handle_registration(self.config, self.connection)
File "/etc/insights-client/rpm.egg/insights/client/client.py", line 189, in handle_registration
return _legacy_handle_registration(config, pconn)
File "/etc/insights-client/rpm.egg/insights/client/client.py", line 151, in _legacy_handle_registration
message, hostname, group, display_name = register(config, pconn)
File "/etc/insights-client/rpm.egg/insights/client/client.py", line 109, in register
return pconn.register()
File "/etc/insights-client/rpm.egg/insights/client/connection.py", line 778, in register
self.do_group()
File "/etc/insights-client/rpm.egg/insights/client/connection.py", line 613, in do_group
self.group_systems(group_id, systems)
File "/etc/insights-client/rpm.egg/insights/client/connection.py", line 580, in group_systems
api_group_id = get_group.json()['id']
TypeError: list indices must be integers, not str
*** Bug 2175779 has been marked as a duplicate of this bug. *** Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug. This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there. Due to differences in account names between systems, some fields were not replicated. Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information. To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer. You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like: "Bugzilla Bug" = 1234567 In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information. |
Description of problem: The insights-client fails to register host when using --group option in the command like below: ~~~ # insights-client --register --group="tag" Fatal error Traceback (most recent call last): File "/var/lib/insights/newest.egg/insights/client/phase/v1.py", line 32, in _f func(client, config) File "/var/lib/insights/newest.egg/insights/client/phase/v1.py", line 198, in post_update reg = client.register() File "/var/lib/insights/newest.egg/insights/client/__init__.py", line 72, in _init_connection return func(self, *args, **kwargs) File "/var/lib/insights/newest.egg/insights/client/__init__.py", line 406, in register return client.handle_registration(self.config, self.connection) File "/var/lib/insights/newest.egg/insights/client/client.py", line 189, in handle_registration return _legacy_handle_registration(config, pconn) File "/var/lib/insights/newest.egg/insights/client/client.py", line 151, in _legacy_handle_registration message, hostname, group, display_name = register(config, pconn) File "/var/lib/insights/newest.egg/insights/client/client.py", line 109, in register return pconn.register() File "/var/lib/insights/newest.egg/insights/client/connection.py", line 786, in register self.do_group() File "/var/lib/insights/newest.egg/insights/client/connection.py", line 624, in do_group self.group_systems(group_id, systems) File "/var/lib/insights/newest.egg/insights/client/connection.py", line 599, in group_systems api_group_id = get_group.json()['id'] TypeError: list indices must be integers, not str Fatal error Traceback (most recent call last): File "/etc/insights-client/rpm.egg/insights/client/phase/v1.py", line 32, in _f func(client, config) File "/etc/insights-client/rpm.egg/insights/client/phase/v1.py", line 195, in post_update reg = client.register() File "/etc/insights-client/rpm.egg/insights/client/__init__.py", line 74, in _init_connection return func(self, *args, **kwargs) File "/etc/insights-client/rpm.egg/insights/client/__init__.py", line 408, in register return client.handle_registration(self.config, self.connection) File "/etc/insights-client/rpm.egg/insights/client/client.py", line 189, in handle_registration return _legacy_handle_registration(config, pconn) File "/etc/insights-client/rpm.egg/insights/client/client.py", line 151, in _legacy_handle_registration message, hostname, group, display_name = register(config, pconn) File "/etc/insights-client/rpm.egg/insights/client/client.py", line 109, in register return pconn.register() File "/etc/insights-client/rpm.egg/insights/client/connection.py", line 778, in register self.do_group() File "/etc/insights-client/rpm.egg/insights/client/connection.py", line 613, in do_group self.group_systems(group_id, systems) File "/etc/insights-client/rpm.egg/insights/client/connection.py", line 580, in group_systems api_group_id = get_group.json()['id'] TypeError: list indices must be integers, not str ~~~ Version-Release number of selected component (if applicable): Satellite version: 6.9.7 Client version: RHEL 7.9 Insights client version: 3.1.5 Insights core version: 3.0.263-1 How reproducible: Always Steps to Reproduce: 1. Register host with the Satellite 6.9.7 version 2. Register host on insights with the command "# insights-client --register --group="tag"" Actual results: It fails with the following error: ~~~ File "/etc/insights-client/rpm.egg/insights/client/connection.py", line 613, in do_group self.group_systems(group_id, systems) File "/etc/insights-client/rpm.egg/insights/client/connection.py", line 580, in group_systems api_group_id = get_group.json()['id'] TypeError: list indices must be integers, not str ~~~ Expected results: Host should be registered on insights with the group "tag". Additional info: - It seems very similar to https://bugzilla.redhat.com/show_bug.cgi?id=1549213 - Doing the register with the following command works properly: ~~~ # insights-client --register && insights-client --group="tag" ~~~