diff options
-rw-r--r-- | doc/news.rst | 7 | ||||
-rw-r--r-- | src/property/disk.lisp | 8 |
2 files changed, 14 insertions, 1 deletions
diff --git a/doc/news.rst b/doc/news.rst index 80e00c1..62287e6 100644 --- a/doc/news.rst +++ b/doc/news.rst @@ -23,6 +23,13 @@ In summary, you should always be able to upgrade to a release which only increments ``patch``, but if either of the other two components have changed, you should review this document and see if your consfig needs updating. +1.4.1 (unreleased) +------------------ + +- DISK::CREATE-VOLUME for DISK:PARTITIONED-VOLUME now executes + ``sgdisk --clear`` before ``sgdisk --zap-all`` to avoid certain failures to + clear out the block device. + 1.4.0 (2024-05-09) ------------------ diff --git a/src/property/disk.lisp b/src/property/disk.lisp index e1b307c..4383b91 100644 --- a/src/property/disk.lisp +++ b/src/property/disk.lisp @@ -1,6 +1,6 @@ ;;; Consfigurator -- Lisp declarative configuration management system -;;; Copyright (C) 2021-2022 Sean Whitton <spwhitton@spwhitton.name> +;;; Copyright (C) 2021-2024 Sean Whitton <spwhitton@spwhitton.name> ;;; This file is free software; you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by @@ -364,7 +364,13 @@ The default value of 0 means the next free sector.") (defmethod create-volume ((volume partitioned-volume) (file pathname)) (with-slots (volume-contents) volume + ;; See https://bugs.launchpad.net/ironic-python-agent/+bug/1737556. + ;; We don't take sgdisk upstream's suggestion there to ignore the exit + ;; code of --zap-all because we do want to assert somehow that a + ;; successful zeroing-out of any old partition tables has occurred. + (mrun :may-fail "sgdisk" "--clear" file) (mrun :inform "sgdisk" "--zap-all" file) + (mrun :inform "sgdisk" ;; Turn off partition alignment when specific start sectors have ;; been specified, so that we can be sure they will be respected. |