-
Notifications
You must be signed in to change notification settings - Fork 20
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
does not work with docker #13
Comments
@epcim checkout things found on google such as:
So I guess that means we shouldn't run the hostname command if in a container, so the question is how to check if within a container. |
chef/ohai#531 was raised. I think we'll need that fixed to ensure support coverage and determine if the same logical check will be used as proposed above. |
Well we may check node.virtualization['system'] for docker/lxc and avoid a change, however since docker 1.2.0 IMHO it's possible to modify even /etc/hosts, /etc/resolv.conf etc.. (moby/moby#5129). My use-case is functional cookbook testing in docker. I do setup hostname of deployed servers to /etc/hosts (just for convenience). With vagrant/vbox/aws all will work, but the same cookbook used under docker will fail. I was actually doing the hostname change in the past on docker (chef-boneyard/chef-client#248) however this time there is new issue with the root rights, which I quite don't understand why? |
It looks like this is more something you are trying to do with Docker. This cookbook was never designed nor supports Docker. Setting hostname in a Docker container seems like a flawed use case. With that being said we can look at the right graceful degradation once there is an accurate ohai query. |
Awaiting pull request merge (chef/ohai#569) and then release. |
I was hoping to do much better but the limitations are all upstream. |
I have just cloned this repo, changed driver name to
docker
in.kitchen.yml
(... tested only ubuntu suites).kitchen converge fails on:
Note use_sudo/sudo: true didn't helped.
I believe previous versions did worked on docker. However I have not yet found what changed...
The text was updated successfully, but these errors were encountered: