Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1395254

Summary: Hostgroup create/update does not accept --lifecycle-environment parameter
Product: Red Hat Satellite Reporter: Stanislav Tkachenko <stkachen>
Component: Content ManagementAssignee: Andrew Kofink <akofink>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3.0CC: abalakht, akofink, bbuckingham, dlezzoum, inecas, jcallaha
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:49:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stanislav Tkachenko 2016-11-15 14:14:33 UTC
Description of problem:
It is not possible to provide LIFECYCLE_ENVIRONMENT_NAME to 'hammer hostgroup create' as it complains that organization not found though organization id is provided, only LIFECYCLE_ENVIRONMENT_ID is accepted.

On 6.2 it was possible to specify '--organization-id' parameter but it is not available anymore. Parameter '--lifecycle-environment-organization-id' that was used in upstream also not available. So it is not possible to use '--lifecycle-environment' at all.

1. Provide LCE name and organization id
> hammer> hostgroup create --lifecycle-environment="TS3A9O" --organization-ids="47" --name="test"
> Could not create the hostgroup:
>  Error: Could not find organization, please set one of options --organizations, --organization-ids.

2. Check LCE id
> hammer> lifecycle-environment info --name="TS3A9O" --organization-id=47
> ID:                          54
> Name:                        TS3A9O

3. Provide LCE id via --lifecycle-environment-id parameter
> hammer> hostgroup create --lifecycle-environment-id=54 --organization-ids=47 --name="inCpTB"
> Hostgroup created


Version-Release number of selected component (if applicable):
Satellite 6.3.0 Snap 3.0, Foreman 1.13.1-1

How reproducible:
Always


Steps to Reproduce:
1. 
2.
3.

Actual results:
Hostgroup is not created when providing LIFECYCLE_ENVIRONMENT_NAME.
Hammer complains that --organizations or --organization-ids parameter was not provided but they was.

Expected results:
Hostgroup should be created with both available options (with '--lifecycle-environment' just as with --lifecycle-environment-id if organization id/name was provided)


Additional info:

Comment 5 Andrew Kofink 2016-12-09 18:29:10 UTC
Created redmine issue http://projects.theforeman.org/issues/17619 from this bug

Comment 6 Bryan Kearney 2016-12-09 19:04:39 UTC
Upstream bug component is Content Management

Comment 7 Bryan Kearney 2016-12-12 21:04:30 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17619 has been resolved.

Comment 8 Djebran Lezzoum 2017-06-22 06:49:44 UTC
passed automation test on satellite 6.3.0 snap 3

Comment 9 Satellite Program 2018-02-21 16:49:54 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