Project

General

Profile

Actions

Bug #2209

closed

JSON output changes when ActiveRecord storeconfigs is in use

Added by Dominic Cleal almost 12 years ago. Updated over 6 years ago.

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

Description

When Puppet is configured with ActiveRecord-based storeconfigs, this causes the to_json impl from ActiveSupport to get loaded over the 'json' gem implementation.

This causes a different API output for Puppet environments, e.g.

$ curl http://192.168.122.90:8443/puppet/environments
[{"name":"test","paths":["/etc/puppet/modules"]},{"name":"production","paths":["/etc/puppet/modules"]}]

vs the normal:

$ curl -k https://192.168.101.10:8443/puppet/environments
["development","production"]

And then Foreman itself can't understand the data structure when importing classes:

undefined method `values' for []:Array
Actions

Also available in: Atom PDF