vmware/vic

Docker Label missing in VCH API response

aviratna opened this issue · 9 comments

Hi,

@wjun

I came across another issue related to docker label when calling VCH API. Not sure if previous issue #8545 and current issue are related.

Issue:
When we call Docker API (https://VCH Endpoint:2376/containers/json) to get list of containers and related details, some of the information is NULL (e.g docker label).

I tried the same API on traditional docker engine it will return the list of all containers and related details like docker label.

vSphere and vCenter Server version: vSphere 6.5

VIC version VIC 1.5 (probably all versions in the past too)

Steps to reproduce:

Call Docker API:
curl -k https://VCH Endpoint:2376/containers/json --cert cert.pem --key key.pem --cacert ca.pem

VIC API Response:
docker label is null
image

Traditional Docker remote API (docker daemon running):
docker label and additional details are available.

image

Actual behavior

Docker label is NULL in API response.

Expected behavior

curl -k https://VCH Endpoint:2376/containers/json
API should return the docker label

Impact:
We have done integration of VCH API Endpoint with Metricbeat for monitoring.
It returns the metricset for cpu, memory etc but some of the details are missing e.g. docker label.
I tested the metricbeat configuration with traditional docker engine remote api, it returns the complete metricset with cpu stats, container id, along with additional details lilke docker label, ip address etc.
For Reference only: https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-metricset-docker-container.html

Previous Issue related to docker label: #8545
Not sure if both issues are related and if fix is already included.

Can you please help.

@wjun
@malikkal

wjun commented

@aviratna I just looked at the codes, both label and networking information are not included into containers information for /containers/json api.

wjun commented

@renmaosheng we need to triage this issue into next release.

@wjun Thanks for the update. Can you please let us know tentatively when it will be available & which release (1.5.3 or 1.5.4) so we can plan our integration accordingly.

@malikkal

wjun commented

@aviratna We will fix it in 1.5.4 as 1.5.3 is so close to release. Thanks.

@wjun Thanks for the update, that will be really helpful.

Appreciate if we can get the early fix in one of rc1 to test the code before final 1.5.4 is released.

We have lot of dependent integration based on Docker Label in API (https://VCH Endpoint:2376/containers/json).

  • We are using docker label for chargeback purpose
  • To filter container based on label
  • To associate user based on label attached to container
  • Metricbeat Integration with VCH to get container stats and related docker labels. We are further triggering the alerts based on label associated to container.
    etc

Thanks

wjun commented

@aviratna We are scoping vic 1.5.4. For this issue, adding label but not networking information into https://VCH Endpoint:2376/containers/json is fine? Thanks.

@wjun Yes sure. We are fine with docker label info in https://VCH Endpoint:2376/containers/json.
Currently we have more dependency on docker label, it will help us to do further integration based on docker label.

Thanks for taking this up.

wjun commented

@aviratna You can git clone the master branch onto a machine with docker installed, and run: "docker run -v $(pwd):/go/src/github.com/vmware/vic gcr.io/eminent-nation-87317/vic-build-image:tdnf make all", the generated vic-machine- binaries will be under bin directory, which can be used to test in your environment.

@wjun Thanks much, appreciate for the quick fix. We will build the binary and test the API.