puppetlabs-lvm icon indicating copy to clipboard operation
puppetlabs-lvm copied to clipboard

Add createfsonly option to leave existing filesystems as is

Open esalberg opened this issue 8 years ago • 8 comments

New option for logical_volume.

esalberg avatar Jan 25 '17 22:01 esalberg

Reason for PR: we have some legacy nodes that have ext3 filesystems mounted as ext4. While we're working to convert those, we need to be able to manage the the rest of the LVM config. With the old code, if I changed fstype to ext3, then it wanted to update the fstab lines, or if I left fstype as ext4, it wanted to update the filesystem automatically (we have to wait for a maintenance window).

esalberg avatar Jan 25 '17 22:01 esalberg

My rspec is very weak - I removed it so that the Travis checks would stop failing.

I tried adding this to spec/unit/puppet/provider/filesystem/lvm_spec.rb:

describe "when checking existence" do it "should not return exists with fs_type mismatch" do @resource.expects(:[]).with(:createfsonly).returns(false) @resource.expects(:[]).with(:fstype).returns('ext3') @resource.expects(:[]).with(:fs_type).returns('ext4') @provider.should_not be_exists end it "should return exists with fs_type mismatch with createfsonly" do @resource.expects(:[]).with(:createfsonly).returns(true) @resource.expects(:[]).with(:fstype).returns('ext3') @resource.expects(:[]).with(:fs_type).returns('ext4') @provider.should be_exists end it "should not return exists with no fstype result" do @resource.expects(:[]).with(:createfsonly).returns(true) @resource.expects(:[]).with(:fstype).returns() @resource.expects(:[]).with(:fs_type).returns('ext4') @provider.should_not be_exists end end

Is a spec test needed? If so, can someone help me figure out the right syntax, or point me towards some helpful docs?

esalberg avatar Jan 25 '17 23:01 esalberg

Rebased to fix the conflict.

esalberg avatar Jul 14 '17 18:07 esalberg

Any movement on this? It'd be awfully nice to have.

mjburling avatar Feb 02 '18 20:02 mjburling

rebased to fix conflict in README.md

esalberg avatar Mar 01 '18 21:03 esalberg

It would be nice to have this!

rgevaert avatar Jun 13 '18 09:06 rgevaert

Rebased this against current master. Please let me know if I need to make any further changes for it to be approved to merge.

esalberg avatar Apr 04 '19 17:04 esalberg

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Sep 01 '21 18:09 CLAassistant

Closing as PR is outdated. Please re-open if necessary.

jordanbreen28 avatar Jun 26 '23 15:06 jordanbreen28