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 1713222 - Hammer host/hg create/edit --environment is masked
Summary: Hammer host/hg create/edit --environment is masked
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer - Content
Version: 6.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.6.0
Assignee: Oleh Fedorenko
QA Contact: Roman Plevka
URL:
Whiteboard:
: 1715992 (view as bug list)
Depends On: 1730026
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-23 07:54 UTC by Lukas Zapletal
Modified: 2019-10-22 13:32 UTC (History)
15 users (show)

Fixed In Version: tfm-rubygem-hammer_cli_foreman-0.17.0.3-1,tfm-rubygem-hammer_cli_katello-0.18.0.2-1
Doc Type: Deprecated Functionality
Doc Text:
The `--environment` and `--environment-id` options of the `hammer` command are deprecated because of confusion between lifecycle and Puppet environments. Use the `--lifecycle-environment` or `--puppet-environment` options instead.
Clone Of:
Environment:
Last Closed: 2019-10-22 13:30:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 23204 0 Normal Closed inconsitent puppet environment naming in hammer 2020-06-17 12:23:57 UTC
Red Hat Product Errata RHBA-2019:3175 0 None None None 2019-10-22 13:32:42 UTC

Description Lukas Zapletal 2019-05-23 07:54:51 UTC
Hello, regression from 6.5:

hammer hostgroup create --name xxx ... --environment production
Hostgroup created.

In 6.6 however:

hammer hostgroup create --name xxx ... --environment production
Could not create the hostgroup:
  Error: lifecycle_environment not found.

Apparently something made hammer think that --environment is actually --lifecycle-environment:

hammer hostgroup create --name xxx ... --environment Library
Hostgroup created.

Unable to crate hosts or hostgroups, blocker, regression.

Comment 3 Jonathon Turel 2019-06-19 19:36:05 UTC
*** Bug 1715992 has been marked as a duplicate of this bug. ***

Comment 4 Bryan Kearney 2019-07-02 08:08:06 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/23204 has been resolved.

Comment 7 Mirek Długosz 2019-07-15 15:53:28 UTC
These patches caused https://bugzilla.redhat.com/show_bug.cgi?id=1730026 . More bugs might be coming as we discover them.

Comment 8 Peter Ondrejka 2019-07-16 08:07:43 UTC
When pulling in such changes we should consider the downstream documentation impact, certainly 6.6 versions of [1] and [2] will be affected. Oleh, could you please file a bz against documentation detailing the scope of changes so that the docs guys have time to sort it out before release?

Also I'd say the problem in comment #7 is a blocker for this bz.

[1]https://access.redhat.com/documentation/en-us/red_hat_satellite/6.5/html-single/hammer_cli_guide/index
[2]https://access.redhat.com/documentation/en-us/red_hat_satellite/6.5/html/hammer_cheat_sheet/index

Comment 11 Roman Plevka 2019-08-07 06:53:50 UTC
VERIFIED
on beta snap,

verified by automation:
tests/foreman/cli/test_hostgroup.py::HostGroupTestCase::test_positive_create_with_multiple_entities_and_delete

```
hammer -v -u admin -p changeme --output=csv environment create --location-ids="463" --name="jZlJEl" --organization-ids="465"'
2019-08-02 14:29:18 - robottelo.ssh - INFO - <<< stdout
Message,Id,Name
Environment created.,119,jZlJEl
...
hammer -v -u admin -p changeme --output=csv hostgroup create --architecture="gfNbrbPQDs" --content-source-id="1" --content-view="UsCDcgHsQO" --domain="fe9saudcec" --environment="jZlJEl" --locations="y0OMVUqkUX" --lifecycle-environment="4AMfy0" --medium="iElooq" --name="NDqnTcvtqgIElqlRMuToWWchPxXvlJGMGROYgcnTKyNsBdCCzeTbqVgmNNL" --operatingsystem="022mdv 3.6" --organization-ids="465,448" --partition-table="DaMr20Zamo" --puppet-ca-proxy="qe-sat66-*.redhat.com" --puppet-classes="generic_1" --puppet-proxy="qe-sat66-*.redhat.com" --query-organization="pjU7gk" --subnet="U6jLIFko"'
2019-08-02 14:30:28 - robottelo.ssh - INFO - <<< stdout
Message,Id,Name
Hostgroup created.,50,NDqnTcvtqgIElqlRMuToWWchPxXvlJGMGROYgcnTKyNsBdCCzeTbqVgmNNL
...
hammer -v -u admin -p changeme hostgroup info --id="50"'
2019-08-02 14:30:31 - robottelo.ssh - INFO - <<< stdout
Id: 50
Name: NDqnTcvtqgIElqlRMuToWWchPxXvlJGMGROYgcnTKyNsBdCCzeTbqVgmNNL
Title: NDqnTcvtqgIElqlRMuToWWchPxXvlJGMGROYgcnTKyNsBdCCzeTbqVgmNNL
Puppet Environment: jZlJEl
...
```

Comment 16 errata-xmlrpc 2019-10-22 13:30:45 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-2019:3175


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