Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1359665 - Content-view filter and content-view update cmds should not requires --organization-id or --organization option
Content-view filter and content-view update cmds should not requires --organi...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Views (Show other bugs)
6.2.0
Unspecified Unspecified
unspecified Severity high (vote)
: 6.2.1
: Unused
Assigned To: Andrew Kofink
jcallaha
http://projects.theforeman.org/issues...
: Regression, Triaged
Depends On:
Blocks: 1463516
  Show dependency treegraph
 
Reported: 2016-07-25 05:14 EDT by Sachin Ghai
Modified: 2018-08-31 11 EDT (History)
9 users (show)

See Also:
Fixed In Version: tfm-rubygem-hammer_cli_katello-0.0.22.25-1
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1463516 (view as bug list)
Environment:
Last Closed: 2016-08-16 03:11:37 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 15889 None None None 2016-07-28 14:00 EDT
Red Hat Product Errata RHBA-2016:1615 normal SHIPPED_LIVE Satellite 6.2.1 bug fix update 2016-08-16 07:09:48 EDT

  None (edit)
Description Sachin Ghai 2016-07-25 05:14:12 EDT
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 03:09:16 EDT
Is this generic hammer or content specific bug?
Comment 5 Martin Bacovsky 2016-07-26 07:25:00 EDT
It is content specific, probably related to the bugs mentioned in c#1
Comment 6 Andrew Kofink 2016-07-28 13:15:04 EDT
Created redmine issue http://projects.theforeman.org/issues/15889 from this bug
Comment 7 jcallaha 2016-08-04 11:41:22 EDT
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 03:11:37 EDT
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.