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 1696155

Summary: puppet environment doesn't exist or is not assigned to proper organization and/or location
Product: Red Hat Satellite Reporter: Kenny Tordeurs <ktordeur>
Component: PuppetAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Vladimír Sedmík <vsedmik>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.5.0CC: andrew.schofield, inecas, oezr, pmoravec
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-09 17:02:24 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 Kenny Tordeurs 2019-04-04 08:58:53 UTC
Description of problem:
When trying to edit a host and submit:

puppet environment 'production'
~~~
with id 1 doesn't exist or is not assigned to proper organization and/or location
~~~

Version-Release number of selected component (if applicable):
Satellite 6.5 beta

Actual results:
puppet environment 'production'
~~~
with id 1 doesn't exist or is not assigned to proper organization and/or location
~~~

Expected results:
No errors

Additional info:
# hammer> environment list
~~~
[Foreman] Username: admin
[Foreman] Password for admin: 
---|-----------
ID | NAME      
---|-----------
1  | production
---|-----------
~~~

The production environment is assigned to the organization/location

Comment 5 Kenny Tordeurs 2019-04-10 07:50:40 UTC
Also prevents registration of new systems unless an AK is used:

~~~
# subscription-manager register
Registering to: ktordeur-sat65.sysmgmt.lan:443/rhsm
Username: admin
Password: 
Environment: Library
HTTP error (422 - Unknown): Validation failed: Environment with id 1 doesn't exist or is not assigned to proper organization and/or location
~~~

~~~
[root@ktordeur-sat65-tcp-haproxy-loadbalancer ~]# subscription-manager register --org="Default_Organization" --activationkey="RHEL7.6"
The system has been registered with ID: 27e4499c-5154-4468-8468-6802765b1977
The registered system name is: ktordeur-sat65-tcp-haproxy-loadbalancer.sysmgmt.lan
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed
~~~

Comment 6 Kenny Tordeurs 2019-04-10 07:53:40 UTC
Just as a followup to ensure there is no mix up with lifecycle environment:

Registered with AK
~~~
# subscription-manager identity
system identity: 27e4499c-5154-4468-8468-6802765b1977
name: ktordeur-sat65-tcp-haproxy-loadbalancer.sysmgmt.lan
org name: Default Organization
org ID: Default_Organization
environment name: Library
~~~

Client can fetch content:
~~~
# yum repolist -v
Not loading "rhnplugin" plugin, as it is disabled
Loading "product-id" plugin
Loading "search-disabled-repos" plugin
Loading "subscription-manager" plugin
Updating Subscription Management repositories.
Config time: 0.675
Yum version: 3.4.3
rhel-7-server-rpms                                                                                                                                                                          | 2.4 kB  00:00:00     
(1/3): rhel-7-server-rpms/7Server/x86_64/group                                                                                                                                              | 773 kB  00:00:00     
(2/3): rhel-7-server-rpms/7Server/x86_64/updateinfo                                                                                                                                         | 3.0 MB  00:00:00     
(3/3): rhel-7-server-rpms/7Server/x86_64/primary                                                                                                                                            |  34 MB  00:00:01     
rhel-7-server-rpms                                                                                                                                                                                     23918/23918
Setting up Package Sacks
pkgsack time: 0.010
Repo-id      : rhel-7-server-rpms/7Server/x86_64
Repo-name    : Red Hat Enterprise Linux 7 Server (RPMs)
Repo-revision: 1554123732
Repo-updated : Mon Apr  1 13:17:40 2019
Repo-pkgs    : 23,918
Repo-size    : 34 G
Repo-baseurl : https://ktordeur-sat65.sysmgmt.lan/pulp/repos/Default_Organization/Library/content/dist/rhel/server/7/7Server/x86_64/os/
Repo-expire  : 1 second(s) (last: Wed Apr 10 07:52:32 2019)
  Filter     : read-only:present
Repo-filename: /etc/yum.repos.d/redhat.repo

repolist: 23,918
~~~


hammer> environment list
---|-----------
ID | NAME      
---|-----------
1  | production
---|-----------

hammer> lifecycle-environment list
---|---------|------
ID | NAME    | PRIOR
---|---------|------
1  | Library |      
---|---------|------

Comment 7 Mike McCune 2021-06-08 21:14:25 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.

Comment 8 Mike McCune 2021-07-09 17:02:24 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this feel free to contact your Red Hat Account Team. Thank you.