Project

General

Profile

Bug #25819

No facts attribute for hosts/<id> call

Added by John Mitsch 10 months ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

For virt-who hypervisors, I can't get the host facts even if they exist in the console i.e.

For Host 8, the virt-who hypervisor:

Facts in console

irb(main):021:0> Host.find(8).facts
=> {"hypervisor::type"=>"QEMU", "cpu::cpu_socket(s)"=>"1", "hypervisor::version"=>"2010001", "_timestamp"=>"2019-01-08 21:03:53 +0000", "hypervisor"=>nil, "cpu"=>nil}

But not in API

[vagrant@coffee foreman{develop}]$ curl g -k -u admin:changeme -H "Content-Type: application/json" https://coffee.jomitsch.example.com/api/v2/hosts/8 | jq '.facts'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3162 0 3162 0 0 13165 0 -
:--:-- --:--:-- --:--:-- 13230
null

For Host 3, a content host, facts are in both API and console

irb(main):022:0> Host.find(3).facts
=> {"system::certificate_version"=>"3.2", "uname::sysname"=>"Linux", ... }

[vagrant@coffee foreman{develop}]$ curl g -k -u admin:changeme -H "Content-Type: application/json" https://coffee.jomitsch.example.com/api/v2/hosts/3 | jq '.facts'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 10510 0 10510 0 0 39243 0 -
:--:-- --:--:-- --:--:-- 39363 {
"system::certificate_version": "3.2",
"uname::sysname": "Linux",
...
}

History

#1 Updated by The Foreman Bot 10 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/6398 added

#2 Updated by John Mitsch 10 months ago

  • Bugzilla link set to 1652732

#3 Updated by Tomer Brisker 10 months ago

  • Status changed from Ready For Testing to Assigned
  • Project changed from Foreman to Katello
  • Pull request deleted (https://github.com/theforeman/foreman/pull/6398)

moving to katello following discussion in the pr

#4 Updated by Andrew Kofink 10 months ago

  • Bugzilla link deleted (1652732)
  • Triaged changed from No to Yes
  • Status changed from Assigned to Closed

Also available in: Atom PDF