[Pkg-ganeti-devel] Bug#895602: ganeti-os-noop - export fails with non block device

Bastian Blank bastian.blank at credativ.de
Fri Apr 13 09:59:14 UTC 2018


Package: ganeti-os-noop
Version: 0.2-1
Severity: grave

The export script tries to use blockdev to check for the size.  This
works fine for block devices, but completely fails for everything else.
As this script also ignores the error, the export fails with a
completely non-discriptive output.

| 2018-04-13 09:40:12,803: blockdev: ioctl error on BLKGETSIZE64: Inappropriate ioctl for device
| 2018-04-13 09:40:12,805: dd: 0 bytes copied, 0.00124913 s, 0.0 kB/s

The fix is to use "stat" in case of non block devices:
| if test -n "$EXP_SIZE_FD"; then
|   if [ -f "$EXPORT_DEVICE" ]; then
|     stat -c '%s' "$EXPORT_DEVICE" >&"$EXP_SIZE_FD"
|   else
|     blockdev --getsize64 "$EXPORT_DEVICE" >&"$EXP_SIZE_FD"
|   fi
| fi

Please fix this in stable also.

Regards,
Bastian

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.15.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled



More information about the Pkg-ganeti-devel mailing list