Project

General

Profile

Actions

Bug #12033

closed

User story #11741: Use system Perl instead of embedding into rudder-agent if possible

Script /opt/rudder/bin/run-inventory cannot run FusionInventory on Rudder 4.3

Added by Nicolas CHARLES about 6 years ago. Updated about 6 years ago.

Status:
Released
Priority:
N/A
Category:
Packaging
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

Description

We use script /opt/rudder/bin/run-inventory to run FusionInventory. However, it works either by calling the perl shipped with Rudder (pre-4.3), or calling fusioninventory-agent from the path (for agent-thin)

It does not contain the logic to call FusionInventory from system perl

calling

perl  /opt/rudder/bin/fusioninventory-agent --config=none --no-task=Deploy "$@" 

is not sufficient, as it missed dependencies

Can't locate UNIVERSAL/require.pm in @INC (@INC contains: /opt/rudder/share/fusioninventory/lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /opt/rudder/share/fusioninventory/lib/FusionInventory/Agent.pm line 8.

I had to install:
perl-UNIVERSAL-require
perl-File-Which
perl-libwww-perl
perl-XML-TreePP

and only then I could run inventory, with following output

[error] Can't locate object method "isEnabled" via package "FusionInventory::Agent::Task::Collect" at /opt/rudder/share/fusioninventory/lib/FusionInventory/Agent.pm line 473.
[error] Can't locate object method "isEnabled" via package "FusionInventory::Agent::Task::WakeOnLan" at /opt/rudder/share/fusioninventory/lib/FusionInventory/Agent.pm line 473.
[error] Can't locate object method "isEnabled" via package "FusionInventory::Agent::Task::NetDiscovery" at /opt/rudder/share/fusioninventory/lib/FusionInventory/Agent.pm line 473.
[error] Can't locate object method "isEnabled" via package "FusionInventory::Agent::Task::NetInventory" at /opt/rudder/share/fusioninventory/lib/FusionInventory/Agent.pm line 473.

As a side note, there still are libs in - is it expected ?
running
perl -I /opt/rudder/lib/perl5 /opt/rudder/bin/fusioninventory-agent --config=none --no-task=Deploy "$@" 

[info] running task Inventory
[info] Inventory saved in /var/rudder/tmp/inventory/server-2018-01-23-21-32-00.ocs
[error] Can't locate object method "isEnabled" via package "FusionInventory::Agent::Task::Collect" at /opt/rudder/share/fusioninventory/lib/FusionInventory/Agent.pm line 473.
[error] Can't locate object method "isEnabled" via package "FusionInventory::Agent::Task::NetDiscovery" at /opt/rudder/share/fusioninventory/lib/FusionInventory/Agent.pm line 473.
[error] Can't locate object method "isEnabled" via package "FusionInventory::Agent::Task::NetInventory" at /opt/rudder/share/fusioninventory/lib/FusionInventory/Agent.pm line 473.


Subtasks 3 (0 open3 closed)

Bug #12039: Inventory fails to runRejectedActions
Bug #12040: Inventory fails to run (at least on centos7)ReleasedNicolas CHARLESActions
Bug #12042: Inventory validation broken on Centos 7 on Rudder 4.3ReleasedBenoît PECCATTEActions
Actions #1

Updated by Nicolas CHARLES about 6 years ago

  • Status changed from New to In progress
  • Assignee set to Nicolas CHARLES
Actions #2

Updated by Nicolas CHARLES about 6 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Nicolas CHARLES to Benoît PECCATTE
  • Pull Request set to https://github.com/Normation/rudder-packages/pull/1473
Actions #3

Updated by Nicolas CHARLES about 6 years ago

  • Status changed from Pending technical review to Pending release
Actions #4

Updated by Vincent MEMBRÉ about 6 years ago

  • Parent task set to #11741
Actions #5

Updated by Vincent MEMBRÉ about 6 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.3.0~beta1 which was released today.

Actions

Also available in: Atom PDF