Bug 1597042 - can not add location to the organization: Resource organization not found by id '1'
Summary: can not add location to the organization: Resource organization not found by ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Organizations and Locations
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.4.0
Assignee: Ondřej Pražák
QA Contact: Nikhil Kathole
URL:
Whiteboard:
: 1597501 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-01 20:34 UTC by Jan Hutař
Modified: 2019-11-05 23:26 UTC (History)
12 users (show)

Fixed In Version: foreman-1.18.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-16 19:02:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
hammer -d -u admin -p changeme organization add-location --id 1 --location-id 2 (63.28 KB, text/plain)
2018-07-01 20:34 UTC, Jan Hutař
no flags Details
foreman-debug (1.52 MB, application/x-xz)
2018-07-01 20:37 UTC, Jan Hutař
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 23918 0 Normal Closed Unable to associate organization with location (regression 1.18) 2020-09-24 12:55:17 UTC

Description Jan Hutař 2018-07-01 20:34:16 UTC
Description of problem:
I can not add location to the organization: Resource organization not found by id '1'


Version-Release number of selected component (if applicable):
satellite-6.4.0-9.beta.el7sat.noarch
tfm-rubygem-hammer_cli-0.13.0-1.el7sat.noarch
tfm-rubygem-hammer_cli_csv-2.3.1-2.el7sat.noarch
tfm-rubygem-hammer_cli_foreman-0.13.0-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_admin-0.0.8-2.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3.3-3.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_discovery-1.0.0-2.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_docker-0.0.6-3.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_openscap-0.1.6-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_remote_execution-0.0.6-2.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.12-2.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_templates-0.1.0-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_virt_who_configure-0.0.3-2.el7sat.noarch
tfm-rubygem-hammer_cli_katello-0.13.1-1.el7sat.noarch


How reproducible:
always


Steps to Reproduce:
1. # hammer -d -u admin -p changeme organization add-location --id 1 --location-id 2


Actual results:
# hammer -u admin -p changeme organization add-location --id 1 --location-id 2
Could not associate the location:
  Resource organization not found by id '1'


Expected results:
Should work (maybe I'm just missing something, but in that case error message seems to be miss-leading)


Additional info:
[root@sat640snap9 ~]# hammer -u admin -p changeme organization list
---|----------------------|----------------------|-------------|----------------------|------------
ID | TITLE                | NAME                 | DESCRIPTION | LABEL                | DESCRIPTION
---|----------------------|----------------------|-------------|----------------------|------------
1  | Default Organization | Default Organization |             | Default_Organization |            
---|----------------------|----------------------|-------------|----------------------|------------
[root@sat640snap9 ~]# hammer -u admin -p changeme location list
---|------------------|------------------|------------
ID | TITLE            | NAME             | DESCRIPTION
---|------------------|------------------|------------
22 | 55p2F4T3bX       | 55p2F4T3bX       |            
18 | 7mDP3XxekZ       | 7mDP3XxekZ       |            
39 | BLM6IJ107M       | BLM6IJ107M       |            
31 | crWOZQuMyr       | crWOZQuMyr       |            
2  | Default Location | Default Location |            
42 | LlUgBw5NXg       | LlUgBw5NXg       |            
28 | m4xa3MfGMz       | m4xa3MfGMz       |            
34 | uXImQQja0p       | uXImQQja0p       |            
26 | VyzvZeERfo       | VyzvZeERfo       |            
---|------------------|------------------|------------

Comment 1 Jan Hutař 2018-07-01 20:34:57 UTC
Created attachment 1455798 [details]
hammer -d -u admin -p changeme organization add-location --id 1 --location-id 2

Comment 2 Jan Hutař 2018-07-01 20:36:31 UTC
This was not the case in 6.3 => setting keyword "Regression"

Comment 3 Jan Hutař 2018-07-01 20:37:22 UTC
Created attachment 1455799 [details]
foreman-debug

Comment 4 Jan Hutař 2018-07-01 20:41:23 UTC
I'm getting same error when I try it vice verse:

# hammer -u admin -p changeme location add-organization --id 2 --organization-id 1
Could not associate the organization:
  Resource location not found by id '2'

Comment 7 Marek Hulan 2018-07-10 06:55:50 UTC
*** Bug 1597501 has been marked as a duplicate of this bug. ***

Comment 8 Daniel Lobato Garcia 2018-07-10 14:32:25 UTC
Connecting redmine issue https://projects.theforeman.org/issues/23918 from this bug

Comment 9 Satellite Program 2018-07-10 16:11:09 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/23918 has been resolved.

Comment 10 Nikhil Kathole 2018-07-23 09:58:27 UTC
VERIFIED

Version tested:
Satellite 6.4 snap 13

# hammer -u admin -p changeme location add-organization --id 2 --organization-id 3
The organization has been associated.

# hammer -u admin -p changeme organization add-location --id 3 --location-id 2
The location has been associated.

Comment 11 Bryan Kearney 2018-10-16 19:02:11 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:2927


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