Project

General

Profile

Actions

Bug #27321

open

Null values for facts via API call

Added by Giuseppe Sforza almost 5 years ago.

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

Description

Problem:
I am trying to retrieve all the facts about a specific host via API. But for some reason for some values I just get null, e.g.

"mountpoints::/run": null,
"os::distro": null,
"ssh::ecdsa::fingerprints": null,
"os::selinux": null,
"mountpoints": null,
"load_averages": null,
"os": null,
"networking": null,

This is the case with all hosts. Most facts have the correct values, some have null.

Expected outcome:
Get values for these facts which are not null. What baffles me even more is that in the web interface I have no problem looking up the values for the above facts.

Foreman and Proxy versions:

Foreman version: 1.22
Proxy version: 1.22

Logs:


2019-06-26T10:00:31 [I|app|46841221] Started GET "/api/v2/hosts/$HOST/facts" for $IP at 2019-06-26 10:00:31 +0200
2019-06-26T10:00:31 [I|app|46841221] Processing by Api::V2::FactValuesController#index as JSON
2019-06-26T10:00:31 [I|app|46841221]   Parameters: {"apiv"=>"v2", "host_id"=>"$HOST"}
2019-06-26T10:00:31 [I|app|46841221] Authorized user admin(Admin User)
2019-06-26T10:00:31 [I|app|46841221] Current user set to admin (admin)
2019-06-26T10:00:31 [I|app|46841221]   Rendering api/v2/fact_values/index.json.rabl within api/v2/layouts/index_layout
2019-06-26T10:00:31 [I|app|46841221]   Rendered api/v2/fact_values/index.json.rabl within api/v2/layouts/index_layout (1.0ms)
2019-06-26T10:00:31 [I|app|46841221] Completed 200 OK in 60ms (Views: 5.8ms | ActiveRecord: 9.9ms)

No data to display

Actions

Also available in: Atom PDF