Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 2165848 - virt-who-config update failed for "Could not create the Virt Who configuration"
Summary: virt-who-config update failed for "Could not create the Virt Who configuration"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Virt-who Configure Plugin
Version: 6.13.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.13.0
Assignee: Lucy Fu
QA Contact: yanpliu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-31 09:15 UTC by yanpliu
Modified: 2023-05-03 13:25 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-03 13:24:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 36048 0 Normal New virt-who-config update failed for "Could not create the Virt Who configuration" 2023-02-07 00:49:34 UTC
Red Hat Issue Tracker SAT-15625 0 None None None 2023-02-02 15:31:12 UTC
Red Hat Product Errata RHSA-2023:2097 0 None None None 2023-05-03 13:25:00 UTC

Description yanpliu 2023-01-31 09:15:29 UTC
Description of problem:
virt-who-config update failed for "Could not create the Virt Who configuration"


Version-Release number of selected component (if applicable):
Satellite6.13.0 snapshot8.0
katello-4.7.0-1.el8sat.noarch
rubygem-foreman_virt_who_configure-0.5.11-1.el8sat.noarch
rubygem-hammer_cli_foreman_virt_who_configure-0.0.9-2.el8sat.noarch

How reproducible:
100%

Steps to Reproduce:
1. Create a virt-who config 
[root@dell-per740-68-vm-07 ~]# hammer virt-who-config list | grep ahv
14 | ui_ahv_central | every 2 hours | No Report Yet |                    
[root@dell-per740-68-vm-07 ~]# hammer virt-who-config info --id 14
General information: 
    Id:                  14
    Name:                ui_ahv_central
    Hypervisor type:     ahv
    Hypervisor server:   10.73.3.134
    Hypervisor username: admin
    AHV Prism flavor:    central
    Enable AHV debug:    yes
    Status:              No Report Yet
Schedule:            
    Interval:       every 2 hours
    Last Report At:
Connection:          
    Satellite server:     dell-per740-68-vm-07.lab.eng.pek2.redhat.com
    Hypervisor ID:        hostname
    Filtering:            Unlimited
    Filter host parents:  
    Exclude host parents: 
    Debug mode:           yes
    Ignore proxy:
HTTP Proxy:


2. Update the virt-who config option by cli
[root@dell-per740-68-vm-07 ~]# hammer virt-who-config update --interval 240 --id 14
Could not create the Virt Who configuration:
  Internal Server Error: the server was unable to finish the request. This may be caused by unavailability of some required service, incorrect API call or a server-side bug. There may be more information in the server's logs.

3. Check Edit virt-who config by web UI
change the name for virt-who config and submit.
Error display:
"Oops, we're sorry but something went wrong undefined method `update_attributes' for #<ForemanVirtWhoConfigure::Config:0x000055a2fded58c8> Did you mean? update_attribute audited_attributes
If you feel this is an error with Satellite itself, please open a new issue with Satellite ticketing system, Please include in your report the full error log that can be acquired by running: foreman-rake errors:fetch_log request_id=bfb65a4c and it is highly recommended to also attach the sosreport output."
Please reference the pic
Edit_virtwhoconfig.jpg

4. check modify virt-who config by api
[root@dell-per740-68-vm-07 ~]# curl --insecure -H "accept:application/json,version=2" -H "content-type:application/json" -X PUT -d '{"foreman_virt_who_configure_config": {"name": "ui_ahv_central", "hypervisor_server": "10.73.3.134", "satellite_url": "dell-per740-68-vm-07.lab.eng.pek2.redhat.com", "hypervisor_type": "ahv", "hypervisor_username": "admin", "hypervisor_id": "hostname", "hypervisor_password": "XXXX", "debug":"true", "filtering_mode": 0, "interval": 120, "organization_id": 1}}' -k -u admin:admin https://dell-per740-68-vm-07.lab.eng.pek2.redhat.com/foreman_virt_who_configure/api/v2/configs/14
{
  "error": {"message":"Internal Server Error: the server was unable to finish the request. This may be caused by unavailability of some required service, incorrect API call or a server-side bug. There may be more information in the server's logs."}
}
[root@dell-per740-68-vm-07 ~]# 


Actual results:
virt-who config update option should work well for ui/api/cli

Expected results:
virt-who config update option failed

Additional info:

Comment 2 Brad Buckingham 2023-02-02 15:29:37 UTC
Is this a regression from 6.12?  Thanks!

Comment 4 Lucy Fu 2023-02-07 00:49:33 UTC
Created redmine issue https://projects.theforeman.org/issues/36048 from this bug

Comment 5 Bryan Kearney 2023-02-07 16:03:29 UTC
Upstream bug assigned to lufu

Comment 6 Bryan Kearney 2023-02-07 16:03:31 UTC
Upstream bug assigned to lufu

Comment 7 Bryan Kearney 2023-02-08 20:03:42 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/36048 has been resolved.

Comment 9 yanpliu 2023-03-28 07:03:02 UTC
Verification on Satellite6.13 snapshot 16.0

Comment 12 errata-xmlrpc 2023-05-03 13:24:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.13 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:2097


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