integ/config/puppet-modules/puppet-lvm/centos/files/0002-UEFI-pvcreate-fix.patch
Scott Little bab9bb6b69 Internal restructuring of stx-integ
Create new directories:
   ceph
   config
   config-files
   filesystem
   kernel
   kernel/kernel-modules
   ldap
   logging
   strorage-drivers
   tools
   utilities
   virt

Retire directories:
   connectivity
   core
   devtools
   support
   extended

Delete two packages:
   tgt
   irqbalance

Relocated packages:
   base/
      dhcp
      initscripts
      libevent
      lighttpd
      linuxptp
      memcached
      net-snmp
      novnc
      ntp
      openssh
      pam
      procps
      sanlock
      shadow
      sudo
      systemd
      util-linux
      vim
      watchdog

   ceph/
      python-cephclient

   config/
      facter
      puppet-4.8.2
      puppet-modules

   filesystem/
      e2fsprogs
      nfs-utils
      nfscheck

   kernel/
      kernel-std
      kernel-rt

   kernel/kernel-modules/
      mlnx-ofa_kernel

   ldap/
      nss-pam-ldapd
      openldap

   logging/
      syslog-ng
      logrotate

   networking/
      lldpd
      iproute
      mellanox
      python-ryu
      mlx4-config

   python/
      python-2.7.5
      python-django
      python-gunicorn
      python-setuptools
      python-smartpm
      python-voluptuous

   security/
      shim-signed
      shim-unsigned
      tboot

   strorage-drivers/
      python-3parclient
      python-lefthandclient

   virt/
      cloud-init
      libvirt
      libvirt-python
      qemu

   tools/
      storage-topology
      vm-topology

   utilities/
      tis-extensions
      namespace-utils
      nova-utils
      update-motd

Change-Id: I37ade764d873c701b35eac5881eb40412ba64a86
Story: 2002801
Task: 22687
Signed-off-by: Scott Little <scott.little@windriver.com>
2018-08-01 10:06:31 -04:00

47 lines
1.8 KiB
Diff

From ac6a60e4d65e33017f8db0eca499f8dd898acb3c Mon Sep 17 00:00:00 2001
From: Kristine Bujold <kristine.bujold@windriver.com>
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