Bug 1339711 - Organization show api broken on 6.2
Summary: Organization show api broken on 6.2
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: API
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high vote
Target Milestone: Unspecified
Assignee: Stephen Benjamin
QA Contact: Katello QA List
URL:
Whiteboard:
Keywords: Regression, Triaged
Depends On:
Blocks: 1326465
TreeView+ depends on / blocked
 
Reported: 2016-05-25 16:38 UTC by Stephen Benjamin
Modified: 2019-04-01 20:27 UTC (History)
5 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2016-07-27 11:36:27 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 15185 None None None 2016-05-25 16:49 UTC

Description Stephen Benjamin 2016-05-25 16:38:28 UTC
Description of problem:
500 error when trying to show an organization

Version-Release number of selected component (if applicable):
6.2 snap 12.1

How reproducible:
Always

Steps to Reproduce:
1. Try to show an org:
   curl -X GET -s -k -u admin:changeme https://localhost/api/v2/organizations/1


Actual results:
500 error

2016-05-25 16:30:52 [app] [I] Started GET "/api/v2/organizations/1" for 192.168.121.1 at 2016-05-25 16:30:52 +0000
2016-05-25 16:30:52 [app] [F] 
 | NoMethodError (undefined method `match' for nil:NilClass):
 |   katello (3.0.0.32) config/routes/overrides.rb:6:in `block in matches?'
 |   katello (3.0.0.32) config/routes/overrides.rb:6:in `map'
 |   katello (3.0.0.32) config/routes/overrides.rb:6:in `matches?'
 |   lib/middleware/catch_json_parse_errors.rb:9:in `call'


Expected results:
Success

Additional info:

Comment 1 Stephen Benjamin 2016-05-25 16:49:53 UTC
Created redmine issue http://projects.theforeman.org/issues/15185 from this bug

Comment 2 Bryan Kearney 2016-05-25 18:18:19 UTC
Upstream bug assigned to stbenjam@redhat.com

Comment 3 Bryan Kearney 2016-05-25 18:18:21 UTC
Upstream bug assigned to stbenjam@redhat.com

Comment 4 Andrii Balakhtar 2016-05-25 19:15:11 UTC
Was curious how automation skipped this issue. Then realized that according to API docs we should use https://localhost/katello/api/organizations/1 path, not the https://localhost/api/v2/organizations/1 one. And /katello/api/organizations/:id is working ok.

Comment 5 Stephen Benjamin 2016-05-25 19:17:51 UTC
Indeed, that works, but anybody relying on the Foreman API route working will run into problems (e.g. the foreman-installer puppet provider to register the capsule automatically to orgs/locations).

Comment 7 Bryan Kearney 2016-05-26 18:17:35 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/15185 has been closed

Comment 8 Bryan Kearney 2016-06-02 20:30:03 UTC
Verified
Version Verified:
satellite-6.2.0-14.1.el7sat.noarch (snap 14)

Steps to Verify:
1) Clean install of snap14
2) From the cli, run
curl -X GET -s -k -u admin:changeme https://localhost/api/v2/organizations/1


Note the massive amount of data
{"select_all_types":[],"description":null,"created_at":"2016-06-01 21:09:50 UTC","updated_at":"2016-06-01 21:09:58 UTC","ancestry":null,"parent_id":null,"parent_name":null,"id":1,"name":"Default Organization","title":"Default Organization","users":[],"smart_proxies":[{"name":"sat-test-rhel7.example.com","id":1,"url":"https://sat-test-rhel7.example.com:9090"}],"subnets":[],"compute_resources":[],"media":[],"config_templates":[{"id":7,"name":"Alterator default","template_kind_id":5,"template_kind_name":"provision"},{"id":8,"name":"Alterator default finish","template_kind_id":6,"template_kind_name":"finish"},{"id":9,"name":"Alterator default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux"},{"id":41,"name":"alterator_pkglist","template_kind_id":null,"template_kind_name":null},{"id":10,"name":"Atomic Kickstart default","template_kind_id":5,"template_kind_name":"provision"},{"id":11,"name":"AutoYaST default","template_kind_id":5,"template_kind_name":"provision"},{"id":14,"name":"AutoYaST default iPXE","template_kind_id":4,"template_kind_name":"iPXE"},{"id":13,"name":"AutoYaST default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux"},{"id":12,"name":"AutoYaST SLES default","template_kind_id":5,"template_kind_name":"provision"},{"id":72,"name":"Boot disk iPXE - generic host","template_kind_id":1,"template_kind_name":"Bootdisk"},{"id":71,"name":"Boot disk iPXE - host","template_kind_id":1,"template_kind_name":"Bootdisk"},{"id":42,"name":"chef_client","template_kind_id":null,"template_kind_name":null},{"id":43,"name":"coreos_cloudconfig","template_kind_id":null,"template_kind_name":null},{"id":15,"name":"CoreOS provision","template_kind_id":5,"template_kind_name":"provision"},{"id":16,"name":"CoreOS PXELinux","template_kind_id":2,"template_kind_name":"PXELinux"},{"id":82,"name":"Discovery Red Hat kexec","template_kind_id":11,"template_kind_name":"kexec"},{"id":44,"name":"epel","template_kind_id":null,"template_kind_name":null},{"id":45,"name":"fix_hosts","template_kind_id":null,"template_kind_name":null},{"id":17,"name":"FreeBSD (mfsBSD) finish","template_kind_id":6,"template_kind_name":"finish"},{"id":18,"name":"FreeBSD (mfsBSD) provision","template_kind_id":5,"template_kind_name":"provision"},{"id":19,"name":"FreeBSD (mfsBSD) PXELinux","template_kind_id":2,"template_kind_name":"PXELinux"},{"id":46,"name":"freeipa_register","template_kind_id":null,"template_kind_name":null},{"id":20,"name":"Grubby default","template_kind_id":7,"template_kind_name":"script"},{"id":47,"name":"http_proxy","template_kind_id":null,"template_kind_name":null},{"id":76,"name":"idm_register","template_kind_id":null,"template_kind_name":null},{"id":21,"name":"Jumpstart default","template_kind_id":5,"template_kind_name":"provision"},{"id":22,"name":"Jumpstart default finish","template_kind_id":6,"template_kind_name":"finish"},{"id":23,"name":"Jumpstart default PXEGrub","template_kind_id":3,"template_kind_name":"PXEGrub"},{"id":39,"name":"Junos default finish","template_kind_id":6,"template_kind_name":"finish"},{"id":37,"name":"Junos default SLAX","template_kind_id":5,"template_kind_name":"provision"},{"id":38,"name":"Junos default ZTP config","template_kind_id":9,"template_kind_name":"ZTP"},{"id":26,"name":"Kickstart default finish","template_kind_id":6,"template_kind_name":"finish"},{"id":28,"name":"Kickstart default iPXE","template_kind_id":4,"template_kind_name":"iPXE"},{"id":27,"name":"Kickstart default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux"},{"id":29,"name":"Kickstart default user data","template_kind_id":8,"template_kind_name":"user_data"},{"id":48,"name":"kickstart_networking_setup","template_kind_id":null,"template_kind_name":null},{"id":40,"name":"NX-OS default POAP setup","template_kind_id":10,"template_kind_name":"POAP"},{"id":30,"name":"Preseed default","template_kind_id":5,"template_kind_name":"provision"},{"id":31,"name":"Preseed default finish","template_kind_id":6,"template_kind_name":"finish"},{"id":33,"name":"Preseed default iPXE","template_kind_id":4,"template_kind_name":"iPXE"},{"id":32,"name":"Preseed default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux"},{"id":34,"name":"Preseed default user data","template_kind_id":8,"template_kind_name":"user_data"},{"id":49,"name":"preseed_networking_setup","template_kind_id":null,"template_kind_name":null},{"id":50,"name":"puppet.conf","template_kind_id":null,"template_kind_name":null},{"id":4,"name":"PXEGrub default local boot","template_kind_id":3,"template_kind_name":"PXEGrub"},{"id":5,"name":"PXELinux chain iPXE","template_kind_id":2,"template_kind_name":"PXELinux"},{"id":6,"name":"PXELinux chain iPXE UNDI","template_kind_id":2,"template_kind_name":"PXELinux"},{"id":2,"name":"PXELinux default local boot","template_kind_id":2,"template_kind_name":"PXELinux"},{"id":3,"name":"PXELinux default memdisk","template_kind_id":2,"template_kind_name":"PXELinux"},{"id":1,"name":"PXELinux global default","template_kind_id":2,"template_kind_name":"PXELinux"},{"id":51,"name":"redhat_register","template_kind_id":null,"template_kind_name":null},{"id":52,"name":"remote_execution_ssh_keys","template_kind_id":null,"template_kind_name":null},{"id":53,"name":"saltstack_minion","template_kind_id":null,"template_kind_name":null},{"id":77,"name":"Satellite Atomic Kickstart Default","template_kind_id":5,"template_kind_name":"provision"},{"id":73,"name":"Satellite Kickstart Default","template_kind_id":5,"template_kind_name":"provision"},{"id":75,"name":"Satellite Kickstart Default Finish","template_kind_id":6,"template_kind_name":"finish"},{"id":74,"name":"Satellite Kickstart Default User Data","template_kind_id":8,"template_kind_name":"user_data"},{"id":69,"name":"subscription_manager_registration","template_kind_id":null,"template_kind_name":null},{"id":35,"name":"UserData default","template_kind_id":8,"template_kind_name":"user_data"},{"id":36,"name":"WAIK default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux"}],"ptables":[{"os_family":"Suse","created_at":"2016-06-01 21:09:56 UTC","updated_at":"2016-06-01 21:09:56 UTC","name":"AutoYaST entire SCSI disk","id":54},{"os_family":"Suse","created_at":"2016-06-01 21:09:56 UTC","updated_at":"2016-06-01 21:09:56 UTC","name":"AutoYaST entire virtual disk","id":55},{"os_family":"Suse","created_at":"2016-06-01 21:09:56 UTC","updated_at":"2016-06-01 21:09:56 UTC","name":"AutoYaST LVM","id":56},{"os_family":"Coreos","created_at":"2016-06-01 21:09:56 UTC","updated_at":"2016-06-01 21:09:56 UTC","name":"CoreOS default fake","id":57},{"os_family":"Freebsd","created_at":"2016-06-01 21:09:56 UTC","updated_at":"2016-06-01 21:09:56 UTC","name":"FreeBSD","id":58},{"os_family":"Solaris","created_at":"2016-06-01 21:09:56 UTC","updated_at":"2016-06-01 21:09:56 UTC","name":"Jumpstart default","id":59},{"os_family":"Solaris","created_at":"2016-06-01 21:09:56 UTC","updated_at":"2016-06-01 21:09:56 UTC","name":"Jumpstart mirrored","id":60},{"os_family":"Junos","created_at":"2016-06-01 21:09:56 UTC","updated_at":"2016-06-01 21:09:56 UTC","name":"Junos default fake","id":64},{"os_family":"Redhat","created_at":"2016-06-01 21:09:56 UTC","updated_at":"2016-06-01 21:09:56 UTC","name":"Kickstart default","id":61},{"os_family":"NXOS","created_at":"2016-06-01 21:09:56 UTC","updated_at":"2016-06-01 21:09:56 UTC","name":"NX-OS default fake","id":65},{"os_family":"Debian","created_at":"2016-06-01 21:09:56 UTC","updated_at":"2016-06-01 21:09:56 UTC","name":"Preseed custom LVM","id":63},{"os_family":"Debian","created_at":"2016-06-01 21:09:56 UTC","updated_at":"2016-06-01 21:09:56 UTC","name":"Preseed default","id":62}],"provisioning_templates":[{"id":7,"name":"Alterator default","template_kind_id":5,"template_kind_name":"provision"},{"id":8,"name":"Alterator default finish","template_kind_id":6,"template_kind_name":"finish"},{"id":9,"name":"Alterator default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux"},{"id":41,"name":"alterator_pkglist","template_kind_id":null,"template_kind_name":null},{"id":10,"name":"Atomic Kickstart default","template_kind_id":5,"template_kind_name":"provision"},{"id":11,"name":"AutoYaST default","template_kind_id":5,"template_kind_name":"provision"},{"id":14,"name":"AutoYaST default iPXE","template_kind_id":4,"template_kind_name":"iPXE"},{"id":13,"name":"AutoYaST default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux"},{"id":12,"name":"AutoYaST SLES default","template_kind_id":5,"template_kind_name":"provision"},{"id":72,"name":"Boot disk iPXE - generic host","template_kind_id":1,"template_kind_name":"Bootdisk"},{"id":71,"name":"Boot disk iPXE - host","template_kind_id":1,"template_kind_name":"Bootdisk"},{"id":42,"name":"chef_client","template_kind_id":null,"template_kind_name":null},{"id":43,"name":"coreos_cloudconfig","template_kind_id":null,"template_kind_name":null},{"id":15,"name":"CoreOS provision","template_kind_id":5,"template_kind_name":"provision"},{"id":16,"name":"CoreOS PXELinux","template_kind_id":2,"template_kind_name":"PXELinux"},{"id":82,"name":"Discovery Red Hat kexec","template_kind_id":11,"template_kind_name":"kexec"},{"id":44,"name":"epel","template_kind_id":null,"template_kind_name":null},{"id":45,"name":"fix_hosts","template_kind_id":null,"template_kind_name":null},{"id":17,"name":"FreeBSD (mfsBSD) finish","template_kind_id":6,"template_kind_name":"finish"},{"id":18,"name":"FreeBSD (mfsBSD) provision","template_kind_id":5,"template_kind_name":"provision"},{"id":19,"name":"FreeBSD (mfsBSD) PXELinux","template_kind_id":2,"template_kind_name":"PXELinux"},{"id":46,"name":"freeipa_register","template_kind_id":null,"template_kind_name":null},{"id":20,"name":"Grubby default","template_kind_id":7,"template_kind_name":"script"},{"id":47,"name":"http_proxy","template_kind_id":null,"template_kind_name":null},{"id":76,"name":"idm_register","template_kind_id":null,"template_kind_name":null},{"id":21,"name":"Jumpstart default","template_kind_id":5,"template_kind_name":"provision"},{"id":22,"name":"Jumpstart default finish","template_kind_id":6,"template_kind_name":"finish"},{"id":23,"name":"Jumpstart default PXEGrub","template_kind_id":3,"template_kind_name":"PXEGrub"},{"id":39,"name":"Junos default finish","template_kind_id":6,"template_kind_name":"finish"},{"id":37,"name":"Junos default SLAX","template_kind_id":5,"template_kind_name":"provision"},{"id":38,"name":"Junos default ZTP config","template_kind_id":9,"template_kind_name":"ZTP"},{"id":26,"name":"Kickstart default finish","template_kind_id":6,"template_kind_name":"finish"},{"id":28,"name":"Kickstart default iPXE","template_kind_id":4,"template_kind_name":"iPXE"},{"id":27,"name":"Kickstart default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux"},{"id":29,"name":"Kickstart default user data","template_kind_id":8,"template_kind_name":"user_data"},{"id":48,"name":"kickstart_networking_setup","template_kind_id":null,"template_kind_name":null},{"id":40,"name":"NX-OS default POAP setup","template_kind_id":10,"template_kind_name":"POAP"},{"id":30,"name":"Preseed default","template_kind_id":5,"template_kind_name":"provision"},{"id":31,"name":"Preseed default finish","template_kind_id":6,"template_kind_name":"finish"},{"id":33,"name":"Preseed default iPXE","template_kind_id":4,"template_kind_name":"iPXE"},{"id":32,"name":"Preseed default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux"},{"id":34,"name":"Preseed default user data","template_kind_id":8,"template_kind_name":"user_data"},{"id":49,"name":"preseed_networking_setup","template_kind_id":null,"template_kind_name":null},{"id":50,"name":"puppet.conf","template_kind_id":null,"template_kind_name":null},{"id":4,"name":"PXEGrub default local boot","template_kind_id":3,"template_kind_name":"PXEGrub"},{"id":5,"name":"PXELinux chain iPXE","template_kind_id":2,"template_kind_name":"PXELinux"},{"id":6,"name":"PXELinux chain iPXE UNDI","template_kind_id":2,"template_kind_name":"PXELinux"},{"id":2,"name":"PXELinux default local boot","template_kind_id":2,"template_kind_name":"PXELinux"},{"id":3,"name":"PXELinux default memdisk","template_kind_id":2,"template_kind_name":"PXELinux"},{"id":1,"name":"PXELinux global default","template_kind_id":2,"template_kind_name":"PXELinux"},{"id":51,"name":"redhat_register","template_kind_id":null,"template_kind_name":null},{"id":52,"name":"remote_execution_ssh_keys","template_kind_id":null,"template_kind_name":null},{"id":53,"name":"saltstack_minion","template_kind_id":null,"template_kind_name":null},{"id":77,"name":"Satellite Atomic Kickstart Default","template_kind_id":5,"template_kind_name":"provision"},{"id":73,"name":"Satellite Kickstart Default","template_kind_id":5,"template_kind_name":"provision"},{"id":75,"name":"Satellite Kickstart Default Finish","template_kind_id":6,"template_kind_name":"finish"},{"id":74,"name":"Satellite Kickstart Default User Data","template_kind_id":8,"template_kind_name":"user_data"},{"id":69,"name":"subscription_manager_registration","template_kind_id":null,"template_kind_name":null},{"id":35,"name":"UserData default","template_kind_id":8,"template_kind_name":"user_data"},{"id":36,"name":"WAIK default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux"}],"domains":[],"realms":[],"environments":[],"hostgroups":[],"locations":[],"parameters":[]}[vagrant@sat-test-rhel7 ~]$ curl -X GET -s -k -u admin:changeme https://localhost/api/v2/organizations/1     rpm -qa | grep satellite

Comment 9 Bryan Kearney 2016-07-27 11:36:27 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-2016:1501


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