Closed LeeLammert closed 9 years ago
@LeeLammert Could you please add some extra information? I can't reproduce your issue with that image using either "dockerImage"
or "dockerRunning"
. The following should help diagnose the issue:
-v=2
flag set.Thank you!
Adding docker.io/
to a container image path is a RedHat thing. http://rhelblog.redhat.com/2015/04/15/understanding-the-changes-to-docker-search-and-docker-pull-in-red-hat-enterprise-linux-7-1/
On Thu, 18 Jun 2015, Langston Barrett wrote:
@LeeLammert Could you please add some extra information? I can't reproduce your issue with that image using either
"dockerImage"
or"dockerRunning"
. The following should help diagnose the issue:
- The check that you're running (JSON).
- The output of distributive running that test with
-v=2
flag set.- The commands you used to start the docker container/download the image.
-bash-4.2# cat docker.json { "Name": "Docker checks (requires root permissions)", "Checklist" : [ { "Check" : "dockerImage", "Parameters" : ["docker.io/ciscocloud/mesos-consul"] }, { "Check" : "dockerRunning", "Parameters" : ["docker.io/ciscocloud/mesos-consul"] } ] }
The problem seems to be that distributive is prefixing the image name with "docker.io", whereas a "docker ps" does not show the "docker.io" prefix.
Lee
More info - it appears that "docker image" and "docker running" require different name specs:
{ "Name": "Docker checks (requires root permissions)", "Checklist" : [ { "Check" : "dockerImage", "Parameters" : ["docker.io/ciscocloud/mesos-consul"] }, { "Check" : "dockerRunning", "Parameters" : ["ciscocloud/mesos-consul:v0.1.1"] } ] }
These pass.
@LeeLammert Thanks! Does docker ps -a
include the "docker.io" prefix?
docker ps does not show the docker.io prefix, .. it is required for "dockerImage", but NOT for "dockerRunning:; in addition, "dockerRunning" requires a version, but "dockerImage" does not.
@LeeLammert I am wondering specifically if there is a difference between docker ps
and docker ps -a
, because Distributive uses the output from docker ps -a
.
We could add a note to the role check file with example names, .. but the version requirement on dockerRunning troubles me - it would have to be adjusted every time an image version bumps.
@LeeLammert I think you're right. The version can easily be made optional. I'll implement that.
For example:
docker ps image NAME: ciscocloud/mesos-consul
distributive query required to match that image: docker.io/ciscocloud/mesos-consul