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

coach create doesn't work, can't find images #9

Closed
aleksijohansson opened this issue Aug 8, 2015 · 14 comments
Closed

coach create doesn't work, can't find images #9

aleksijohansson opened this issue Aug 8, 2015 · 14 comments
Milestone

Comments

@aleksijohansson
Copy link
Collaborator

coach create can't find images, even though they are there.

Tested with:

https://github.com/aleksijohansson/docker-drupal-coach

Tested on:

RancherOS, Docker 1.7.1
CoreOS, Docker 1.6.2

Error output:

core@pur ~/Sites/test/docker-drupal-coach $ coach create
(5)[OPERATION][CREATE]------ running create operation
(3)[NODES][NODE:memcache]--- ERROR FAILED TO CREATE INSTANCE CONTAINER [drupal_memcache_single FROM memcached] =>no such image
(3)[NODES][NODE:mariadb]---- ERROR FAILED TO CREATE INSTANCE CONTAINER [drupal_mariadb_single FROM mariadb] =>no such image
(3)[NODES][NODE:php]-------- ERROR FAILED TO CREATE INSTANCE CONTAINER [drupal_php_single FROM aleksijohansson/drupal-php-fpm] =>no such image
(3)[NODES][NODE:nginx]------ ERROR FAILED TO CREATE INSTANCE CONTAINER [drupal_nginx_single FROM drupal_nginx] =>API error (500): Could not get container for drupal_php_single

@aleksijohansson
Copy link
Collaborator Author

While going back, commit 27254d8 seems to work

@james-nesbitt
Copy link
Owner

are you saying that if you bisect, this commit is the last working commit?

@james-nesbitt
Copy link
Owner

The "missing image" should be pretty easy for me to investigate, so I will do it now.

Please note 2 things:

  1. the error message seen doesn't come from coach, but rather comes from the upstream fsouza/go-dockerclient library, which essentially just runs a curl operation to the docker remote API. This issue may be an upstream issue.
  2. I was running into a scenario earlier where the docker library reported a missing image, but yet still created the container! Can you verify that the docker containers are not created.

@james-nesbitt
Copy link
Owner

I'm investigating this now

@james-nesbitt
Copy link
Owner

this issue could come from images that are not using the "latest" tag. Maybe I've missed something about passing image tags into the create process. I'll take a look there.

@james-nesbitt
Copy link
Owner

I most certainly made a mistake related to image tags. I am fixing it now.

Note that I am checking some other operations that might also have issues now: pull, build, destroy

@james-nesbitt
Copy link
Owner

@aleksijohansson #12 should fix issues related to images with tags in build, create, destroy, pull operations.

@james-nesbitt james-nesbitt added this to the 0.2 milestone Aug 9, 2015
@james-nesbitt
Copy link
Owner

PR merged.

@aleksijohansson
Copy link
Collaborator Author

Tried with the latest version of coach from master. Same issue, different error. Please see screenshot: https://goo.gl/photos/Q72wymvanjV4B1nr8

Go 1.4.2
Docker 1.8.0-rc3 (tried also 1.7.0)

Also another issue after the tag changes in docker pull. Filing another issue for that.

@james-nesbitt
Copy link
Owner

I can't recreate that image tag issue with the latest master.

Right now the only issue is the following: (Fedora 22)

    [james@sd-60942 aleksi]$ coach create
    (5)[OPERATION][CREATE]------    running create operation
    (5)[NODES][NODE:memcache]---    CREATED INSTANCE CONTAINER [drupal_memcache_single FROM memcached:1.4.24] => 03949106eb0cf986965dec1ef2921a8aac2500413f83c5db3007eae2dc224f02
    (5)[NODES][NODE:mariadb]----    CREATED INSTANCE CONTAINER [drupal_mariadb_single FROM mariadb:10.0.21] => ca89f4dcf17069f4cdc7cb0f4cac4c95f7e35b092d708372ecc7d97707d3665c
    (3)[NODES][NODE:php]--------    ERROR   FAILED TO CREATE INSTANCE CONTAINER [drupal_php_single FROM ] =>API error (500): No command specified

    (3)[NODES][NODE:nginx]------    ERROR   FAILED TO CREATE INSTANCE CONTAINER [drupal_nginx_single FROM ] =>API error (500): No command specified

This is a docker error message, which says that the image has no CMD entry in the Dockerfile. The only case where an image is legal without a CMD entry is if using the run operation.

I will remove pulled images and try it again.

@james-nesbitt
Copy link
Owner

@aleksijohansson confirmed that I cannot recreate the image tag issue, after removing all images and starting from scratch. I can perform that pull, build and create options, and am only blocked by missing CMDs in the php and nginx images.

I will now investigate the images themselves to see if the docker client is confused about the missing CMDs.

@james-nesbitt
Copy link
Owner

the "no command specified" issue is being caused by poor code in the create operation which is not properly identifying the image. I am working on fixing that now.

@james-nesbitt
Copy link
Owner

This PR should fix the "no command specified" which seemed to occur in all build cases (as opposed to pull cases)

#16

@aleksijohansson
Copy link
Collaborator Author

Tested on Fedora, RancherOS and CoreOS and seems to be working really good now!

Whole workflow:

coach init git https://github.com/aleksijohansson/docker-drupal-coach
./prepare.sh (template specific)
coach pull
coach build
coach create
coach start
coach stop
coach remove
coach destroy

Fedora 22:

Go:
go version go1.4.2 linux/amd64

Docker:

Client:
Version: 1.8.1
API version: 1.20
Go version: go1.4.2
Git commit: d12ea79
Built: Thu Aug 13 02:39:27 UTC 2015
OS/Arch: linux/amd64

Server:
Version: 1.8.1
API version: 1.20
Go version: go1.4.2
Git commit: d12ea79
Built: Thu Aug 13 02:39:27 UTC 2015
OS/Arch: linux/amd64

RancherOS:
rancherctl version v0.3.3

Go:
go version go1.4.2 linux/amd64

Docker:
Client version: 1.7.0
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 851c91a
OS/Arch (client): linux/amd64
Server version: 1.7.0
Server API version: 1.19
Go version (server): go1.4.2
Git commit (server): 851c91a
OS/Arch (server): linux/amd64

CoreOS:
CoreOS alpha (774.0.0)

Go:
go version go1.4.2 linux/amd64

Docker:
Client version: 1.7.1
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 2c2c52b-dirty
OS/Arch (client): linux/amd64
Server version: 1.7.1
Server API version: 1.19
Go version (server): go1.4.2
Git commit (server): 2c2c52b-dirty
OS/Arch (server): linux/amd64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants