Project

General

Profile

Actions

Feature #7525

closed

Report volume sizes via facter

Added by Lukas Zapletal over 9 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
Importers
Target version:
Difficulty:
Triaged:
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 2 (0 open2 closed)

Related to Foreman - Feature #4528: Support Facter 2 structured factsClosedDominic Cleal03/03/2014Actions
Related to Discovery - Tracker #8332: [Discovery 2.0] Usability alignment and autoprovisioningResolved11/10/2014

Actions
Actions #1

Updated by Ohad Levy over 9 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?

Actions #2

Updated by Lukas Zapletal over 9 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... :-(

Actions #3

Updated by Dominic Cleal over 9 years ago

  • Target version changed from 1.7.3 to 1.7.2
Actions #4

Updated by Lukas Zapletal over 9 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

Actions #5

Updated by Lukas Zapletal over 9 years ago

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

Updated by Lukas Zapletal over 9 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).

Actions #7

Updated by Lukas Zapletal over 9 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.

Actions #8

Updated by The Foreman Bot over 9 years ago

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

Updated by Lukas Zapletal over 9 years ago

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

Updated by Lukas Zapletal over 9 years ago

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

Updated by Dominic Cleal over 9 years ago

  • Project changed from Discovery to Foreman
  • Category changed from Discovery plugin to Importers
  • Assignee set to Lukas Zapletal
  • translation missing: en.field_release set to 29
Actions

Also available in: Atom PDF