Bug 1201352 - The content-view-version param in the CLI is interfering with commands
Summary: The content-view-version param in the CLI is interfering with commands
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: Unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Christine Fouant
QA Contact: Tazim Kolhar
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-12 14:28 UTC by David Davis
Modified: 2017-02-23 20:19 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-12 14:01:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 9736 0 None None None 2016-04-22 14:56:22 UTC

Description David Davis 2015-03-12 14:28:31 UTC
Description of problem:

Some commands in the CLI are passing content-view-version-id to the API when they shouldn't.

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

All

How reproducible:

Always


Steps to Reproduce:
1. Create a content view with some errata and promote it out of Library into another env (ie Dev)
2. Run the command to list errata for this environment:

hammer erratum list  --organization "Default Organization" --environment "Dev"

Actual results:

You either get no results (if you have one cvv in Dev) or 'Error: content_view_version found more than once'

Expected results:

I should see all the errata in Dev.

Additional info:

It appears that the CLI is trying to always look up content-view-version when it see environment. Another command to test is:

hammer erratum list  --organization "Default Organization" --environment "Dev" --content-view MyErrataCV

This should show me all the errata in Dev and MyErrataCV.

Comment 2 Partha Aji 2015-03-12 20:17:50 UTC
Created redmine issue http://projects.theforeman.org/issues/9736 from this bug

Comment 3 Christine Fouant 2015-03-30 15:53:56 UTC
Hi David - 
I don't think we give out errata based on content view, only on versions or environment. I see and agree with the first portion of this bug, but the second statement that:

hammer erratum list  --organization "Default Organization" --environment "Dev" --content-view MyErrataCV

should provide all the errata is false I believe. Can you verify?

Comment 4 David Davis 2015-04-02 18:57:04 UTC
Not 100% sure what you're asking. However, to clarify, if I run this:

hammer erratum list  --organization "Default Organization" --environment "Dev" --content-view MyErrataCV


I'd expect to see all the errata for MyErrataCV in Dev. Does that make sense?

Comment 5 Bryan Kearney 2015-04-07 18:05:49 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/9736 has been closed
-------------
Christine Fouant
Applied in changeset commit:hammer-cli-katello|b05270a665c8bd63c2a45f2b6c9608fb983ddc52.

Comment 7 Tazim Kolhar 2015-04-24 10:16:52 UTC
FAILEDQA:

# rpm -qa | grep foreman
foreman-libvirt-1.7.2.17-1.el6_6sat.noarch
ruby193-rubygem-foreman_bootdisk-4.0.2.10-1.el6_6sat.noarch
ruby193-rubygem-foreman_hooks-0.3.7-2.el6_6sat.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3.3-1.el6_6sat.noarch
rubygem-hammer_cli_foreman_bootdisk-0.1.2.5-1.el6_6sat.noarch
foreman-postgresql-1.7.2.17-1.el6_6sat.noarch
foreman-debug-1.7.2.17-1.el6_6sat.noarch
foreman-1.7.2.17-1.el6_6sat.noarch
foreman-ovirt-1.7.2.17-1.el6_6sat.noarch
ruby193-rubygem-foreman-tasks-0.6.12.3-1.el6_6sat.noarch
foreman-proxy-1.7.2.4-1.el6_6sat.noarch
qe-sat6-rhel66.usersys.redhat.com-foreman-client-1.0-1.noarch
qe-sat6-rhel66.usersys.redhat.com-foreman-proxy-client-1.0-1.noarch
foreman-selinux-1.7.2.13-1.el6_6sat.noarch
rubygem-hammer_cli_foreman-0.1.4.9-1.el6_6sat.noarch
foreman-compute-1.7.2.17-1.el6_6sat.noarch
foreman-vmware-1.7.2.17-1.el6_6sat.noarch
ruby193-rubygem-foreman-redhat_access-0.1.0-1.el6_6sat.noarch
ruby193-rubygem-foreman_gutterball-0.0.1.9-1.el6_6sat.noarch
qe-sat6-rhel66.usersys.redhat.com-foreman-proxy-1.0-2.noarch
ruby193-rubygem-foreman_docker-1.2.0.9-1.el6_6sat.noarch
rubygem-hammer_cli_foreman_discovery-0.0.1.7-1.el6_6sat.noarch
foreman-gce-1.7.2.17-1.el6_6sat.noarch
ruby193-rubygem-foreman_discovery-2.0.0.9-1.el6_6sat.noarch

1. Create a content view with some errata and promote it out of Library into another env (ie Dev)

 hammer erratum list --organization-id 1 --environment DEV --content-view con_viewB
[Foreman] Username: admin
[Foreman] Password for admin: 
---|-----------|------|------
ID | ERRATA ID | TYPE | TITLE
---|-----------|------|------

Comment 8 Christine Fouant 2015-04-27 15:49:49 UTC
Tested on 6.1.0-snap 1-compose 2 with passing results.

 hammer erratum list --organization-id 1 --environment Dev --content-view cv1
-------------------------------------|----------------|-------------|-----------------------------------------------------------------------------
ID                                   | ERRATA ID      | TYPE        | TITLE                                                                       
-------------------------------------|----------------|-------------|-----------------------------------------------------------------------------
f06b7880-88f3-4aee-90f5-9997e1c6fc2a | RHBA-2015:0814 | bugfix      | ceph-common bug fix and enhancement update                                  
882301f7-698f-43dd-8436-5b2eec592258 | RHBA-2015:0725 | bugfix      | glusterfs native client enhancement update for Red Hat Storage 3.0 update #4
c73ed83e-7bf9-4a23-9e64-320929f396d0 | RHBA-2015:0713 | bugfix      | ceph-common bug fix and enhancement update                                  
52872a86-7810-47e6-9f58-703a9ebdd10c | RHBA-2015:0648 | bugfix      | rhel-guest-image bug fix and enhancement update                             
2e67a395-9c29-460e-aaae-b26998234571 | RHEA-2015:0233 | enhancement | rhevm-guest-agent bug fix and enahncement update
...

hammer erratum list --organization-id 1 --environment Dev
-------------------------------------|----------------|-------------|-----------------------------------------------------------------------------
ID                                   | ERRATA ID      | TYPE        | TITLE                                                                       
-------------------------------------|----------------|-------------|-----------------------------------------------------------------------------
f06b7880-88f3-4aee-90f5-9997e1c6fc2a | RHBA-2015:0814 | bugfix      | ceph-common bug fix and enhancement update                                  
882301f7-698f-43dd-8436-5b2eec592258 | RHBA-2015:0725 | bugfix      | glusterfs native client enhancement update for Red Hat Storage 3.0 update #4
c73ed83e-7bf9-4a23-9e64-320929f396d0 | RHBA-2015:0713 | bugfix      | ceph-common bug fix and enhancement update                                  
52872a86-7810-47e6-9f58-703a9ebdd10c | RHBA-2015:0648 | bugfix      | rhel-guest-image bug fix and enhancement update                             
2e67a395-9c29-460e-aaae-b26998234571 | RHEA-2015:0233 | enhancement | rhevm-guest-agent bug fix and enahncement update                            
779f95e6-0503-4812-a374-f4f25ef4ade1 | RHBA-2015:0221 | bugfix      | rhel-guest-image update                                                     
3bb80f48-73e0-4624-8c61-16127cc5bf1e | RHBA-2015:0170 | bugfix      | glusterfs native client enhancement async update                            
92c4c980-21d0-441d-8500-e8ee62e0fdc9 | RHBA-2015:0040 | bugfix      | glusterfs enhancement update                                                
996665e2-02fb-4d99-a3e6-fd7d137317a9 | RHEA-2015:0041 | enhancement | new package: cloud-init                                                     
f608bf90-12fa-42cb-9f5f-0961c2cfb972 | RHBA-2014:1899 | bugfix      | Red Hat Satellite 6 katello-agent bug fix update                            
96f07848-2638-426f-9c51-72c3494e2098 | RHBA-2014:1675 | bugfix      | rhel-guest-image update                 
...

I also created a new version without errata in Library and got correct results:

hammer erratum list --organization-id 1 --environment Library --content-view cv1
---|-----------|------|------
ID | ERRATA ID | TYPE | TITLE
---|-----------|------|------

Please check again, and give more information (what repo, list of applicable errata) if it is failing.

Comment 9 Tazim Kolhar 2015-04-28 10:43:48 UTC
VERIFIED 

# rpm -qa | grep foreman
foreman-libvirt-1.7.2.17-1.el6_6sat.noarch
ruby193-rubygem-foreman_bootdisk-4.0.2.10-1.el6_6sat.noarch
ruby193-rubygem-foreman_hooks-0.3.7-2.el6_6sat.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3.3-1.el6_6sat.noarch
rubygem-hammer_cli_foreman_bootdisk-0.1.2.5-1.el6_6sat.noarch
foreman-postgresql-1.7.2.17-1.el6_6sat.noarch
foreman-debug-1.7.2.17-1.el6_6sat.noarch
foreman-1.7.2.17-1.el6_6sat.noarch
foreman-ovirt-1.7.2.17-1.el6_6sat.noarch
ruby193-rubygem-foreman-tasks-0.6.12.3-1.el6_6sat.noarch
foreman-proxy-1.7.2.4-1.el6_6sat.noarch
qe-sat6-rhel66.usersys.redhat.com-foreman-client-1.0-1.noarch
qe-sat6-rhel66.usersys.redhat.com-foreman-proxy-client-1.0-1.noarch
foreman-selinux-1.7.2.13-1.el6_6sat.noarch
rubygem-hammer_cli_foreman-0.1.4.9-1.el6_6sat.noarch
foreman-compute-1.7.2.17-1.el6_6sat.noarch
foreman-vmware-1.7.2.17-1.el6_6sat.noarch
ruby193-rubygem-foreman-redhat_access-0.1.0-1.el6_6sat.noarch
ruby193-rubygem-foreman_gutterball-0.0.1.9-1.el6_6sat.noarch
qe-sat6-rhel66.usersys.redhat.com-foreman-proxy-1.0-2.noarch
ruby193-rubygem-foreman_docker-1.2.0.9-1.el6_6sat.noarch
rubygem-hammer_cli_foreman_discovery-0.0.1.7-1.el6_6sat.noarch
foreman-gce-1.7.2.17-1.el6_6sat.noarch
ruby193-rubygem-foreman_discovery-2.0.0.9-1.el6_6sat.noarch


steps:
1. Create a content view with some errata and promote it out of Library into another env (ie Dev)
2. Run the command to list errata for this environment:

# hammer erratum list --organization-id 1 --environment DEV --content-view con_viewB
[Foreman] Username: admin
[Foreman] Password for admin: 
-------------------------------------|----------------|-------------|-------------------------------------------------
ID                                   | ERRATA ID      | TYPE        | TITLE                                           
-------------------------------------|----------------|-------------|-------------------------------------------------
3ee277b4-23ca-4d3a-a211-3d208615a567 | RHBA-2013:1253 | bugfix      | rhevm-guest-agent bug fix update                
aa378323-ed0b-40b3-afa8-43e2d1524a96 | RHBA-2013:0991 | bugfix      | rhevm-guest-agent bug fix update                
1dea4e33-6d0c-4ab1-bd7a-d25d30457de7 | RHEA-2013:0914 | enhancement | rhevm-guest-agent bug fix and enhancement update
1ef2a3e3-3b59-42ce-a3b3-5dfdf0618d82 | RHBA-2013:0794 | bugfix      | rhevm-guest-agent bug fix update                
ff53af0c-e98c-49fc-9734-70ba6cb6224a | RHEA-2012:1600 | enhancement | rhevm-guest-agent bug fix and enhancement update
9c7b8bc4-ef7d-4cec-9979-248fc8ae0ba6 | RHBA-2012:1076 | bugfix      | rhev-agent bug fix update                       
875b0506-5ffa-46cd-9b6a-0f4ea6650289 | RHBA-2012:0707 | bugfix      | rhev-agent bug fix update                       
aa93bd3e-10f2-40ef-bd34-31893b575d10 | RHEA-2011:1825 | enhancement | new packages: rhev-agent                        
-------------------------------------|----------------|-------------|-------------------------------------------------

Comment 10 Bryan Kearney 2015-08-11 13:26:48 UTC
This bug is slated to be released with Satellite 6.1.

Comment 11 Bryan Kearney 2015-08-12 14:01:12 UTC
This bug was fixed in version 6.1.1 of Satellite which was released on 12 August, 2015.


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