Project

General

Custom queries

Profile

Actions

Bug #12197

open

Better error handling when API request isn't rooted (e.g. {'minion': {"param": "value"}})

Added by Volker None over 9 years ago. Updated over 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Trying to update a minions salt_proxy_id via the REST-Api fails with

{
"error": {"message":"undefined method `delete' for nil:NilClass"}
}

The request is:
curl -k -u admin:password \
-H "Accept: version=2,application/json" \
-H "Content-Type: application/json" \
-X PUT \
-d '{ "salt_proxy_id":5 }' \
https://api.domain.de/salt/api/salt_minions/jessie-naked

This is also true for the other minion-parameters

salt_environment_id
salt_environment_name
salt_proxy_name
salt_proxy_id
salt_states

and also using python-requests + client-certificates.

Full debug trace of production.log for salt_proxy_id is attached.


Files

foreman_set_salt_proxy_id.log foreman_set_salt_proxy_id.log 16 KB Volker None, 10/16/2015 09:33 AM
update_salt_proxy_id.log update_salt_proxy_id.log 21.2 KB Volker None, 11/10/2015 08:04 AM
#1

Updated by Dominic Cleal over 9 years ago

  • Project changed from Foreman to Salt
#3

Updated by Stephen Benjamin over 9 years ago

  • Subject changed from REST-Api fails to update salt_proxy_id to Better error handling when API request isn't rooted (e.g. {'minion': {"param": "value"}})
  • Category set to API
#4

Updated by The Foreman Bot over 9 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_salt/pull/52 added
  • Pull request deleted ()
#5

Updated by Anonymous over 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
#6

Updated by Volker None over 9 years ago

#7

Updated by Stephen Benjamin over 9 years ago

  • Status changed from Closed to New
Actions

Also available in: Atom PDF