integ/config/puppet-modules
Mihnea Saracin b310077093 Fix resize of filesystems in puppet logical_volume
After system reinstalls there is stale data on the disk
and puppet fails when resizing, reporting some wrong filesystem
types. In our case docker-lv was reported as drbd when
it should have been xfs.

This problem was solved in some cases e.g:
when doing a live fs resize we wipe the last 10MB
at the end of partition:
https://opendev.org/starlingx/stx-puppet/src/branch/master/puppet-manifests/src/modules/platform/manifests/filesystem.pp#L146

Our issue happened here:
https://opendev.org/starlingx/stx-puppet/src/branch/master/puppet-manifests/src/modules/platform/manifests/filesystem.pp#L65
Resize can happen at unlock when a bigger size is detected for the
filesystem and the 'logical_volume' will resize it.
To fix this we have to wipe the last 10MB of the partition after the
'lvextend' cmd in the 'logical_volume' module.

Tested the following scenarios:

B&R on SX with default sizes of filesystems and cgts-vg.

B&R on SX with with docker-lv of size 50G, backup-lv also 50G and
cgts-vg with additional physical volumes:

- name: cgts-vg
    physicalVolumes:
    - path: /dev/disk/by-path/pci-0000:00:0d.0-ata-1.0
    size: 50
    type: partition
    - path: /dev/disk/by-path/pci-0000:00:0d.0-ata-1.0
    size: 30
    type: partition
    - path: /dev/disk/by-path/pci-0000:00:0d.0-ata-3.0
    type: disk

B&R on DX system with backup of size 70G and cgts-vg
with additional physical volumes:

physicalVolumes:
- path: /dev/disk/by-path/pci-0000:00:0d.0-ata-1.0
    size: 50
    type: partition
- path: /dev/disk/by-path/pci-0000:00:0d.0-ata-1.0
    size: 30
    type: partition
- path: /dev/disk/by-path/pci-0000:00:0d.0-ata-3.0
    type: disk

Closes-Bug: 1926591
Change-Id: I55ae6954d24ba32e40c2e5e276ec17015d9bba44
Signed-off-by: Mihnea Saracin <Mihnea.Saracin@windriver.com>
2021-05-22 18:41:22 +03:00
..
openstack Add auto-versioning to starlingx/integ packages 2020-06-24 09:48:28 +08:00
puppet-boolean-1.0.2/centos Add auto-versioning to starlingx/integ packages 2020-06-24 09:48:28 +08:00
puppet-create_resources/centos Add auto-versioning to starlingx/integ packages 2020-06-24 09:48:28 +08:00
puppet-dnsmasq/centos Add auto-versioning to starlingx/integ packages 2020-06-24 09:48:28 +08:00
puppet-drbd-0.3.1/centos Format DRBD resource cpu-mask to support 64 or larger cpus 2020-11-04 15:49:44 -05:00
puppet-filemapper/centos Add auto-versioning to starlingx/integ packages 2020-06-24 09:48:28 +08:00
puppet-haproxy-1.5.0/centos Add auto-versioning to starlingx/integ packages 2020-06-24 09:48:28 +08:00
puppet-ldap Add auto-versioning to starlingx/integ packages 2020-06-24 09:48:28 +08:00
puppet-lvm/centos Fix resize of filesystems in puppet logical_volume 2021-05-22 18:41:22 +03:00
puppet-network/centos Add auto-versioning to starlingx/integ packages 2020-06-24 09:48:28 +08:00
puppet-nslcd/centos Add auto-versioning to starlingx/integ packages 2020-06-24 09:48:28 +08:00
puppet-postgresql-4.8.0/centos Add auto-versioning to starlingx/integ packages 2020-06-24 09:48:28 +08:00
puppet-puppi Add auto-versioning to starlingx/integ packages 2020-06-24 09:48:28 +08:00
puppet-rabbitmq-5.5.0/centos Add auto-versioning to starlingx/integ packages 2020-06-24 09:48:28 +08:00
puppet-staging/centos Add auto-versioning to starlingx/integ packages 2020-06-24 09:48:28 +08:00
puppet-stdlib-4.12.0/centos Add auto-versioning to starlingx/integ packages 2020-06-24 09:48:28 +08:00