fstab entry changes breaks bcache/raid/lvm scenarios

Bug #1862971 reported by Ryan Harper on 2020-02-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin
Undecided
Unassigned

Bug Description

Commit 941c43ffff233e55f8338991f2eeaa9932db91d8 refactored how curtin creates fstab entries.

This change broke/exposed some issues that prevents boot after installation and broken dname symlinks.

Ryan Harper (raharper) wrote :

- Handle raid partition lsblk type variance (md or part)

Some verions of lsblk will return TYPE=md or TYPE=part for partitions on top of raid devices.
This means that sometimes /etc/fstab will contain /dev/md0p1 and others the /dev/disk/by-id/md-uuid* value. The dname rule to match the device broke.

- Handle lvm DM_NAME escaping by querying udev

If the LVM logical volume name included a '-' in the name, curtin did not escape this value correctly and the dname symlink referring to the target block device would not show up.

Ryan Harper (raharper) wrote :
Download full text (4.2 KiB)

FAIL: test_fstab (vmtests.test_mdadm_bcache.XenialGATestMirrorbootPartitions)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/jenkins/servers/server/workspace/curtin-vmtest-proposed-b/curtin-19.3-17-g50ffca46/tests/vmtests/__init__.py", line 379, in test_wrapper
    return func(self, *args, **kwargs)
  File "/var/lib/jenkins/servers/server/workspace/curtin-vmtest-proposed-b/curtin-19.3-17-g50ffca46/tests/vmtests/__init__.py", line 1625, in test_fstab
    self.assertEqual(sorted(expected), sorted(found))
AssertionError: Lists differ: [('/dev/disk/by-id/md-uuid-b4bf4c32:21740c[35 chars]ts')] != []

First list contains 1 additional elements.
First extra element 0:
('/dev/disk/by-id/md-uuid-b4bf4c32:21740c60:4b249a78:903a5f08', '/', 'defaults')

+ []
- [('/dev/disk/by-id/md-uuid-b4bf4c32:21740c60:4b249a78:903a5f08',
- '/',
- 'defaults')]

FAIL: test_fstab (vmtests.test_lvm_raid.EoanTestLvmOverRaid)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/jenkins/servers/server/workspace/curtin-vmtest-proposed-b/curtin-19.3-17-g50ffca46/tests/vmtests/__init__.py", line 379, in test_wrapper
    return func(self, *args, **kwargs)
  File "/var/lib/jenkins/servers/server/workspace/curtin-vmtest-proposed-b/curtin-19.3-17-g50ffca46/tests/vmtests/__init__.py", line 1606, in test_fstab
    expected = self.get_fstab_expected()
  File "/var/lib/jenkins/servers/server/workspace/curtin-vmtest-proposed-b/curtin-19.3-17-g50ffca46/tests/vmtests/test_lvm.py", line 50, in get_fstab_expected
    data_kname = self._dname_to_kname('vg1-lv1')
  File "/var/lib/jenkins/servers/server/workspace/curtin-vmtest-proposed-b/curtin-19.3-17-g50ffca46/tests/vmtests/__init__.py", line 1691, in _dname_to_kname
    self.assertEqual(len(kname), 1)
AssertionError: 0 != 1

FAIL: test_fstab (vmtests.test_lvm_iscsi.BionicTestIscsiLvm)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/jenkins/servers/server/workspace/curtin-vmtest-proposed-b/curtin-19.3-17-g50ffca46/tests/vmtests/__init__.py", line 379, in test_wrapper
    return func(self, *args, **kwargs)
  File "/var/lib/jenkins/servers/server/workspace...

Read more...

Ryan Harper (raharper) wrote :
Changed in curtin:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers