curtin-dev team mailing list archive
-
curtin-dev team
-
Mailing list archive
-
Message #02481
[Merge] ~dbungert/curtin:lp-1987236-chzdev into curtin:master
Dan Bungert has proposed merging ~dbungert/curtin:lp-1987236-chzdev into curtin:master.
Commit message:
curthooks: make chzdev_export non-fatal on error
LP: #1987236
Requested reviews:
curtin developers (curtin-dev)
Related bugs:
Bug #1987236 in subiquity: "Installer crash in s390x environments w/o OSA network adapters"
https://bugs.launchpad.net/subiquity/+bug/1987236
For more details, see:
https://code.launchpad.net/~dbungert/curtin/+git/curtin/+merge/428926
--
Your team curtin developers is requested to review the proposed merge of ~dbungert/curtin:lp-1987236-chzdev into curtin:master.
diff --git a/curtin/commands/curthooks.py b/curtin/commands/curthooks.py
index 141eb76..69c186b 100644
--- a/curtin/commands/curthooks.py
+++ b/curtin/commands/curthooks.py
@@ -219,6 +219,9 @@ def chzdev_persist_active_online(cfg, target):
LOG.info('Persisting zdevice configuration in target')
target_etc = paths.target_path(target, 'etc')
(chzdev_conf, _) = chzdev_export(active=True, online=True)
+ if chzdev_conf is None:
+ LOG.info('z specific devices not found')
+ return
chzdev_persistent = chzdev_prepare_for_import(chzdev_conf)
chzdev_import(data=chzdev_persistent,
persistent=True, noroot=True, base={'/etc': target_etc})
@@ -240,7 +243,10 @@ def chzdev_export(active=True, online=True, persistent=False,
cmd.extend(['--persistent'])
cmd.extend(['--export', export_file])
- return util.subp(cmd, capture=True)
+ try:
+ return util.subp(cmd, capture=True)
+ except util.ProcessExecutionError:
+ return (None, None)
def chzdev_import(data=None, persistent=True, noroot=True, base=None,
References