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.
Bug 1359665 - Content-view filter and content-view update cmds should not requires --organization-id or --organization option
Summary: Content-view filter and content-view update cmds should not requires --organi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Views
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Andrew Kofink
QA Contact: jcallaha
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks: 1463516
TreeView+ depends on / blocked
 
Reported: 2016-07-25 09:14 UTC by Sachin Ghai
Modified: 2019-06-13 21:25 UTC (History)
9 users (show)

Fixed In Version: tfm-rubygem-hammer_cli_katello-0.0.22.25-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1463516 (view as bug list)
Environment:
Last Closed: 2016-08-16 07:11:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 15889 0 Normal Closed Content-view filter and content-view update cmds should not requires --organization-id or --organization option 2020-10-29 21:19:06 UTC
Red Hat Product Errata RHBA-2016:1615 0 normal SHIPPED_LIVE Satellite 6.2.1 bug fix update 2016-08-16 11:09:48 UTC

Description Sachin Ghai 2016-07-25 09:14:12 UTC
Description of problem:
In ou automation we saw that bunch of cv filter and CV update tests are failing with below error:

 Error: Could not find organization, please set one of options --organization, --organization-label, --organization-id.


Earlier, automation was executing those tests without this error. I tried those tests manually and found same error like:


Create CV filter requires --organization/--organization-label/--organization-id.

----
 ~]# hammer -v -u admin -p changeme --output=csv content-view filter create --type="rpm" --content-view-id="1" --name="test" --inclusion="true"
[ERROR 2016-07-25 01:57:53 Exception] Error: Could not find organization, please set one of options --organization, --organization-label, --organization-id.
Could not create the filter:
  Error: Could not find organization, please set one of options --organization, --organization-label, --organization-id.
-----

with --organization-id it was created. However, I think it should be created without passing --organization-id option since we are passing cv id.

~]# hammer -v -u admin -p changeme --output=csv content-view filter create --type="rpm" --content-view-id="1" --name="test" --inclusion="true" --organization-id=1
Message,Id,Name
Filter created,1,test


Similar issue with following cmds:

- content-view update
- cv filter create/update/delete 


2016-07-23 17:52:31 - robottelo.ssh - DEBUG - >>> [qe-sat6-rhel6.satqe.lab.eng.rdu2.redhat.com] LANG=en_US.UTF-8  hammer -v -u admin -p changeme --output=csv content-view update --component-ids="327" --id="355"
2016-07-23 17:52:31 - robottelo.ssh - INFO - Instantiated Paramiko client 0x7f698efcfcd0
2016-07-23 17:52:33 - robottelo.ssh - INFO - Destroying Paramiko client 0x7f698efcfcd0
2016-07-23 17:52:33 - robottelo.ssh - INFO - Destroyed Paramiko client 0x7f698efcfcd0
2016-07-23 17:52:33 - robottelo.ssh - DEBUG - <<< stderr
[ERROR 2016-07-23 17:52:33 Exception] Error: Could not find organization, please set one of options --organization, --organization-label, --organization-id.
Could not update the content view:
  Error: Could not find organization, please set one of options --organization, --organization-label, --organization-id.
[ERROR 2016-07-23 17:52:33 Exception] 


Version-Release number of selected component (if applicable):
sat62 GA snap21.1 RC build

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
cv filter create/update/delete cmds requires --organization-id option 

Expected results:
--organization-id was not required earlier. Moreover when user is passing CV-id then explicitly --organization/otganization-id option should not be required.

similar issue is with cv update, why user need to pass --organization-id

Additional info:

Comment 4 Ivan Necas 2016-07-26 07:09:16 UTC
Is this generic hammer or content specific bug?

Comment 5 Martin Bacovsky 2016-07-26 11:25:00 UTC
It is content specific, probably related to the bugs mentioned in c#1

Comment 6 Andrew Kofink 2016-07-28 17:15:04 UTC
Created redmine issue http://projects.theforeman.org/issues/15889 from this bug

Comment 7 jcallaha 2016-08-04 15:41:22 UTC
Verified in Satellite 6.2.1

[root@ibm-x3550m3-10 puppet]# hammer -v --output=csv content-view filter create --type="rpm" --content-view-id="1" --name="test" --inclusion="true"
Message,Id,Name
Filter created,1,test

Comment 9 errata-xmlrpc 2016-08-16 07:11:37 UTC
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-2016:1615


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