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 1325113 - hammer fails to remove LCE from a CV if cv_id+org_id or cv_name+org_name are specified
Summary: hammer fails to remove LCE from a CV if cv_id+org_id or cv_name+org_name are ...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Views
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: Zach Huntington-Meath
QA Contact:
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-08 09:43 UTC by Andrii Balakhtar
Modified: 2018-09-04 17:46 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-04 17:46:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 14708 0 None None None 2016-04-22 16:00:43 UTC

Description Andrii Balakhtar 2016-04-08 09:43:57 UTC
Description of problem:
Hammer fails to delete a lifecycle environment from content view if content view was specified by both CV id and organization id. Specifying cv id + org id is not mandatory, as cv id is unique and it should be sufficient for determining desired cv, but anyway exception shouldn't be risen when user also includes org id.
Other use cases like specifying only cv id or cv name + org id are working as expected.

Version-Release number of selected component (if applicable):
Sat6.2 Beta Snap6.2

How reproducible:
Always

Steps to Reproduce:
1. Create a content view:
hammer content-view create --organization-id="15" --name="VQnMGNiFIN"
2. Publish it:
hammer content-view publish --id="22"
3. Try to remove default Library lifecycle environment while specifying both content view id and organization id:
hammer content-view remove --id="22" --organization-id="15" --environment-ids="26"

Actual results:
[ERROR 2016-04-08 05:14:20 Exception] Error: undefined method `include?' for nil:NilClass
Could not remove objects from content view:
  Error: undefined method `include?' for nil:NilClass
[ERROR 2016-04-08 05:14:20 Exception] 

NoMethodError (undefined method `include?' for nil:NilClass):
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.0.22.5/lib/hammer_cli_katello/id_resolver.rb:65:in `block in environment_ids'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.0.22.5/lib/hammer_cli_katello/id_resolver.rb:65:in `select'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.0.22.5/lib/hammer_cli_katello/id_resolver.rb:65:in `environment_ids'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1.3/lib/hammer_cli_foreman/commands.rb:165:in `get_resource_ids'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1.3/lib/hammer_cli_foreman/commands.rb:231:in `block in customized_options'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1.3/lib/hammer_cli_foreman/commands.rb:228:in `each'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1.3/lib/hammer_cli_foreman/commands.rb:228:in `customized_options'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1.3/lib/hammer_cli_foreman/commands.rb:243:in `request_params'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.0.22.5/lib/hammer_cli_katello/content_view.rb:183:in `request_params'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.4/lib/hammer_cli/apipie/command.rb:43:in `send_request'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1.3/lib/hammer_cli_foreman/commands.rb:189:in `send_request'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman_tasks-0.0.10/lib/hammer_cli_foreman_tasks/async_command.rb:14:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.4/lib/hammer_cli/abstract.rb:22:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.4/lib/hammer_cli/abstract.rb:22:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.4/lib/hammer_cli/abstract.rb:22:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.4/bin/hammer:125:in `<top (required)>'
    /usr/bin/hammer:23:in `load'
    /usr/bin/hammer:23:in `<main>'

Expected results:
Lifecycle environment was removed successfully

Additional info:

Comment 3 Andrii Balakhtar 2016-04-14 19:58:07 UTC
I was also able to reproduce it with org name + cv name combination, and that's pretty common use case so it's better to fix this. Short summary:

cv id              | OK
cv name + org id   | OK
cv name + org name | ERROR
cv id + org id     | ERROR

Comment 4 Zach Huntington-Meath 2016-04-19 13:52:20 UTC
Created redmine issue http://projects.theforeman.org/issues/14708 from this bug

Comment 6 Bryan Kearney 2018-09-04 17:46:18 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in the product in the foreseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.


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