disk-creation not working with latest sfdisk
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ganeti-instance-debootstrap (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
After updating from 14.04 to 16.04 I haven't been able to create any new instances with OS-type ganeti-debootstrap.
Due to sfdisk having dropped the -C, -H, -S and --Linux options, instance creation always broke with the following error at "running OS creation scripts":
"sfdisk: invalid option -- 'H'"
sfdisk: --Linux option is unnecessary and deprecated
I was able to 'fix' it (badly, yes) by removing the options from the common.sh script:
/usr/share/
94c94
< sfdisk -u S --force --quiet "$1" <<EOF
---
> sfdisk -H 64 -S 32 -u S --quiet --Linux "$1" <<EOF
I had to add '--force' due to sfdisk complaining that the disk might be in use:
This disk is currently in use - repartitioning is probably a bad idea.
Umount all file systems, and swapoff all swap partitions on this disk.
Use the --no-reread flag to suppress this check.
As I consider this a rather dirty fix, somebody might take a look at possible side-effects with --force and the removed geometry options.
Thanks!!
---
Additional information:
> cat /etc/issue
Ubuntu 16.04 LTS
> apt-cache policy ganeti-
ganeti-
Installiert: 0.15-2
Installations
Versionstabelle:
*** 0.15-2 500
500 http://
500 http://
100 /var/lib/
> sfdisk -v
sfdisk from util-linux 2.27.1
> gnt-cluster version
Software version: 2.15.2
Internode protocol: 2150000
Configuration format: 2150000
OS api version: 20
Export interface: 0
VCS version: (ganeti) version 2.15.2-3
This bit me on 15.10 and 16.04. My fix is very similar:
- sfdisk -H 255 -S 63 --quiet --Linux "$1" <<EOF
-0,,L,*
+ sfdisk --quiet --force "$1" << EOF
+;
It works for me. I issued a pull request on the upstream package quite awhile ago and haven't gotten a response. With the change it seems to work well for me.