Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
When you create a new docker registry, you can optionally provide a username and password. However, our API does not seem to return either of them (see further down for an example of the output generated when using hammer).
Version-Release number of selected component (if applicable):
* Sat6.1.2-SNAP1
How reproducible:
Steps to Reproduce:
1. User either hammer cli to fetch information for a docker registry OR access /docker/api/v2/registries/:id directly
2.
3.
Actual results:
Notice how username and password are not returned
Expected results:
At least the username should be returned by the API call
Additional info:
hammer> docker registry update --id 2 --username='omaciel'
Docker registry updated
hammer> docker registry info --id 2
ID: 2
Name: Red Hat Docker Registry
URL: https://registry.access.redhat.com
Created at: 2015/09/02 19:28:33
Updated at: 2015/09/02 20:24:51
hammer> exit
[root@ibm-x3250m4-05 ~]# hammer -u admin -p changeme -d docker registry info --id 2
[ INFO 2015-09-02 16:25:06 Init] Initialization of Hammer CLI (0.1.4.12) has started...
[DEBUG 2015-09-02 16:25:06 Init] Running at ruby 2.0.0-p598
[ INFO 2015-09-02 16:25:06 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded
[ INFO 2015-09-02 16:25:06 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded
[ INFO 2015-09-02 16:25:06 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_bootdisk.yml has been loaded
[ INFO 2015-09-02 16:25:06 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_discovery.yml has been loaded
[ INFO 2015-09-02 16:25:06 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_docker.yml has been loaded
[ INFO 2015-09-02 16:25:06 Init] Configuration from the file /etc/hammer/cli.modules.d/gutterball.yml has been loaded
[ INFO 2015-09-02 16:25:06 Init] Configuration from the file /etc/hammer/cli.modules.d/import.yml has been loaded
[ INFO 2015-09-02 16:25:06 Init] Configuration from the file /etc/hammer/cli.modules.d/katello.yml has been loaded
[DEBUG 2015-09-02 16:25:06 Connection] Registered: foreman
[DEBUG 2015-09-02 16:25:06 API] Global headers: {
:content_type => "application/json",
:accept => "application/json;version=2",
"Accept-Language" => "en"
}
[ INFO 2015-09-02 16:25:06 Modules] Extension module hammer_cli_foreman (0.1.4.14) loaded
[ INFO 2015-09-02 16:25:06 Modules] Extension module hammer_cli_foreman_bootdisk (0.1.2.7) loaded
[ INFO 2015-09-02 16:25:06 Modules] Extension module hammer_cli_foreman_discovery (0.0.1.10) loaded
[ INFO 2015-09-02 16:25:07 HammerCLI::MainCommand] subcommand organization (HammerCLIForeman::Organization) was removed.
[ INFO 2015-09-02 16:25:07 HammerCLI::MainCommand] subcommand organization (HammerCLIKatello::Organization) was created.
[ INFO 2015-09-02 16:25:07 Modules] Extension module hammer_cli_gutterball (0.0.1.3) loaded
[ INFO 2015-09-02 16:25:07 Modules] Extension module hammer_cli_import (0.10.20) loaded
[ INFO 2015-09-02 16:25:07 Modules] Extension module hammer_cli_katello (0.0.7.17) loaded
[DEBUG 2015-09-02 16:25:07 Init] Using locale 'en'
[DEBUG 2015-09-02 16:25:07 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/usr/share/gems/gems/hammer_cli-0.1.4.12/locale'
[DEBUG 2015-09-02 16:25:07 Init] 'mo' files for locale domain 'hammer-cli@system' loaded from '/usr/share/locale'
[DEBUG 2015-09-02 16:25:07 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/usr/share/gems/gems/hammer_cli_foreman-0.1.4.14/locale'
[DEBUG 2015-09-02 16:25:07 Init] 'mo' files for locale domain 'hammer-cli-foreman@system' loaded from '/usr/share/locale'
[DEBUG 2015-09-02 16:25:07 Init] 'mo' files for locale domain 'hammer_cli_foreman_docker' loaded from '/usr/share/gems/gems/hammer_cli_foreman_docker-0.0.3.9/locale'
[DEBUG 2015-09-02 16:25:07 Init] 'mo' files for locale domain 'hammer-cli-katello' loaded from '/usr/share/gems/gems/hammer_cli_katello-0.0.7.17/locale'
[ INFO 2015-09-02 16:25:07 HammerCLI::MainCommand] Called with options: {"option_debug"=>true, "option_username"=>"admin", "option_password"=>"***"}
[ INFO 2015-09-02 16:25:07 HammerCLIForemanDocker::DockerCommand] Called with options: {}
[ INFO 2015-09-02 16:25:07 HammerCLIForemanDocker::DockerRegistryCommand] Called with options: {}
[ INFO 2015-09-02 16:25:07 HammerCLIForemanDocker::DockerRegistryCommand::InfoCommand] Called with options: {"option_id"=>"2"}
[ INFO 2015-09-02 16:25:07 API] GET /docker/api/v2/registries/2
[DEBUG 2015-09-02 16:25:07 API] Params: {}
[DEBUG 2015-09-02 16:25:07 API] Headers: {
:params => {}
}
[DEBUG 2015-09-02 16:25:07 API] Response: {
"id" => 2,
"name" => "Red Hat Docker Registry",
"url" => "https://registry.access.redhat.com",
"description" => nil,
"created_at" => "2015-09-02T19:28:33Z",
"updated_at" => "2015-09-02T20:24:51Z",
"locations" => [],
"organizations" => []
}
[DEBUG 2015-09-02 16:25:07 API] Response headers: {
:date => "Wed, 02 Sep 2015 20:25:07 GMT",
:server => "Apache/2.4.6 (Red Hat Enterprise Linux)",
:foreman_version => "1.7.2",
:foreman_api_version => "2",
:x_ua_compatible => "IE=Edge,chrome=1",
:cache_control => "must-revalidate, private, max-age=0",
:x_request_id => "a0fedd63901dfcfed505917ca8ef51bb",
:x_runtime => "0.054340",
:x_rack_cache => "miss",
:x_powered_by => "Phusion Passenger 4.0.18",
:set_cookie => [
[0] "_session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWNkOTU0ZTRjYjU4ODMyYThjOTc2NmRiMWQwM2M4OWUwBjsAVEkiC2xvY2FsZQY7AEYiB2Vu--67efdbc1c468785e0e4945ace6a6a83ba3907dab; path=/; secure; HttpOnly"
],
:etag => "\"71f8a3f3f2b750eab907421469b85345\"",
:status => "200 OK",
:transfer_encoding => "chunked",
:content_type => "application/json; charset=utf-8"
}
ID: 2
Name: Red Hat Docker Registry
URL: https://registry.access.redhat.com
Created at: 2015/09/02 19:28:33
Updated at: 2015/09/02 20:24:51
Moving to POST since upstream bug http://projects.theforeman.org/issues/11672 has been closed
-------------
Partha Aji
Applied in changeset commit:foreman-docker|cf318d7fd58b7ed0f8ada54ab5f00b2a2a46ae9d.
Verified on: Satellite-6.1.0-RHEL-7-20151030.2
Steps to verify:
1. Created a registry thru the UI
2. Ran `hammer -u admin -p password -d docker registry info --id 1` and checked the API results.
The API is now returning the username field and value, but the CLI output is not showing it. CLI side will be handled by a new issue if some already exist for this.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2015:2474