Project

General

Profile

Feature #7525

Report volume sizes via facter

Added by Lukas Zapletal almost 5 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Category:
Importers
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

We should report volume sizes similar way as facter does on provisioned systems. Discovery only reports blockdevice_vda_vendor and blockdevices list, but not blockdevice_vda_size.

When running facter manually as root, I see it. We need to raise foreman-proxy privileges for this perhaps.


Related issues

Related to Foreman - Feature #4528: Support Facter 2 structured factsClosed2014-03-03
Related to Discovery - Tracker #8332: [Discovery 2.0] Usability alignment and autoprovisioningResolved2014-11-10

Associated revisions

Revision 2ec9c96f (diff)
Added by Lukas Zapletal over 4 years ago

Fixes #7525 - don't fail on structured facts

Revision 83bf785d (diff)
Added by Lukas Zapletal over 4 years ago

Fixes #7525 - don't fail on structured facts

(cherry picked from commit 2ec9c96fb577171eeb850b8847d5fd5f044ec4e0)

History

#1 Updated by Ohad Levy almost 5 years ago

Lukas Zapletal wrote:

When running facter manually as root, I see it. We need to raise foreman-proxy privileges for this perhaps.

run it with sudo maybe?

#2 Updated by Lukas Zapletal almost 5 years ago

I was thinking suid... But then I relized this is discover-host.rb script which calls Facter via API. Not sure if we want to run the whole service as root... :-(

#3 Updated by Dominic Cleal almost 5 years ago

  • Target version changed from 1.7.3 to 1.7.2

#4 Updated by Lukas Zapletal almost 5 years ago

  • Status changed from New to Assigned

Ok its misbehavior of Foreman, we currently drop all facts which are non-string:

https://github.com/theforeman/foreman/blob/develop/app/services/fact_importer.rb#L80-L82

#5 Updated by Lukas Zapletal almost 5 years ago

  • Related to Feature #4528: Support Facter 2 structured facts added

#6 Updated by Lukas Zapletal almost 5 years ago

Ok so support for non-string values was added in Facter 2.0.

https://docs.puppetlabs.com/facter/2.0/release_notes.html#more-return-types-and-structured-facts

I will create a patch that will at least prevent from failing, so all of the types (Integer, Float, TrueClass, FalseClass, NilClass, String, Array, Hash) will be converted via to_s. Raising new feature request that should add proper support in reports (maybe to convert this into JSON).

#7 Updated by Lukas Zapletal almost 5 years ago

So the issue linked already contains the request, I am going to convert this to string for the purpose of this bug and we will perhaps extend this later.

#8 Updated by The Foreman Bot almost 5 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/1854 added
  • Pull request deleted ()

#9 Updated by Lukas Zapletal over 4 years ago

  • Related to Tracker #8332: [Discovery 2.0] Usability alignment and autoprovisioning added

#10 Updated by Lukas Zapletal over 4 years ago

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

#11 Updated by Dominic Cleal over 4 years ago

  • Project changed from Discovery to Foreman
  • Category changed from Discovery plugin to Importers
  • Assignee set to Lukas Zapletal
  • Legacy Backlogs Release (now unused) set to 29

Also available in: Atom PDF