X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=meta-stx%2Frecipes-support%2Fpuppet%2Ffiles%2Fpuppetlabs-lvm%2F0002-UEFI-pvcreate-fix.patch;fp=meta-stx%2Frecipes-support%2Fpuppet%2Ffiles%2Fpuppetlabs-lvm%2F0002-UEFI-pvcreate-fix.patch;h=3ac7b91d84159277e733e4fdb965770521c67730;hb=57fdea704bd62af847872c40508f00aa1d7cac60;hp=0000000000000000000000000000000000000000;hpb=f23f21bccfb750b9e30141fd9676515215ffbc4e;p=pti%2Frtp.git diff --git a/meta-stx/recipes-support/puppet/files/puppetlabs-lvm/0002-UEFI-pvcreate-fix.patch b/meta-stx/recipes-support/puppet/files/puppetlabs-lvm/0002-UEFI-pvcreate-fix.patch new file mode 100644 index 0000000..3ac7b91 --- /dev/null +++ b/meta-stx/recipes-support/puppet/files/puppetlabs-lvm/0002-UEFI-pvcreate-fix.patch @@ -0,0 +1,46 @@ +From ac6a60e4d65e33017f8db0eca499f8dd898acb3c Mon Sep 17 00:00:00 2001 +From: Kristine Bujold +Date: Fri, 15 Jul 2016 16:55:16 -0400 +Subject: [PATCH] US80802 - PXE Installation changes for UEFI support. Fixing + pvcreate issue. + +--- + .../lvm/lib/puppet/provider/physical_volume/lvm.rb | 17 ++++++++++++++++- + 1 file changed, 16 insertions(+), 1 deletion(-) + +diff --git a/packstack/puppet/modules/lvm/lib/puppet/provider/physical_volume/lvm.rb b/packstack/puppet/modules/lvm/lib/puppet/provider/physical_volume/lvm.rb +index 6ac6e0a..18183ae 100644 +--- a/packstack/puppet/modules/lvm/lib/puppet/provider/physical_volume/lvm.rb ++++ b/packstack/puppet/modules/lvm/lib/puppet/provider/physical_volume/lvm.rb +@@ -1,12 +1,27 @@ + Puppet::Type.type(:physical_volume).provide(:lvm) do + desc "Manages LVM physical volumes" + +- commands :pvcreate => 'pvcreate', :pvremove => 'pvremove', :pvs => 'pvs', :vgs => 'vgs' ++ ++ commands :pvcreate => 'pvcreate', ++ :pvremove => 'pvremove', ++ :pvs => 'pvs', ++ :vgs => 'vgs', ++ :dd => 'dd' + + def create ++ # Delete the first few bytes at the start and end of the partition. This is required with ++ # GPT partitions, they save partition info at the start and the end of the block. ++ exec_cmd('dd', 'if=/dev/zero', "of=#{@resource[:name]}", "bs=512", "count=34") ++ exec_cmd('dd', 'if=/dev/zero', "of=#{@resource[:name]}", "bs=512", "count=34", "seek=$((`blockdev --getsz #{@resource[:name]}` - 34))") ++ + pvcreate('-y', @resource[:name]) + end + ++ def exec_cmd(*cmd) ++ output = Puppet::Util::Execution.execute(cmd, :failonfail => false, :combine => true) ++ {:out => output, :exit => $CHILD_STATUS.exitstatus} ++ end ++ + def destroy + pvremove(@resource[:name]) + end +-- +1.8.3.1 +