-
Notifications
You must be signed in to change notification settings - Fork 276
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'
|
Needs updated tests. Still working on that. |
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.
|
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.
Added logic to prevent a mount on fs_type swap in the logical_volume.pp Update unit test for the logical_volume define.
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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'