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 1804943 - Cannot use hammer to update Capsule organization unless organization is already assigned
Summary: Cannot use hammer to update Capsule organization unless organization is alrea...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Foreman Proxy
Version: 6.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Lukas Zapletal
QA Contact: Vladimír Sedmík
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-19 22:42 UTC by Paul Dudley
Modified: 2023-09-07 21:57 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-15 14:25:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Paul Dudley 2020-02-19 22:42:01 UTC
Cannot use hammer to update Capsule organization unless a organization is already defined.

To reproduce,
- install new Capsule
- do not configure this Capsule in webui and attempt to set organization via hammer:
~~~
[root@boosat ~]# hammer capsule update --name boocap.hauntedhouse.local  --organizations ghost
Could not update the proxy:
  Resource smart_proxy not found by id '2'
~~~

After the organization is set in webui hammer works without issue:
~~~
[root@boosat ~]# hammer capsule update --name boocap.hauntedhouse.local --organizations ghost,test
Smart proxy updated.
~~~

Comment 3 Paul Dudley 2020-02-19 22:52:47 UTC
Notes:
Unsure of correct component for this. Apologies in advance.

This does not appear to be an issue in Satellite 6.7 beta:
- installed fresh Capsule. After installer finished on Capsule attempted to set organization:
~~~
[root@boosat ~]# hammer capsule update --name boocap.hauntedhouse.local --organizations ghost
Smart proxy updated.
~~~

Satellite:
[root@boosat ~]# rpm -q foreman foreman-proxy
foreman-1.24.1.1-1.el7sat.noarch
foreman-proxy-1.24.1-1.el7sat.noarch

Capsule:
[root@boocap ~]# rpm -q foreman-proxy
foreman-proxy-1.24.1-1.el7sat.noarch

Comment 4 Adam Ruzicka 2020-02-20 08:56:09 UTC
Do you still have the original machine around? Is it possible that the user has a "Default on login" configured for organizations and locations and that the capsule is not assigned into any organization/location after registration?

Comment 5 Dave Carmichael 2020-02-20 13:40:47 UTC
Hi Adam,

Yes, the capsule and satellite are still available. We have the sosreports and can request additional information. What info do you need?

I don't quite understand your question about the default org and location for a user, but if you will clarify we'll have the customer check.

Kind regards,
Dave

Comment 6 Adam Ruzicka 2020-02-20 13:50:25 UTC
If you go to Administer > Users > $user > Organizations tab, there is a field called "Default on login" at the bottom of the page. Alternatively run hammer user info --login $user and look at "Default organization" and "Default location" fields. 

This controls which organization is used when the user logs in OR when they make an API request. Let's take your example, if there are organizations "Default organization" and "ghost" and the user has "ghost" as a default org on login and they try to assign the capsule into the "ghost" org, it may fail because by default it would look for the capsule inside the "ghost" org.

Also IIRC there was some issue about capsule not being assigned to *any* organization in 6.6, but maybe that was only about the "internal" capsule. If they go into Infrastructure > Capsules, does the capsule have any orgs and locs assigned?

Comment 7 Dave Carmichael 2020-02-20 14:18:35 UTC
Thanks. I requested the information.

Comment 8 Adam Ruzicka 2022-06-15 14:25:30 UTC
Both of the attached cases are closed. I'll go ahead and assume what I wrote in #6 was actually what was going on and that there is nothing for us to fix. As such, I'll close this BZ. If you feel there is something else that should be done here, feel free to reopen.


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