Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

puppethack - MODULES-4753 and MODULES-4964 #187

Merged
merged 6 commits into from
May 25, 2017

Conversation

dhollinger
Copy link

The exec resources running swapon and swapoff in the lvm::logical_volume
define type were running whenever a swap logical volume was created
or updated.

The logical_volume provider was also running these same commands on a swap
resize. This caused a conflict where the puppet run would error out
when the logical_volume provider attempted to run swapoff on a swap
lvm that had already been unloaded from swap and the lvm would never
be reloaded into swap.

When the exec resources were removed from the lvm::logical_volume
defined type, it created a gap wherein a NEW swap lvm would not be
loaded into swap after being created.

To solve this issue, I added the swapon command and logic that will
run that command against the filesystem resource if the fs_type parameter
is set to 'swap'

David Hollinger added 2 commits May 23, 2017 13:35
The exec resources running swapon and swapoff in the lvm::logical_volume
define type were running whenever a swap logical volume was created
or updated.

The logical_volume provider was also running these same commands on a swap
resize. This caused a conflict where the puppet run would error out
when the logical_volume provider attempted to run swapoff on a swap
lvm that had already been unloaded from swap and the lvm would never
be reloaded into swap.
When the exec resources were removed from the lvm::logical_volume
defined type, it created a gap wherein a NEW swap lvm would not be
loaded into swap after being created.

To solve this issue, I added the swapon command and logic that will
run that command against the filesystem resource if the fs_type parameter
is set to 'swap'
@dhollinger
Copy link
Author

Needs updated tests. Still working on that.

David Hollinger added 2 commits May 23, 2017 15:09
Update the provider changes to be more inline with how the tests are
designed.

Tests have been added.

Gitignore updated to contain the .fixtures/modules and .fixtures/manifests
folders.
@dhollinger
Copy link
Author

Updated with the capability to remove Swap LVMs

Added logic to the destroy method that will check blkid for the LVM's
type and run swapoff against it if it is of TYPE swap. This allows
swap LVMs to be removed rather than simply erroring out.
@dhollinger dhollinger changed the title puppethack - MODULES-4753 puppethack - MODULES-4753 and MODULES-4964 May 24, 2017
Added logic to prevent a mount on fs_type swap in the logical_volume.pp
Update unit test for the logical_volume define.
@hunner hunner merged commit a79c344 into puppetlabs:master May 25, 2017
hunner added a commit that referenced this pull request May 25, 2017
The exec resources running swapon and swapoff in the lvm::logical_volume
define type were running whenever a swap logical volume was created
or updated.

The logical_volume provider was also running these same commands on a swap
resize. This caused a conflict where the puppet run would error out
when the logical_volume provider attempted to run swapoff on a swap
lvm that had already been unloaded from swap and the lvm would never
be reloaded into swap.

When the exec resources were removed from the lvm::logical_volume
defined type, it created a gap wherein a NEW swap lvm would not be
loaded into swap after being created.

To solve this issue, I added the swapon command and logic that will
run that command against the filesystem resource if the fs_type parameter
is set to 'swap'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants