curtin-dev team mailing list archive
-
curtin-dev team
-
Mailing list archive
-
Message #01536
[Merge] ~dbungert/curtin:lp-1925722-v2 into curtin:master
Dan Bungert has proposed merging ~dbungert/curtin:lp-1925722-v2 into curtin:master.
Commit message:
Fix for grub_device based detection of target
* grub_device means we mean to image THAT device, so we shouldn't keep
the entire list of devices as plausible image targets.
(Thanks to Ryan Harper and Lee Trager for good discussions and fix
proposals)
Requested reviews:
Ryan Harper (raharper)
For more details, see:
https://code.launchpad.net/~dbungert/curtin/+git/curtin/+merge/401825
--
Your team curtin developers is subscribed to branch curtin:master.
diff --git a/curtin/commands/block_meta.py b/curtin/commands/block_meta.py
index c027cbf..52342ff 100644
--- a/curtin/commands/block_meta.py
+++ b/curtin/commands/block_meta.py
@@ -1989,10 +1989,13 @@ def meta_simple(args):
serial = i.get("serial")
if serial is None:
continue
- grub = i.get("grub_device")
- diskPath = block.lookup_disk(serial)
- if grub is True:
+ try:
+ diskPath = block.lookup_disk(serial)
+ except ValueError:
+ continue
+ if i.get("grub_device"):
devpath = diskPath
+ break
devices = args.devices
bootpt = get_bootpt_cfg(
@@ -2030,10 +2033,10 @@ def meta_simple(args):
LOG.warn("No non-removable, installable devices found. List "
"populated with removable devices allowed: %s",
devices)
- elif len(devices) == 0 and devpath:
- devices = [devpath]
- if len(devices) > 1:
+ if devpath is not None:
+ target = devpath
+ elif len(devices) > 1:
if args.devices is not None:
LOG.warn("'%s' mode but multiple devices given. "
"using first found", args.mode)
Follow ups
-
[Merge] ~dbungert/curtin:lp-1925722-v2 into curtin:master
From: Server Team CI bot, 2021-04-30
-
Re: [Merge] ~dbungert/curtin:lp-1925722-v2 into curtin:master
From: Server Team CI bot, 2021-04-30
-
Re: [Merge] ~dbungert/curtin:lp-1925722-v2 into curtin:master
From: Server Team CI bot, 2021-04-30
-
Re: [Merge] ~dbungert/curtin:lp-1925722-v2 into curtin:master
From: Server Team CI bot, 2021-04-30
-
Re: [Merge] ~dbungert/curtin:lp-1925722-v2 into curtin:master
From: Server Team CI bot, 2021-04-30
-
[Merge] ~dbungert/curtin:lp-1925722-v2 into curtin:master
From: Michael Hudson-Doyle, 2021-04-30
-
Re: [Merge] ~dbungert/curtin:lp-1925722-v2 into curtin:master
From: Server Team CI bot, 2021-04-29
-
Re: [Merge] ~dbungert/curtin:lp-1925722-v2 into curtin:master
From: Michael Hudson-Doyle, 2021-04-29
-
Re: [Merge] ~dbungert/curtin:lp-1925722-v2 into curtin:master
From: Server Team CI bot, 2021-04-27
-
Re: [Merge] ~dbungert/curtin:lp-1925722-v2 into curtin:master
From: Server Team CI bot, 2021-04-27
-
Re: [Merge] ~dbungert/curtin:lp-1925722-v2 into curtin:master
From: Server Team CI bot, 2021-04-27
-
Re: [Merge] ~dbungert/curtin:lp-1925722-v2 into curtin:master
From: Ryan Harper, 2021-04-26
-
Re: [Merge] ~dbungert/curtin:lp-1925722-v2 into curtin:master
From: Ryan Harper, 2021-04-26
-
Re: [Merge] ~dbungert/curtin:lp-1925722-v2 into curtin:master
From: Dan Bungert, 2021-04-26
-
[Merge] ~dbungert/curtin:lp-1925722-v2 into curtin:master
From: Ryan Harper, 2021-04-26
-
Re: [Merge] ~dbungert/curtin:lp-1925722-v2 into curtin:master
From: Server Team CI bot, 2021-04-26