diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2024-05-09 20:00:56 +0100 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2024-05-09 20:00:56 +0100 |
commit | 85f7d92d832c04e58fab3b57eb254f77543457e7 (patch) | |
tree | 67d2e9d99615be682f938ddf7d625530a1978931 | |
parent | d1dc39263d8d983e8594193362ace59c8d79f0f6 (diff) | |
download | consfigurator-85f7d92d832c04e58fab3b57eb254f77543457e7.tar.gz |
DISK::CREATE-VOLUME: additionally execute 'sgdisk --clear'
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-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. |