From fb668ac3d5e0dac7df1d84f6f9382ad8621eb739 Mon Sep 17 00:00:00 2001 From: Mike Scherbakov Date: Mon, 23 Dec 2013 20:20:05 +0400 Subject: [PATCH] Unconditionaly do pvcreate During the disk partitioning pmanager runs pvcreate which asks for confirmation on wiping out the volume group if it is found there. There was another fix which does dd to clean up all information about all disk partionins, so pvcreate should not ask anything. This patch adds '-y' option to pvcreate, and it writes changes without asking questions, so we can be double sure that installation won't stuck under some other condition on this command. Change-Id: I7368ce58fa54155664d59adedbfc0463f7d3a3ea --- deployment/puppet/cobbler/templates/scripts/pmanager.py | 2 +- .../cobbler/templates/snippets/cinder_create_lvm_group.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment/puppet/cobbler/templates/scripts/pmanager.py b/deployment/puppet/cobbler/templates/scripts/pmanager.py index 62e9b2d303..08d6478a31 100644 --- a/deployment/puppet/cobbler/templates/scripts/pmanager.py +++ b/deployment/puppet/cobbler/templates/scripts/pmanager.py @@ -798,7 +798,7 @@ class PreseedPManager(object): self.late("sleep 3") self.late("hdparm -z $(readlink -f /dev/{0})" "".format(disk["id"])) - pvlist.append("pvcreate -ff $(readlink -f /dev/{0}){1}{2}" + pvlist.append("pvcreate -ff -y $(readlink -f /dev/{0}){1}{2}" "".format(disk["id"], self._pseparator(disk["id"]), pcount)) diff --git a/deployment/puppet/cobbler/templates/snippets/cinder_create_lvm_group.erb b/deployment/puppet/cobbler/templates/snippets/cinder_create_lvm_group.erb index 62c5c564d1..591e144313 100644 --- a/deployment/puppet/cobbler/templates/snippets/cinder_create_lvm_group.erb +++ b/deployment/puppet/cobbler/templates/snippets/cinder_create_lvm_group.erb @@ -4,7 +4,7 @@ #set $devs = "" #for $bd in $bds.split(",") dd if=/dev/zero bs=8192 count=1 of=$bd - echo ";" | sfdisk -f -q -L $bd && sfdisk -R $bd && sleep 1 && pvcreate ${bd}1 + echo ";" | sfdisk -f -q -L $bd && sfdisk -R $bd && sleep 1 && pvcreate -ff -y ${bd}1 #set $devs += "%s1 " % $bd #end for vgcreate $vgname $devs