Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1630884

Summary: [Beaker 25.6][beaker-system-scan] (DataError) (1406, "Data too long for column \'fw_version\' at row 1")
Product: [Retired] Beaker Reporter: PaulB <pbunyan>
Component: inventoryAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: abenoit, apowers, dcallagh, gbaker, pbunyan, rihogan, rpotts, sdoherty
Target Milestone: 26.0Keywords: Patch
Target Release: ---   
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: 2018-10-08 02:16:48 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:

Comment 4 sdoherty 2018-09-21 14:51:55 UTC
Hi PaulB.  I can comment on this one. 
That column 'fw_version' is set to a limit of 32 characters. 

beaker/Server/bkr/server/model/inventory.py
2526  fw_version = Column(Unicode(32))

Verify by running lshw on the system in question and checking that the version info under the firmware node is longer than 32 characters.   

Thanks
Shawn.

Comment 5 PaulB 2018-09-21 15:07:44 UTC
(In reply to sdoherty from comment #4)
> Hi PaulB.  I can comment on this one. 
> That column 'fw_version' is set to a limit of 32 characters. 
> 
> beaker/Server/bkr/server/model/inventory.py
> 2526  fw_version = Column(Unicode(32))
> 
> Verify by running lshw on the system in question and checking that the
> version info under the firmware node is longer than 32 characters.   
> 
> Thanks
> Shawn.

All,
lshw is showing this:
---<-snip->---
 *-firmware
          description: BIOS
          vendor: Huawei Corp.
          physical id: 1
          version: Hisilicon D06 UEFI RC0 - B051 (V0.51)
          date: 08/28/2018
          size: 516KiB
          capacity: 4MiB
          capabilities: pci upgrade shadowing cdboot bootselect edd int13floppynec int13floppytoshiba int13floppy360 int13floppy1200 int13floppy720 int13floppy2880 int9keyboard int10video acpi usb biosbootspecification uefi
---<-snip->---


The line is question is:
 version: Hisilicon D06 UEFI RC0 - B051 (V0.51)

 Hisilicon D06 UEFI RC0 - B051 (V0.51) is 37 characters


Best,
-pbunyan

Comment 6 sdoherty 2018-09-21 15:44:32 UTC
(In reply to PaulB from comment #5)

> 
> The line is question is:
>  version: Hisilicon D06 UEFI RC0 - B051 (V0.51)
> 
>  Hisilicon D06 UEFI RC0 - B051 (V0.51) is 37 characters
> 
> 
> Best,
> -pbunyan

Sadly, I think this is the issue, I cannot think of a way around this other than expanding that column. Which is kind of a shame that Huawei seems to be the only vendor that is naming version info in that way.

Comment 7 Dan Callaghan 2018-09-24 03:38:31 UTC
Yeah unfortunately that field is free text in SMBIOS and it seems the vendors are not consistent at all in what they put in there.

In theory we could make Beaker (or rather lshw) manipulate the strings to try and make them more consistent or sensible... but it's probably not a road we want to go down. Better for Beaker to just record exactly whatever string appears in SMBIOS to make it easier to search for later.

In the SMBIOS spec this field is "BIOS Version" (offset 5 in the type 0 block) which is a variable-length string, so the length is effectively unlimited apart from the overall SMBIOS block limit of 64KB.

I think we originally picked 32 characters more or less arbitrarily, because it seemed unlikely there would be any version strings longer than that. We could expand it to be... some larger size.

Since that field participates in the table's unique constraint, the largest we can make it is VARCHAR(241) due to MySQL's limit of 3072 bytes for composite indexes. That should be plenty big enough. (Although, now that I think about it, that field doesn't really belong in the unique constraint... but that's an issue for a separate bug I guess.)

Comment 8 Dan Callaghan 2018-09-24 03:57:21 UTC
https://gerrit.beaker-project.org/#/c/beaker/+/6299

Comment 9 Dan Callaghan 2018-10-08 02:16:48 UTC
Beaker 26.0 has been released.