Bug 1699040 - hammer package with version "tfm-rubygem-hammer_cli-" gives less information for host as compare to previous version .
Summary: hammer package with version "tfm-rubygem-hammer_cli-"...
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer
Version: 6.4.2
Hardware: Unspecified
OS: Unspecified
low vote
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: vijsingh
Depends On:
TreeView+ depends on / blocked
Reported: 2019-04-11 15:35 UTC by Sunayana
Modified: 2019-08-12 19:32 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-08-12 17:43:23 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1596504 None CLOSED hammer hostgroup info --output json returns json including non unique keys 2019-08-12 17:43:22 UTC

Description Sunayana 2019-04-11 15:35:15 UTC
Description of problem:
Below hammer command gives different output in latest version:tfm-rubygem-hammer_cli-0.13.1-1.el7sat.noarch as compared to previous versions:

# hammer --output json host list --search "has_mac = <MAC Address>"

Version-Release number of selected component (if applicable):
Satellite 6.4 

How reproducible:
100% reproducible

Steps to Reproduce:
1. Satellite 6.4 with hammer version as "tfm-rubygem-hammer_cli-", when below command is executed, it gives below output:

[root@vm251-57 ~]# hammer --output json host list --search "has_mac = 52:54:00:b4:b1:3f"
    "Id": 2,
    "Name": "client3",
    "Operating System": {
      "Name": "RedHat 7.4",
      "Id": 2
    "IP": "",
    "MAC": "52:54:00:b4:b1:3f",
    "Content View": "Default Organization View",
    "Lifecycle Environment": "Library"

2. When same command is executed with previous version "tfm-rubygem-hammer_cli-" gives output in detail (Satellite 6.2)

[root@syssat62 ~]# hammer --output json host list --search "has_mac = 00:1a:4a:00:01:10"
[Foreman] Password for admin: 
    "Id": 21,
    "Name": "client2.example.com",
    "Operating System": {
      "ip": "",
      "environment_id": null,
      "environment_name": null,
      "last_report": null,
      "mac": "00:1a:4a:00:01:10",
      "realm_id": null,
      "realm_name": null,
      "sp_mac": null,
      "sp_ip": null,
      "sp_name": null,
      "domain_id": null,
      "domain_name": null,
      "architecture_id": 1,
      "architecture_name": "x86_64",
      "operatingsystem_id": 2,
      "operatingsystem_name": "RedHat 7.2",
      "subnet_id": null,
      "subnet_name": null,
      "sp_subnet_id": null,
      "ptable_id": null,
      "ptable_name": null,
      "medium_id": null,
      "medium_name": null,
      "build": false,
      "comment": null,
      "disk": null,
      "installed_at": null,
      "model_id": 2,
      "hostgroup_id": null,
      "owner_id": 3,
      "owner_type": "User",
      "enabled": true,
      "puppet_ca_proxy_id": null,
      "managed": false,
      "use_image": null,
      "image_file": "",
      "uuid": null,
      "compute_resource_id": null,
      "compute_resource_name": null,
      "compute_profile_id": null,
      "compute_profile_name": null,
      "capabilities": [
      "provision_method": "build",
      "puppet_proxy_id": null,
      "certname": "client2.example.com",
      "image_id": null,
      "image_name": null,
      "created_at": "2019-02-21 00:06:20 UTC",
      "updated_at": "2019-04-10 06:06:32 UTC",
      "last_compile": "2019-02-21 00:06:24 UTC",
      "global_status": 1,
      "global_status_label": "Warning",
      "organization_id": 1,
      "organization_name": "redhat",
      "location_id": 2,
      "location_name": "pune",
      "puppet_status": 0,
      "model_name": "RHEV Hypervisor",
      "errata_status": 1,
      "errata_status_label": "Could not calculate errata status, ensure host is registered and katello-agent is installed",
      "subscription_status": 0,
      "subscription_status_label": "Fully entitled",
      "name": "client2.example.com",
      "id": 21,
      "hostgroup_name": null,
      "hostgroup_title": null,
      "content_facet_attributes": {
        "id": 3,
        "uuid": "79486f91-6c96-4742-a9c3-e9099101bfae",
        "content_view_id": 1,
        "content_view_name": "Default Organization View",
        "lifecycle_environment_id": 1,
        "lifecycle_environment_name": "Library",
        "content_view": {
          "id": 1,
          "name": "Default Organization View"
        "lifecycle_environment": {
          "id": 1,
          "name": "Library"
        "errata_counts": {
          "security": 0,
          "bugfix": 0,
          "enhancement": 0,
          "total": 0
      "subscription_facet_attributes": {
        "id": 18,
        "uuid": "79486f91-6c96-4742-a9c3-e9099101bfae",
        "last_checkin": "2019-02-21 16:24:11 UTC",
        "service_level": null,
        "release_version": null,
        "autoheal": true,
        "registered_at": "2019-02-21 00:06:21 UTC",
        "user": null
      "content_host_id": 18
    "IP": "",
    "MAC": "00:1a:4a:00:01:10"

Actual results:   

Host info with less details:

    "Id": 2,
    "Name": "client3",
    "Operating System": {
      "Name": "RedHat 7.4",
      "Id": 2
    "IP": "",
    "MAC": "52:54:00:b4:b1:3f",
    "Content View": "Default Organization View",
    "Lifecycle Environment": "Library"

Expected results:

Host info in detail as per previous version:

Additional info:

Patch is already present in Satellite 6.5 to fix the same.

Comment 3 Oleh Fedorenko 2019-08-12 17:43:23 UTC
This is related to https://bugzilla.redhat.com/show_bug.cgi?id=1596504.

I'm closing this as NOTABUG, since this is caused by fix from #1596504 (the actual problem was in unrelated/undesired information in hammer's output, so I wouldn't consider it as a regression). Also, I can't reproduce this bug on hammer-cli-0.13.1 with hammer-cli-foreman-0.13.1. This appears to be in hammer-cli(-foreman)-0.15.0 and newer versions.

If this is still a valid issue, reopen or create a new bug/rfe with a list of desired fields (additional information) in output.

Note You need to log in before you can comment on or make changes to this bug.