Bug 1270659 - hammer throws error "Uuid can't be blank" while adding groups to a content view filter
Summary: hammer throws error "Uuid can't be blank" while adding groups to a content vi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.1.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: Unspecified
Assignee: Nagoor Shaik
QA Contact: Ondřej Pražák
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-12 05:13 UTC by Nagoor Shaik
Modified: 2020-07-16 08:37 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:51:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Segment from /var/log/foreman/production.log (2.32 KB, text/plain)
2016-01-14 06:23 UTC, Dan Macpherson
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 18499 0 None None None 2017-02-14 18:03:30 UTC

Description Nagoor Shaik 2015-10-12 05:13:01 UTC
Description of problem:
hammer throws error "Uuid can't be blank" while adding groups to a content view filter of content type "Package Group"

Version-Release number of selected component (if applicable):
Red Hat Satellite 6.1.2
rubygem-hammer_cli-0.1.4.12-1.el7sat.noarch

How reproducible:
100 %

Steps to Reproduce:

# export ORG=RedHat
# export CV=SOE-RHEL7

# hammer content-view create --name $CV --description "RHEL7 Content View for SOE" --organization $ORG

# hammer content-view add-repository --organization $ORG --name $CV --repository "Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server" --product "Red Hat Enterprise Linux Server"

# hammer content-view filter create --organization $ORG --content-view $CV --name "SOE Package Groups"  --description "Package Groups needed for SOE"  --inclusion true --type package_group

# hammer content-view filter rule create --organization $ORG --content-view $CV --content-view-filter "SOE Package Groups" --name Core
Could not create the filter rule:
  Validation failed: Uuid can't be blank

Note: The base group here in RHEL7 is called Core

Here are the logs captured when adding the package group from the webUI

 #  grep Core /var/log/foreman/production.log
2015-10-06 16:22:29 [I]   Parameters: {"name"=>"Core", "api_version"=>"v2", "content_view_filter_id"=>"1", "content_view_filter_rule"=>{"name"=>"Core"}}
2015-10-06 16:24:27 [I]   Parameters: {"uuid"=>"f402611b-0125-4a94-ae14-363edc8c638d", "name"=>"Core", "api_version"=>"v2", "content_view_filter_id"=>"1", "content_view_filter_rule"=>{"uuid"=>"f402611b-0125-4a94-ae14-363edc8c638d", "name"=>"Core"}}
2015-10-06 16:26:03 [I]   Parameters: {"uuid"=>"f402611b-0125-4a94-ae14-363edc8c638d", "name"=>"Core", "api_version"=>"v2", "content_view_filter_id"=>"1", "content_view_filter_rule"=>{"uuid"=>"f402611b-0125-4a94-ae14-363edc8c638d", "name"=>"Core"}}

 # hammer content-view filter rule create --organization $ORG --content-view $CV --content-view-filter "SOE Package Groups" --help
Usage:
    hammer content-view filter rule create [OPTIONS]

Options:
 --content-view CONTENT_VIEW_NAME                Content view name
 --content-view-filter CONTENT_VIEW_FILTER_NAME  Name to search by
 --content-view-filter-id CONTENT_VIEW_FILTER_ID filter identifier
 --content-view-id CONTENT_VIEW_ID               content view numeric identifier
 --end-date END_DATE                             erratum: end date (YYYY-MM-DD)
 --errata-id ERRATA_ID                           erratum: id
 --errata-ids ERRATA_IDS                         erratum: IDs or a select all object
                                                 Comma separated list of values.
 --max-version MAX_VERSION                       package: maximum version
 --min-version MIN_VERSION                       package: minimum version
 --name NAME                                     package or package group: name
 --organization ORGANIZATION_NAME                Organization name to search by
 --organization-id ORGANIZATION_ID               organization ID
 --organization-label ORGANIZATION_LABEL         Organization label to search by
 --start-date START_DATE                         erratum: start date (YYYY-MM-DD)
 --types TYPES                                   erratum: types (enhancement, bugfix, security)
                                                 Comma separated list of values.
 --version VERSION                               package: version
 -h, --help                                      print help


As hammer command is expecting a parameter uuid which is not listed in the hammer command help, causing it to fail.

Actual results:
hammer fails as its expecting a UUID to be passed along with the name for package group

Expected results:
Either UUID should enabled in the hammer 

Additional info:

Comment 2 Justin Sherrill 2015-12-07 05:21:46 UTC
There does not seem to be a workaround for 6.1.z

Proposing for 6.1.z and removing triage.

Comment 4 Dan Macpherson 2016-01-14 06:22:35 UTC
Had the same issue:

[root@satvirt log]# hammer -u admin -p Redhat123 content-view filter rule create --content-view "Base" --content-view-filter "Base Package Group" --name "Base" --organization "ACME"
Could not create the filter rule:
  Validation failed: Uuid can't be blank

[root@satvirt log]# hammer -u admin -p Redhat123 content-view filter rule create --content-view "Base" --content-view-filter-id 13 --name "Base" --organization "ACME"
Could not create the filter rule:
  Validation failed: Uuid can't be blank

Attaching the /var/log/foreman/production.log file segment of the interaction. Doesn't really provide much details on what's requiring the UUID.

Comment 5 Dan Macpherson 2016-01-14 06:23:25 UTC
Created attachment 1114683 [details]
Segment from /var/log/foreman/production.log

Comment 6 Bryan Kearney 2016-07-26 15:25:24 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 7 Bryan Kearney 2016-07-26 15:39:56 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 10 Satellite Program 2017-02-17 21:07:28 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18499 has been resolved.

Comment 11 Brad Buckingham 2017-02-28 17:00:02 UTC
Updating assignee, since Nagoor submitted a fix upstream.  Thanks Nagoor!

Comment 12 Ondřej Pražák 2017-08-16 12:53:18 UTC
Verified.

6.3.0 snap 11

Comment 13 Bryan Kearney 2018-02-21 16:43:29 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/RHSA-2018:0336

Comment 14 Satellite Program 2018-02-21 16:51:07 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/RHSA-2018:0336


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