[library] Get containers info from dockerctl

Bug #1400776 reported by Fabrizio Soppelsa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
Medium
Bartłomiej Piotrowski
7.0.x
Won't Fix
Wishlist
Fuel Library (Deprecated)

Bug Description

Please add some functionality to dockerctl to show containers debug information for troubleshooting purposes.

For instance, print the long 64-chars container ID and other relevant info from `docker inspect`.

Changed in fuel:
assignee: Matthew Greyling (matthew) → Matthew Mosesohn (raytrac3r)
Changed in fuel:
milestone: none → 6.1
importance: Undecided → Wishlist
summary: - Get containers info from dockerctl
+ [library] Get containers info from dockerctl
Changed in fuel:
status: New → Confirmed
Changed in fuel:
status: Confirmed → Won't Fix
tags: added: docker feature
Revision history for this message
Bartłomiej Piotrowski (bpiotrowski) wrote :

Contacted Fabrizio about the scope of the task.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (master)

Fix proposed to branch: master
Review: https://review.openstack.org/228377

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/228377
Committed: https://git.openstack.org/cgit/stackforge/fuel-library/commit/?id=f6e66e3ea7a4e4752c2eebe15cf85efde8133945
Submitter: Jenkins
Branch: master

commit f6e66e3ea7a4e4752c2eebe15cf85efde8133945
Author: Bartłomiej Piotrowski <email address hidden>
Date: Mon Sep 28 11:59:16 2015 +0200

    Add inspect subcommand to dockerctl

    Take this opportunity to replace bunch of if conditionals with the case
    statement.

    Change-Id: Ic0c80c3fadb607d4f8356adf7f77fe671328477d
    Closes-bug: 1400776

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Artem Hrechanychenko (agrechanichenko) wrote :

release_versions:
  2015.1.0-8.0:
    VERSION:
      api: '1.0'
      astute_sha: 0f753467a3f16e4d46e7e9f1979905fb178e4d5b
      build_id: '111'
      build_number: '111'
      feature_groups:
      - mirantis
      fuel-agent_sha: e881f0dabd09af4be4f3e22768b02fe76278e20e
      fuel-library_sha: 84cdfdf6f2783bc828027831dbab3d7dd2335c49
      fuel-nailgun-agent_sha: d66f188a1832a9c23b04884a14ef00fc5605ec6d
      fuel-nailgun_sha: ec56b54491ecb0182f66e675f549825abc1a96ee
      fuel-ostf_sha: 41aa5059243cbb25d7a80b97f8e1060a502b99dd
      fuelmain_sha: 26cec2d55881dc7cbea8e5989b322cbff6dac8b5
      openstack_version: 2015.1.0-8.0
      production: docker
      python-fuelclient_sha: 286939d3be220828f52e73b65928ed39662e1853
      release: '8.0'

_______________________________________________________________________________________________________
Issue #1
Steps to reproduce:
1) #dockerctl inspect

Expected result - output similar to docker inspect, i.e contain help menu, command explanation and usage:
docker inspect

Usage: docker inspect [OPTIONS] CONTAINER|IMAGE [CONTAINER|IMAGE...]

Return low-level information on a container or image

  -f, --format="" Format the output using the given go template.

Actual result:
#dockerctl inspect
You need to specify valid container name.
Use 'dockerctl list' to see available containers.

_______________________________________________________________________________________________________
Issue #2
Steps to reproduce:
1) dockerctl inspect with wrong container id

Expected result:
warning message with wrong container id must be showed, usage example must be showed(optionally)

Actual result:
Wrong command (docker inspect) usage showed

[root@nailgun ~]# dockerctl inspect wrong_id

Usage: docker inspect [OPTIONS] CONTAINER|IMAGE [CONTAINER|IMAGE...]

Return low-level information on a container or image

  -f, --format="" Format the output using the given go template.

_______________________________________________________________________________________________________

Issue #3
Steps to rerpoduce:
1) dockerctl inspect cont_1 cont_2

Expected result:
Similar to docker inspect image1, image2 , i.e must be showed concatenated info about two containers.

Actual result:
Only 1st container info was showed. - http://paste.openstack.org/show/475263/

_______________________________________________________________________________________________________
Issue #4
Wrom previous issue follows several issues:
If next id in row is not walid, then this information we do not know it

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (master)

Fix proposed to branch: master
Review: https://review.openstack.org/230946

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/230946
Committed: https://git.openstack.org/cgit/stackforge/fuel-library/commit/?id=ce288a4e9fce28a9a55e689f74628cf1b44c299a
Submitter: Jenkins
Branch: master

commit ce288a4e9fce28a9a55e689f74628cf1b44c299a
Author: Bartłomiej Piotrowski <email address hidden>
Date: Mon Oct 5 13:00:45 2015 +0200

    Fix few small issues with dockerctl inspect

    * display inspect usage if no arguments were given
    * iterate over given containers to show concatenated output
    * print error message if one of many containers doesn't exist

    Change-Id: Idfa3f3db01a5287d4970772b250f085ce890134e
    Closes-bug: 1400776

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Artem Hrechanychenko (agrechanichenko) wrote :

Verified on 137 ISO

2015.1.0-8.0:
    VERSION:
      api: '1.0'
      astute_sha: e99368bd77496870592781f4ba4fb0caacb9f3a7
      build_id: '137'
      build_number: '137'
      feature_groups:
      - mirantis
      fuel-agent_sha: 84335446172cc6a699252c184076a519ac791ca1
      fuel-createmirror_sha: df6a93f7e2819d3dfa600052b0f901d9594eb0db
      fuel-library_sha: 49f55c1eb853a0cd3b2dd287493bdbce9c78a93e
      fuel-nailgun-agent_sha: d66f188a1832a9c23b04884a14ef00fc5605ec6d
      fuel-nailgun_sha: 3a745ee87e659b3ba239bbede21e491292646acb
      fuel-ostf_sha: 983d0e6fe64397d6ff3bd72311c26c44b02de3e8
      fuelmain_sha: 4c58b6503fc780be117777182165fd7b037b1a96
      openstack_version: 2015.1.0-8.0
      production: docker
      python-fuelclient_sha: a8298df7de84960f32dccb1cd070255d5828a8ea
      release: '8.0'

_____________________________________________________________________________
Issue #1
Steps to reproduce:
1) #dockerctl inspect

Expected result - output similar to docker inspect, i.e contain help menu, command explanation and usage:
docker inspect

Usage: docker inspect [OPTIONS] CONTAINER|IMAGE [CONTAINER|IMAGE...]

Return low-level information on a container or image

  -f, --format="" Format the output using the given go template.

Actual result:
Empty stdout

#dockerctl inspect
#echo $?
0

_____________________________________________________________________________

Issue #2
Steps to reproduce:
1) dockerctl inspect with wrong container id

Expected result:
warning message with wrong container id must be showed, usage example must be showed(optionally)

Actual result:
Warning message with not finded contained was showed, but help usage printed twice

[root@nailgun ~]# dockerctl inspect wrong_id
Could not find the wrong_id container

Usage: docker inspect [OPTIONS] CONTAINER|IMAGE [CONTAINER|IMAGE...]

Return low-level information on a container or image

  -f, --format="" Format the output using the given go template.

Usage: docker inspect [OPTIONS] CONTAINER|IMAGE [CONTAINER|IMAGE...]

Return low-level information on a container or image

  -f, --format="" Format the output using the given go template.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (master)

Fix proposed to branch: master
Review: https://review.openstack.org/232984

Changed in fuel:
status: Triaged → In Progress
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
milestone: 6.1 → 8.0
no longer affects: fuel/8.0.x
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/232984
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=eadb16b1d49b0c7b51153d6d023167f9ba08aac5
Submitter: Jenkins
Branch: master

commit eadb16b1d49b0c7b51153d6d023167f9ba08aac5
Author: Bartłomiej Piotrowski <email address hidden>
Date: Fri Oct 9 11:52:59 2015 +0200

    Display usage of dockerctl inspect only when no argument was given

    Change-Id: I43e8d9ff799d9ca34bc66821ffdb9e55ce043483
    Closes-bug: 1400776

Changed in fuel:
status: In Progress → Fix Committed
Changed in fuel:
status: Fix Committed → Fix Released
Dmitry Pyzhov (dpyzhov)
tags: added: area-library
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.