Feature #7525
closedReport volume sizes via facter
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.
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?
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... :-(
Updated by Dominic Cleal over 9 years ago
- Target version changed from 1.7.3 to 1.7.2
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
Updated by Lukas Zapletal over 9 years ago
- Related to Feature #4528: Support Facter 2 structured facts added
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).
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.
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 (
)
Updated by Lukas Zapletal over 9 years ago
- Related to Tracker #8332: [Discovery 2.0] Usability alignment and autoprovisioning added
Updated by Lukas Zapletal over 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset foreman:2ec9c96fb577171eeb850b8847d5fd5f044ec4e0.
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