这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@kilianc
Copy link
Contributor

@kilianc kilianc commented Jul 4, 2015

No description provided.

@michaelshobbs
Copy link
Member

I thought we were doing to use a different method than grep... i.e. #1270 (comment)

Honestly I'd prefer dropping all processing of docker ps output (considering their recent change) starting with this one.

@josegonzalez
Copy link
Member

@kilianc can you update this pr to use the docker command directly?

@kilianc
Copy link
Contributor Author

kilianc commented Jul 6, 2015

sure thing

@kilianc
Copy link
Contributor Author

kilianc commented Jul 6, 2015

@josegonzalez @michaelshobbs up

@kilianc
Copy link
Contributor Author

kilianc commented Jul 7, 2015

test are failing, can you guys look up why? not sure it's me

@michaelshobbs
Copy link
Member

it looks like its the default container check when i look at the ci output. can you try running the tests locally?

@kilianc
Copy link
Contributor Author

kilianc commented Jul 7, 2015

I need to figure out how :) @michaelshobbs

@kilianc
Copy link
Contributor Author

kilianc commented Jul 7, 2015

export DOKKU_APP_CONTAINER_ID=$(docker ps -q --no-trunc | head -1)
echo $DOKKU_APP_CONTAINER_ID

docker top "$DOKKU_APP_CONTAINER_ID" &>/dev/null || echo "App container failed to start $DOKKU_APP_CONTAINER_ID"
docker top "$DOKKU_APP_CONTAINER_ID" &>/dev/null && echo "Container is running $DOKKU_APP_CONTAINER_ID"

docker top "$DOKKU_APP_CONTAINER_ID"a &>/dev/null || echo "App container failed to start $DOKKU_APP_CONTAINER_ID"
docker top "$DOKKU_APP_CONTAINER_ID"a &>/dev/null && echo "Container is running $DOKKU_APP_CONTAINER_ID"

this works on my ubuntu

@michaelshobbs
Copy link
Member

circleci's docker daemon responds with an error ....

root@box166:/tmp/config-app# docker top eeaa8d04c65681790d80078e0c01c5c6714b44a4f618f9e4271af4818157de6c
FATA[0000] Error response from daemon: mountpoint for cpu not found

@michaelshobbs
Copy link
Member

docker inspect -f {{.State.Running}} $CID works

root@box166:/tmp/config-app# docker inspect -f {{.State.Running}}  eeaa8d04c65681790d80078e0c01c5c6714b44a4f618f9e4271af4818157de6c
true

for reference:

root@box166:/tmp/config-app# docker version
Client version: 1.4.1-circleci
Client API version: 1.16
Go version (client): go1.3.3
Git commit (client): 1b532d1
OS/Arch (client): linux/amd64
Server version: 1.4.1-circleci
Server API version: 1.16
Go version (server): go1.3.3
Git commit (server): 1b532d1

@kilianc
Copy link
Contributor Author

kilianc commented Jul 8, 2015

@michaelshobbs we can use docker inspect but we need to handle "true" "false" and exit code 1 since the container can be stopped, running or not found. docker top was easier

@kilianc
Copy link
Contributor Author

kilianc commented Jul 8, 2015

moby/moby#7993 seems a problem with the vm running the test?

@michaelshobbs
Copy link
Member

i'll hit up circle about the docker top issue. seems like docker inspect is our only option at the moment if we want tests to pass. (and we do 😄)

@kilianc
Copy link
Contributor Author

kilianc commented Jul 10, 2015

btw I think ps:stop has the same issue. it says the container is stopped when it's running instead

@michaelshobbs
Copy link
Member

@kilianc were you going to attempt to rework this with docker inspect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants