-
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
Fix issue with using force method as pvcreate argument #135
Conversation
|
I can reproduce this issue, but unfortunately the proposed fix doesn't seem to work for me. |
|
Does your vagrant box have a /dev/sdc disk available? Just to be clear -- the original issue is that an error is thrown when the device is present and available. If the device doesn't exist then receiving the error is correct behavior. |
|
I suspect that is the problem. Sorry, I'm not that knowledgeable about lvm. Do you know an easy way to mount a generic sdc device on a vagrant vm? If not I'll go try to learn how. |
|
I think this gist will do it: https://gist.github.com/leifg/4713995 If for whatever reason the device shows up as /dev/sdb, /dev/sdd, etc. just sub that in for sdc. |
|
The change looks good to me, but please squash the two commits into one so that the fix of the test coincides with the functional change. This will make the history so much cleaner. Squashing: https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Squashing-Commits |
|
squashed! |
Fix issue with using force method as pvcreate argument
|
Excellent, thanks! |
Fix issue with using force method as pvcreate argument
passing a blank argument (when force => false) to the pvcreate method causes errors:
Which appear to be related to the insertion of the extra "nil" argument. Note the extra space in
/sbin/pvcreate /dev/sdc. This shouldn't matter if the command is executed 'as-is' on the commandline but there appears to possibly be some sort of quoting or grouping going on such that the command is literally/sbin/pvcreate ' /dev/sdc', which causes an error. I'm not sure why the PV is still created successfully despite the error, however.This PR should fix the issue.