Skip to content
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

docker run fails with "docker: Error response from daemon: Unable to find container ... in the cache, unable to get power state." #3909

Closed
wodge73 opened this issue Feb 12, 2017 · 3 comments
Assignees
Labels
kind/defect Behavior that is inconsistent with what's intended priority/p0 source/customer Reported by a customer, directly or via an intermediary
Milestone

Comments

@wodge73
Copy link

wodge73 commented Feb 12, 2017

#bug report

VIC version:
Installer version: v0.8.0-7315-c8ac999
VCH version: v0.8.0-7315-c8ac999

Deployment details:
What was the vic-machine create command used to deploy the VCH?
vic-machine-windows create --target "" --user "" --password "" --compute-resource pod-manage --bridge-network "vic-bridge-02" --image-store "Starwind06" --volume-store "Starwind06"/volumes:default --public-network "vic-public" --client-network "vic-client" --name vch-02 --force --no-tls

Steps to reproduce:
From Docker client CLI:
docker run -d -p 3306:3306 tutum/mysql

Actual behavior:
(1) Container downloaded / pulled.
(2) VM is created for container from VCH.
(3) VM powers on
(4) VM powers off
(5) at docker client CLI, the following error was reported:

a3ed95caeb02: Pull complete
Digest: sha256:829b7a518d16fc224b698492b734298d6f05bcec868ecbed49b4ae8fc135c524
Status: Downloaded newer image for tutum/mysql:latest
docker: Error response from daemon: Unable to find container "5a1904767d8a5812dca79e23576f2120e0e7320a4a29f8445c54b0a7b6066228" in the cache, unable to get power state.

(6) At docker client CLI, running "docker ps -a" shows the container as created but not started:

4746301406cb tutum/mysql "/run.sh" 2 minutes ago Created 192.168.0.243:3306->3306/tcp pensive_hawking

--- Container has been created, "pensive_hawking" in this case.

(7) If attempting to run "docker start pensive_hawking":

Error response from daemon: Unable to find container "5a1904767d8a5812dca79e23576f2120e0e7320a4a29f8445c54b0a7b6066228" in the cache, unable to get power state
Error: failed to start containers: pensive_hawking

Expected behavior:
Container should be created from image, start and continue running - as it does using a standard Docker daemon.

Tested using Docker for Mac daemon on localhost Mac OSX, with no issues.

Logs:
Added files.
logs.zip

Additional details as necessary:

@anchal-agrawal anchal-agrawal added kind/defect Behavior that is inconsistent with what's intended source/customer Reported by a customer, directly or via an intermediary labels Feb 13, 2017
@anchal-agrawal
Copy link
Contributor

anchal-agrawal commented Feb 13, 2017

Hi @wodge73, thanks for reporting. This looks similar to #3465 (comment) and has been resolved in more recent builds.

Can you try using a newer build off the master branch or from Bintray (b7964, for example) and let us know if you can reproduce the issue? Thanks!

@anchal-agrawal anchal-agrawal added the status/need-info Additional information is needed to make progress label Feb 14, 2017
@anchal-agrawal anchal-agrawal self-assigned this Feb 15, 2017
@mhagen-vmware mhagen-vmware added this to the Sprint 3 milestone Feb 15, 2017
@anchal-agrawal
Copy link
Contributor

anchal-agrawal commented Feb 15, 2017

@wodge73, I ran the tutum/mysql container on VIC (master). The original error, "Unable to find container..., unable to get power state" was related to how we handle port-mapping with containers and is now resolved.

However, there's another issue that causes the container to exit after starting - the container exits when this step in tutum/mysql's run script is executed, with the error chmod: cannot access '/etc/mysql/conf.d/my.cnf': No such file or directory. This is because tutum/mysql's Dockerfile copies my.cnf to /etc/mysql/conf.d/my.cnf and then creates a volume mounted at /etc/mysql. This is a known issue (#3482) where we don't copy underlying files in the mount point while mounting a volume specified in a Dockerfile.

Would it be feasible to run the official mysql image for your use case? mysql:latest has a caveat (#3857, docker-library/mysql#186) where it fails to initialize in some cases because it expects the volume directory to be empty (in our case, the volume directory has a lost+found folder). If the official mysql image works for you, I can think of two solutions:

  • Use mysql:latest with run -e ... mysql mysqld --ignore-db-dir=lost+found:

This runs the container and overrides the default CMD for the mysql image with mysqld --ignore-db-dir=lost+found (see https://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_ignore-db-dir).

  • Use mysql:5.6 which works without the above caveat.

@anchal-agrawal anchal-agrawal removed the status/need-info Additional information is needed to make progress label Feb 15, 2017
@anchal-agrawal
Copy link
Contributor

Closing this as the original error has been resolved. The other issue - of VIC not copying underlying files from mount points - is known (#3482).

@wodge73, please feel free to comment and/or re-open the issue if you come across something that's not covered in my comment above. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/defect Behavior that is inconsistent with what's intended priority/p0 source/customer Reported by a customer, directly or via an intermediary
Projects
None yet
Development

No branches or pull requests

3 participants