puppetlabs-lvm
puppetlabs-lvm copied to clipboard
Add createfsonly option to leave existing filesystems as is
New option for logical_volume.
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).
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?
Rebased to fix the conflict.
Any movement on this? It'd be awfully nice to have.
rebased to fix conflict in README.md
It would be nice to have this!
Rebased this against current master. Please let me know if I need to make any further changes for it to be approved to merge.
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.
Closing as PR is outdated. Please re-open if necessary.