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 1188533 - ValueError: incomplete format - 'Unable to send host/guest assocaition to the satellite: % " % str(e)'
Summary: ValueError: incomplete format - 'Unable to send host/guest assocaition to the...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-who
Version: 7.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Radek Novacek
QA Contact: Li Bin Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-03 07:15 UTC by Jan Hutař
Modified: 2016-12-01 00:33 UTC (History)
5 users (show)

Fixed In Version: virt-who-0.14-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 11:55:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2370 0 normal SHIPPED_LIVE virt-who bug fix and enhancement update 2015-11-19 10:39:27 UTC

Description Jan Hutař 2015-02-03 07:15:20 UTC
Description of problem:
Looks like there is some syntax error in virt-who:

# python
Python 2.7.5 (default, Feb 11 2014, 07:46:25) 
[GCC 4.8.2 20140120 (Red Hat 4.8.2-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> a=1
>>> print "Ahoj %" % str(a)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: incomplete format


Version-Release number of selected component (if applicable):
python-2.7.5-16.el7.x86_64
virt-who-0.11-5.el7.noarch


How reproducible:
always


Steps to Reproduce:
1. Have Satellite 5.7.0
2. Have libvirtd host with some guests
3. # virt-who --one-shot --libvirt --satellite --satellite-server=<satellite_fqdn> --satellite-username=<satellite_user> --satellite-password=<satellite_pass> --libvirt-server=qemu:// -d


Actual results:
[...]
ERROR: Error in communication with subscription manager, trying to recover:
Traceback (most recent call last):
  File "/usr/share/virt-who/virtwho.py", line 126, in _send
    self._sendGuests(virt, virtualGuests)
  File "/usr/share/virt-who/virtwho.py", line 154, in _sendGuests
    result = manager.hypervisorCheckIn(virt.config, virtualGuests, virt.config.type)
  File "/usr/share/virt-who/manager/satellite/satellite.py", line 163, in hypervisorCheckIn
    raise SatelliteError("Unable to send host/guest assocaition to the satellite: % " % str(e))
ValueError: incomplete format
[...]


Expected results:
Should not produce traceback


Additional info:
If I have been grepping correctly, this is the only place where this king of syntax appears.

Comment 1 Jan Hutař 2015-02-03 07:18:26 UTC
This is tied with bug 1188529 (happens in same run of virt-who), but I consider it / have reported it as a separate issue.

Comment 3 Radek Novacek 2015-02-03 07:33:02 UTC
This bug is already fixed upstream. The fix will be part of next version.

Comment 4 Radek Novacek 2015-06-23 13:33:06 UTC
Fixed in virt-who-0.14-1.el7.

Comment 6 Liushihui 2015-07-21 05:22:22 UTC
Verify it on virt-who-0.14-1.el7.noarch as virt-who won't show error of "ValueError: incomplete format", Therefore, verify it.

Verified version:
virt-who-0.14-1.el7.noarch
subscription-manager-1.15.5-1.el7.x86_64
python-rhsm-1.15.3-1.el7.x86_64

Verified process:
1.Register system to satellite5.7
2.Have libvirtd host with some guests
3.Run virt-who with command line.
[root@hp-z220-05 product-default]# virt-who -d -o --satellite6 --satellite-server=satellite57.July20.redhat.com --satellite-username=admin --satellite-password=redhat  --libvirt --libvirt-server=qemu://
2015-07-21 13:14:18,393 INFO: Using configuration "env/cmdline" ("libvirt" mode)
2015-07-21 13:14:18,425 INFO: Libvirt path is not specified in the url, using /system
2015-07-21 13:14:18,426 INFO: Using libvirt url: qemu:///system?no_tty=1
2015-07-21 13:14:18,432 DEBUG: Virtual machine found: 6.5_Server_x86_64: 0d6a7081-5175-4fd5-98ae-1ddb9c7a9c65
2015-07-21 13:14:18,432 DEBUG: Virtual machine found: 5.10_Server_x86_64: 2bd4e7d9-ebfc-43e9-8b51-a1f43e84ca8b
2015-07-21 13:14:18,432 DEBUG: Libvirt domains found: ['0d6a7081-5175-4fd5-98ae-1ddb9c7a9c65', '2bd4e7d9-ebfc-43e9-8b51-a1f43e84ca8b']
2015-07-21 13:14:18,449 INFO: Sending update in hosts-to-guests mapping: {
    "003ac27c-ed28-e211-8973-10604b5b2b19": [
        {
            "attributes": {
                "active": 0, 
                "hypervisorType": "QEMU", 
                "virtWhoType": "libvirt"
            }, 
            "guestId": "0d6a7081-5175-4fd5-98ae-1ddb9c7a9c65", 
            "state": 5
        }, 
        {
            "attributes": {
                "active": 0, 
                "hypervisorType": "QEMU", 
                "virtWhoType": "libvirt"
            }, 
            "guestId": "2bd4e7d9-ebfc-43e9-8b51-a1f43e84ca8b", 
            "state": 5
        }
    ]
}
2015-07-21 13:14:18,449 DEBUG: Authenticating with certificate: /etc/pki/consumer/cert.pem

Result: virt-who can send host/guest mapping to satellite, it hasn't show error info as bug's description.

Comment 7 Liushihui 2015-07-21 06:15:21 UTC
Please ignore commend6 as command error.

Verify it on virt-who-0.14-1.el7.noarch as virt-who won't show error of "ValueError: incomplete format", Therefore, verify it.

Verified version:
virt-who-0.14-1.el7.noarch
subscription-manager-1.15.5-1.el7.x86_64
python-rhsm-1.15.3-1.el7.x86_64

Verified process:
1.Register system to satellite5.7
2.Have libvirtd host with some guests
3.Run virt-who with command line.
[root@hp-z220-05 product-default]# virt-who -d -o --satellite --satellite-server=satellite57.July20.redhat.com --satellite-username=admin --satellite-password=redhat  --libvirt --libvirt-server=qemu://
2015-07-21 14:13:14,864 [INFO]  @virtwho.py:572 - Using configuration "env/cmdline" ("libvirt" mode)
2015-07-21 14:13:14,877 [DEBUG]  @virtwho.py:152 - Starting infinite loop with 3600 seconds interval
2015-07-21 14:13:14,909 [INFO]  @libvirtd.py:115 - Libvirt path is not specified in the url, using /system
2015-07-21 14:13:14,909 [INFO]  @libvirtd.py:136 - Using libvirt url: qemu:///system?no_tty=1
2015-07-21 14:13:14,916 [DEBUG]  @libvirtd.py:215 - Virtual machine found: 6.5_Server_x86_64: 0d6a7081-5175-4fd5-98ae-1ddb9c7a9c65
2015-07-21 14:13:14,917 [DEBUG]  @libvirtd.py:215 - Virtual machine found: 5.10_Server_x86_64: 2bd4e7d9-ebfc-43e9-8b51-a1f43e84ca8b
2015-07-21 14:13:14,917 [DEBUG]  @libvirtd.py:219 - Libvirt domains found: ['0d6a7081-5175-4fd5-98ae-1ddb9c7a9c65', '2bd4e7d9-ebfc-43e9-8b51-a1f43e84ca8b']
2015-07-21 14:13:14,931 [DEBUG]  @satellite.py:72 - Initializing satellite connection to https://satellite57.July20.redhat.com/XMLRPC
2015-07-21 14:13:14,932 [INFO]  @satellite.py:78 - Initialized satellite connection
2015-07-21 14:13:14,932 [INFO]  @satellite.py:155 - Sending update in hosts-to-guests mapping: {'003ac27c-ed28-e211-8973-10604b5b2b19': [<virt.libvirtd.libvirtd.LibvirtdGuest object at 0x27a9550>, <virt.libvirtd.libvirtd.LibvirtdGuest object at 0x27a9590>]}


Result: It hasn't show error message as bug's description.

Comment 8 errata-xmlrpc 2015-11-19 11:55:59 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, 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://rhn.redhat.com/errata/RHBA-2015-2370.html


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