[supermin PATCH 0/4] Check for output results for --if-newer (RHBZ#1813809)
by Pino Toscano
This is an attempt to make supermin check for the existing results of an
output when checking whether the appliance must be rebuilt using
--if-newer.
At the moment it is implemented only for the build mode, and for its
ext2 output format.
Pino Toscano (4):
build: factor ext2 filenames
Tighten Unix_error check for missing outputdir
Extend modes with list of outputs
build: set kernel/initrd/root as outputs (RHBZ#1813809)
src/mode_build.ml | 22 ++++++++++++--
src/mode_build.mli | 4 +++
src/mode_prepare.ml | 9 +++++-
src/mode_prepare.mli | 4 +++
src/supermin.ml | 11 +++++--
tests/Makefile.am | 3 +-
tests/test-if-newer-ext2.sh | 57 +++++++++++++++++++++++++++++++++++++
7 files changed, 102 insertions(+), 8 deletions(-)
create mode 100755 tests/test-if-newer-ext2.sh
--
2.25.1
4 years, 8 months
[supermin PATCH] tests: different dirs for formats in test-build-bash.sh
by Pino Toscano
Use different directories for the output formats, otherwise any supermin
--build call after the first will fail to rename the temporary directory
to the designated output directory (as it exists already).
Also make sure that we can remove all the files in the chroot output.
---
tests/test-build-bash.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/test-build-bash.sh b/tests/test-build-bash.sh
index 44a8c89..0b75d8b 100755
--- a/tests/test-build-bash.sh
+++ b/tests/test-build-bash.sh
@@ -27,6 +27,7 @@ tmpdir=`mktemp -d`
d1=$tmpdir/d1
d2=$tmpdir/d2
+d3=$tmpdir/d3
test "$USE_NETWORK" = 1 || USE_INSTALLED=--use-installed
@@ -37,6 +38,8 @@ arch="$(uname -m)"
# Check all supermin-helper formats work.
../src/supermin -v --build -f chroot --host-cpu $arch $d1 -o $d2
-../src/supermin -v --build -f ext2 --host-cpu $arch $d1 -o $d2
+../src/supermin -v --build -f ext2 --host-cpu $arch $d1 -o $d3
+# Need to chmod $d2 since rm -r can't remove unwritable directories.
+chmod -R +w $d2 ||:
rm -rf $tmpdir ||:
--
2.25.1
4 years, 8 months
[nbdkit PATCH] retry: Tweak error message
by Eric Blake
The retry filter defaults to 5 retries, but when run with verbose
details produces some confusing output:
$ rm -f /tmp/inject; (sleep 5s; touch /tmp/inject)& ./nbdkit -f -v -U - \
null 1G --filter=retry --filter=noextents --filter=error error-rate=100% \
error-file=/tmp/inject --filter=delay rdelay=1 \
--run 'qemu-img convert $nbd out.img'
...
nbdkit: null[1]: debug: noextents: pread count=2097152 offset=14680064
nbdkit: null[1]: debug: error: pread count=2097152 offset=14680064
nbdkit: null[1]: error: injecting EIO error into pread
nbdkit: null[1]: debug: retry 6: original errno = 5
nbdkit: null[1]: debug: could not recover after 5 retries
The code is correct (there were six attempts, but that corresponds to
5 retries after the initial attempt; comments mention that retry=0
turns the filter into a no-op but even that requires an initial
attempt). So all we need to adjust is the output.
Fixes: f0f0ec49
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
I'm pushing this in response to https://bugzilla.redhat.com/1819240
At the same time, I'm looking at whether qemu-img should be tweaked
to have a mode where it gives up on the first EIO error, rather than
plowing on through the rest of the image even after the first error.
filters/retry/retry.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/filters/retry/retry.c b/filters/retry/retry.c
index 11e5313b..db91d7ca 100644
--- a/filters/retry/retry.c
+++ b/filters/retry/retry.c
@@ -173,7 +173,7 @@ do_retry (struct retry_handle *h,
again:
/* Log the original errno since it will be lost when we retry. */
- nbdkit_debug ("retry %d: original errno = %d", data->retry+1, *err);
+ nbdkit_debug ("retry attempt %d: original errno = %d", data->retry, *err);
if (data->retry >= retries) {
nbdkit_debug ("could not recover after %d retries", retries);
--
2.26.0.rc2
4 years, 8 months
[PATCH] supermin: Fix IBM Virtual SCSI driver name
by Gustavo Luiz Duarte
The driver was renamed from ibmvscsic to ibmvscsi on kernel 3.7.
See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
The old name is kept so supermin works with recent kernels as well as kernel
version older than 3.7.
---
src/format_ext2_initrd.ml | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/format_ext2_initrd.ml b/src/format_ext2_initrd.ml
index b67bb55..38977e6 100644
--- a/src/format_ext2_initrd.ml
+++ b/src/format_ext2_initrd.ml
@@ -44,6 +44,7 @@ let kmods = [
"crc*.ko*";
"libcrc*.ko*";
"ibmvscsic.ko*";
+ "ibmvscsi.ko*";
"libnvdimm.ko*";
"nd_pmem.ko*";
"nd_btt.ko*";
--
2.21.1
4 years, 8 months