Merge ~raharper/curtin:fix/lvm-iscsi-dname-checks into curtin:master

Proposed by Ryan Harper
Status: Merged
Approved by: Scott Moser
Approved revision: 4f6e9e9d203669a9921e9622f0c2f43fefb10dab
Merge reported by: Scott Moser
Merged at revision: 95813f2e900512733d8c99d561bf17d1c98a79dc
Proposed branch: ~raharper/curtin:fix/lvm-iscsi-dname-checks
Merge into: curtin:master
Diff against target: 35 lines (+8/-2)
2 files modified
tests/vmtests/__init__.py (+3/-0)
tests/vmtests/test_lvm_iscsi.py (+5/-2)
Reviewer Review Type Date Requested Status
Scott Moser (community) Approve
Server Team CI bot continuous-integration Approve
Review via email: mp+343769@code.launchpad.net

Commit message

vmtests: adjust lvm_iscsi dnames to match configuration

Previous to dname/bcache changes, we failed to check the correct dname
symlinks.

In test_lvm.py we included a test_dname override to prevent checking dname
on trusty but it failed to call the parent class if we weren't skipping.

Commit 12d7163cea8, make_dname, replaced all of the per-subclass checks
for trusty and added the SkipTest to the base class implementation which
then showed the error.

This change adjusts the dnames to match what's actually generated.

To post a comment you must log in.
Revision history for this message
Ryan Harper (raharper) wrote :
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ryan Harper (raharper) wrote :

Previous to dname/bcache changes, we failed to check the correct dname symlinks.

In test_lvm.py we included a test_dname override to prevent checking dname
on trusty but it failed to call the parent class if we weren't skipping.

Commit 12d7163cea870b7e76f36249ffc5eab7a29c5582, make_dname, replaced all of the
per-subclass checks for trusty and added the SkipTest to the base class
implementation which then showed the error.

This patch adjusts the dnames to match what's actually generated.

4f6e9e9... by Ryan Harper

Add debug logging to test_dname base class

Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Scott Moser (smoser) :
review: Approve
Revision history for this message
Scott Moser (smoser) wrote :

An upstream commit landed for this bug.

To view that commit see the following URL:
https://git.launchpad.net/curtin/commit/?id=95813f2e

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tests/vmtests/__init__.py b/tests/vmtests/__init__.py
2index e89c44e..9dd1a51 100644
3--- a/tests/vmtests/__init__.py
4+++ b/tests/vmtests/__init__.py
5@@ -1289,9 +1289,12 @@ class VMBaseClass(TestCase):
6 if not disk_to_check:
7 disk_to_check = self.disk_to_check
8 if disk_to_check is None:
9+ logger.debug('test_dname: no disks to check')
10 return
11+ logger.debug('test_dname: checking disks: %s', disk_to_check)
12 path = self.collect_path("ls_dname")
13 if not os.path.exists(path):
14+ logger.debug('test_dname: no "ls_dname" file: %s', path)
15 return
16 contents = util.load_file(path)
17 for diskname, part in self.disk_to_check:
18diff --git a/tests/vmtests/test_lvm_iscsi.py b/tests/vmtests/test_lvm_iscsi.py
19index 6b247c5..e94fae3 100644
20--- a/tests/vmtests/test_lvm_iscsi.py
21+++ b/tests/vmtests/test_lvm_iscsi.py
22@@ -29,8 +29,11 @@ class TestLvmIscsiAbs(TestLvmAbs, TestBasicIscsiAbs):
23 'UUID=a98f706b-b064-4682-8eb2-6c2c1284060c': '/mnt/iscsi4',
24 }
25 disk_to_check = [('main_disk', 1),
26- ('main_disk', 5),
27- ('main_disk', 6),
28+ ('main_disk', 2),
29+ ('iscsi_disk1', 5),
30+ ('iscsi_disk1', 6),
31+ ('iscsi_disk2', 5),
32+ ('iscsi_disk2', 6),
33 ('vg1-lv1', 0),
34 ('vg1-lv2', 0),
35 ('vg2-lv3', 0),

Subscribers

People subscribed via source and target branches