sethvargo-cookbooks/swap — pull request #6 by andrewgross (2013-04-09 18:44:03+00:00)
Title: Degrade to dd

Degrade to using `dd` if there are errors using `fallocate`

Depending on a combination of kernel version and filesystem library versions, it is possible to end up in a state where a swapfile on an 'approved' filesystem will still fail to create when using `fallocate`.

To avoid this issue and its similar ilk, the provider has been reworked to perform the swapfile creation in a begin/rescue block. This required converting from the LWRP syntax to a more traditional pure ruby approach for the provider. The resource definition remains unchanged.