Merge ~ogayot/curtin:wwn-match-with-extension into curtin:master
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Dan Bungert | ||||
Approved revision: | d4f445a3418af09f966c791461c55d94bd2ff668 | ||||
Merge reported by: | Server Team CI bot | ||||
Merged at revision: | not available | ||||
Proposed branch: | ~ogayot/curtin:wwn-match-with-extension | ||||
Merge into: | curtin:master | ||||
Diff against target: |
42 lines (+19/-1) 2 files modified
curtin/commands/block_meta.py (+2/-1) tests/unittests/test_commands_block_meta.py (+17/-0) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Dan Bungert | Approve | ||
Server Team CI bot | continuous-integration | Approve | |
Review via email: mp+440232@code.launchpad.net |
Commit message
block-meta: fix failed disk lookup when WWN includes extension
curtin's storage config extracts the WWN of a disk from one of the
following udev variables:
* ID_WWN_
* ID_WWN
However, when trying to look the disk up later in the block-meta code,
curtin only tries to match the WWN value against the ID_WWN variable
(and another variable related to DM multipath).
This means that the disk can not be be found just based on the wwn if
the ID_WWN and ID_WWN_
value.
In the past, that was often okay because other fields (such as disk path
or serial) would still make the disk lookup succeed.
However, the following patch introduced a restriction. In v2, all fields
specified must now match for the disk lookup to be successful:
8c5f87ed block_meta: all fields on a disk action must match with v2 config
Fixed by matching against the ID_WWN_
ID_WWN.
Description of the change
We got multiple reports of failed installs where curtin logs show the following pattern:
found candidate disks [set(), {'/dev/sda'}, {'/dev/sda'}]
An error occured handling 'disk-sda': ValueError - Failed to find storage volume id='disk-sda' config: {'ptable': 'gpt', 'serial': '12121212121212
When trying to look up the disk, the value of the wwn field (i.e., 0x123456789abcd
However, the wwn variable is not always initialized from the ID_WWN variable. If present, the ID_WWN_
source_keys = {
}
Example
-------
"ID_WWN": '0x123456789abc
"ID_WWN_
"ID_WWN_
Since present, the wwn variable gets initialized from ID_WWN_
Later on, we compare the wwn variable with ID_WWN and the lookup fails.
Fixed by making sure to compare the wwn value with the ID_WWN_
PASSED: Continuous integration, rev:e8e59df25c9 b193362576346a6 275a6b1b91cef2 /jenkins. canonical. com/server- team/job/ curtin- ci/90/ /jenkins. canonical. com/server- team/job/ curtin- ci/nodes= metal-amd64/ 90/ /jenkins. canonical. com/server- team/job/ curtin- ci/nodes= metal-arm64/ 90/ /jenkins. canonical. com/server- team/job/ curtin- ci/nodes= metal-ppc64el/ 90/ /jenkins. canonical. com/server- team/job/ curtin- ci/nodes= metal-s390x/ 90/
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild: /jenkins. canonical. com/server- team/job/ curtin- ci/90// rebuild
https:/