Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1824195

Summary: Exception thrawn logging a message, but not preventing the installation to continue
Product: Red Hat Enterprise Linux 8 Reporter: Renaud Métrich <rmetrich>
Component: python-blivetAssignee: Vojtech Trefny <vtrefny>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.1CC: jstodola, pzatko, vtrefny
Target Milestone: rcKeywords: Triaged
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python-blivet-3.2.2-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 03:22:25 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:

Description Renaud Métrich 2020-04-15 14:14:04 UTC
Description of problem:

There is a typo in the string construction in blivet/devicelibs/edd.py at line 222:

-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
221         if any([self.fibre_wwid, self.fibre_lun]):
222             s += "%(nl)s%(t)sfibre wwid: %(fibre_wwid)s lun: %s(fibre_lun)s"
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Fix (no "%s", but "%"):
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
221         if any([self.fibre_wwid, self.fibre_lun]):
222             s += "%(nl)s%(t)sfibre wwid: %(fibre_wwid)s lun: %(fibre_lun)s"
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

This makes installation on FC disks fail with the following exception:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
Traceback (most recent call last):
  File "/usr/lib64/python3.6/logging/__init__.py", line 994, in emit
    msg = self.format(record)
  File "/usr/lib64/python3.6/logging/__init__.py", line 840, in format
    return fmt.format(record)
  File "/usr/lib64/python3.6/logging/__init__.py", line 577, in format
    record.message = record.getMessage()
  File "/usr/lib64/python3.6/logging/__init__.py", line 338, in getMessage
    msg = msg % self.args
  File "/usr/lib/python3.6/site-packages/blivet/devicelibs/edd.py", line 268, in __repr__
    return "<EddEntry%s>" % (self._fmt(' ', ''),)
  File "/usr/lib/python3.6/site-packages/blivet/devicelibs/edd.py", line 232, in _fmt
    return s % d
TypeError: not enough arguments for format string
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------


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

anaconda 29.19.1.13-1.el8 (RHEL 8.1.0 DVD)


How reproducible:

Always on customer system

Steps to Reproduce:

1. Execute python3 interpreter

$ python3
>>> s = "%(nl)s%(t)s fibre wwid: %(fibre_wwid)s lun: %s(fibre_lun)s"
>>> d = {'t': '\t',
    'sysfspath': 'SYSFSPATH',
    'version': 'VERSION',
    'nl': '\n',
    'mbr_sig': 'MBR_SIG',
    'sectors': 'SECTORS',
    'type': 'TYPE',
    'sysfslink': 'SYSFSLINK',
    'host_bus': 'HOST_BUS',
    'pci_dev': 'PCI_DEV',
    'channel': 'CHANNEL',
    'interface': 'INTERFACE',
    'atapi_device': 'ATAPI_DEVICE',
    'atapi_lun': 'ATAPI_LUN',
    'ata_device': 'ATA_DEVICE',
    'ata_pmp': 'ATA_PMP',
    'scsi_id': 'SCSI_ID',
    'scsi_lun': 'SCSI_LUN',
    'usb_serial': 'USB_SERIAL',
    'ieee1394_eui64': 'IEEE1394_EUI64',
    'fibre_wwid': 'FIBRE_WWID',
    'fibre_lun' : 'FIBRE_LUN',
    'i2o_identity': 'I2O_IDENTITY',
    'sas_address': 'SAS_ADDRESS',
    'sas_lun': 'SAS_LUN'
}
>>> s % d

Actual results:

>>> s % d
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: not enough arguments for format string


Expected results:

No exception

Comment 1 Renaud Métrich 2020-04-15 14:15:40 UTC
I'm also requesting a hotfix as an update image to provide to customers falling into this.
I will create a KCS asap.

Comment 2 Vojtech Trefny 2020-04-15 14:40:20 UTC
Thank you for investigating this and the fix.

upstream PR: https://github.com/storaged-project/blivet/pull/835

updates image: https://vtrefny.fedorapeople.org/img/rhbz1824195.img

Comment 3 Renaud Métrich 2020-04-16 07:07:36 UTC
I am lowering the Severity/Priority because this exception doesn't prevent from installing, sorry for the noise.

Comment 10 errata-xmlrpc 2020-11-04 03:22:25 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 (python-blivet bug fix and enhancement update), 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/RHBA-2020:4728