Cannot install storage driver on RHEL
xverges opened this issue · 7 comments
I get an error when trying to configure the storage driver on RHEL 7.
Apparently, it comes from this variable https://github.com/arc-ts/ansible-role-docker/blob/master/vars/main.yml#L5
Any suggestion on how to bypass it? (I edited the installed role, and I am delighted with it. Thanks!)
The role was setup to only support the distros I could easily test against (free), and Docker 'officially' doesn't support CE on redhat. However it should be a quick and easy fix if all that's needed is the storage driver change.
I've created a branch redhat-support which should take care of it (I just don't have something I can test it with). Please give it a go and if it works I'll merge it in.
Thanks!
Thanks. Problem solved!
Unfortunately, it opened new ones (that I can move to a new ticket or forget about). My previous happy installation was a local one. Now, when installing remote servers, I get
TASK [galaxy.docker : STORAGE - DEVICEMAPPER - Convert Volume To Thinpool] *********************************************************
fatal: [abacus-dev]: FAILED! => {"changed": false, "cmd": "lvconvert -y --zero n -c 512K --thinpool docker-vg/thinpool --poolmetadata docker-vg/thinpool_metadata", "failed": true, "msg": "[Errno 2] No such file or directory", "rc": 2}
This can be fixed by prefixing the with /usr/sbin/
the call to lvconvert
and lvchange
(but I don't know if this is something that can be applied to all distributions). Trying to switch to the shell module did not have any effect.
Another part that was tricky is that the failing commands are not re-executed when the playbook is run again. To have the commands run again, I have had to
# sudo vgremove docker-vg
# sudo rm /etc/lvm/profile/docker-thinpool.profile
I've gone ahead and updated/tested the role with the path prefix (no issues with centos). If you don't mind giving it a pull and testing it again, it'd be much appreciated.
I could probably make it a bit smarter about when it executes lvconvert/lvchange...but will definitely need to do some testing. It currently err on the side of caution and only modifies it if the volumes were created in the play. Last thing I'd want to trigger is accidental screwing up of someone's data.
If I can't find a happy workaround, I'll at least update the docs in the the devicemapper section regarding what to do in the event of a failed execution.
if you don't mind giving it a pull and testing it again, it'd be much appreciated.
Thanks! Worked fine!
If I can't find a happy workaround, I'll at least update the docs in the the devicemapper section regarding
Fair point about erring on the side of caution. Regarding documentation, maybe a couple message in respective rescue
block could get more eye-balls.
That's actually a really good idea. I'll take care of that quick and merge it in. Will bump the release and get it out some time today.
I see that 2.0.1 is not listed on galaxy https://galaxy.ansible.com/arc-ts/docker/
I haven't got a clue of how the galaxy publishing process works, but just in case you forgot something...
BTW, a link to galaxy in the project description would be handy. I don't have any factual base for doing it, but I like to add the galaxy origin to my requirements.yml
, just in case it improves their statistics. Popularity and last commit date are the things that I look at when shopping for roles...
It looks like for whatever reason the notification webhook didn't fire off in travis or wasn't received after the last successful build completed. I popped over to galaxy and manually synced with the repo so 2.0.1 should be there now.
Also not a bad idea re - galaxy link, I'll go ahead and make that change now.