Default docker instances stopped

Hi there,

I’ve just started my first host with an ec2 ubuntu image, I’ve installed docker and ran the docker agent via user-data.
After joining the cluster I see 2 stopped containers:

One is rancher-agent-state which runs “/run.sh state” and the other one is thirsty_blackwell (maybe some fancy name given by docker), which runs “/run.sh http://ip:8080/v1/scripts/somehash

What are those? Can I delete them?

Docker version is 1.8.0

You cannot delete the rancher-agent-state container, but you could delete the randomly named by docker container. Whenever Rancher agent starts, it has always created 3 containers with 2 of them being stopped.

There was a change in Docker 1.8 that exposed these stopped containers that used to be hidden. We’ve already put in a fix to hide these containers from the UI that will come out in the next release.

Good to know, I’ll wait for the new release!

@denise
I still see both stopped and running rancher agents in Rancher UI under hosts
we are on v0.52.0-rc4, so it seems this was never fixed, see screenshot.

On host swarm04-test with docker 1.8.2 it shows the rancher containers but not on the other hosts with docker 1.7.1

is there something i can do about it? Is it the same with newer docker 1.9?

I’m using Docker 1.9.1 and never see my rancher-agent, rancher-agent-state, docker-named containers.

I don’t have a 1.8.3 host around, so unable to test with that version.

@demarant has your 1.8 host been around for a long time (say since August) or is it a new host that you just recently added with a relatively recent version of Rancher?

@cjellick indeed the host has been around for a while, looks like from Aug 7 indeed

[marinis@swarm04-test ~]$ sudo tune2fs -l /dev/vda1 | grep created Filesystem created: Fri Aug 7 17:24:26 2015

it had a older version of docker, like 1.7.1 and it was updated (2015 Nov 3 19:53 cet) to 1.8.2 for test purposes. I also have continuously updated Rancher server as soon as new releases where out.

@demarant I believe what we wound up with was a situation where if you caught just the right version of rancher and docker 1.8, these containers started showing up in the UI. We fixed it within a week or two so that new rancher installs and upgrades would not hit this bug, but we did not (and don’t intend to) add a retroactive fix for those who did catch the bug. Sorry for the bad news!

It looks like you’re hosts are empty. You could fix this by basically cleaning out that host and reimporting it to rancher. You would need to:

  1. Delete the host from rancher
  2. Remove all containers on the host -including/especially the rancher containers
  3. Delete the /var/lib/rancher directory from the host
  4. Reregister the host by running the docker run ... rancher/agent ... command found on the Add Host page.