Project

General

Profile

Actions

Bug #12253

closed

Missing perl module XML/TreePP.pm

Added by Janos Mattyasovszky over 6 years ago. Updated over 6 years ago.

Status:
Rejected
Priority:
N/A
Assignee:
-
Category:
Packaging
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Getting started - demo | first install | level 1 Techniques
Effort required:
Priority:
70
Name check:
Fix check:
Regression:

Description

With rudder-agent-4.3.0.rc1-1.SLES.12.x86_64

sles12sp2# rudder agent run -v > /dev/null
Can't locate XML/TreePP.pm in @INC (you may need to install the XML::TreePP module) (@INC contains: /usr/lib/perl5/site_perl/5.18.2/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.18.2 /usr/lib/perl5/vendor_perl/5.18.2/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.18.2 /usr/lib/perl5/5.18.2/x86_64-linux-thread-multi /usr/lib/perl5/5.18.2 /usr/lib/perl5/site_perl .) at /var/rudder/cfengine-community/inputs/inventory/1.0/test-inventory.pl line 5.
BEGIN failed--compilation aborted at /var/rudder/cfengine-community/inputs/inventory/1.0/test-inventory.pl line 5.

I presume it would help to build the agent with the dependency to the appropriate module (which yet I havent found you what it is)?


Related issues 2 (0 open2 closed)

Related to Rudder - Bug #12235: Inventory failed on debian 9 on relay onlyRejectedFélix DALLIDETActions
Related to Rudder - Bug #12042: Inventory validation broken on Centos 7 on Rudder 4.3ReleasedBenoît PECCATTEActions
Actions #1

Updated by Nicolas CHARLES over 6 years ago

  • Target version set to 4.3.0~rc2
  • Severity changed from Minor - inconvenience | misleading | easy workaround to Major - prevents use of part of Rudder | no simple workaround
  • Priority changed from 50 to 70

Thank Janos,

We are supposely requiering the correct dependency.
I got this exact same issue when, for some reason, the downloaded version was a i686 on a x86_64 (which doesn't seems to be the case), and Felix had it on a debian 9, but it fixed itself
Could you check if TreePP.PM is present anywhere on your system ? It may be that we are not looking at the right place

Actions #2

Updated by Janos Mattyasovszky over 6 years ago

yes very strange.

# rudder agent run > /dev/null
# find / -name TreePP.pm
/opt/rudder/lib/perl5/XML/TreePP.pm
# rpm -qf /opt/rudder/lib/perl5/XML/TreePP.pm
rudder-agent-4.3.0.rc1-1.SLES.12.x86_64

I was still an "ah crap" moment...

Actions #3

Updated by Nicolas CHARLES over 6 years ago

Very strange indeed ... do you know if something happened in-between ?
Could it be a delayed ldconfig ?

Actions #4

Updated by Janos Mattyasovszky over 6 years ago

I don't think it's an ldconfig thing since it's a XML::TreePP -- Pure Perl implementation for parsing/writing XML documents, no .so files involved...

NEvertheless, it resolved itself, but it's still strange.

Actions #5

Updated by Janos Mattyasovszky over 6 years ago

Okay got it again.

R: ********************************************************************************
* WARNING Generated inventory is not valid, as it is missing mandatory fields. *
* Not sending it to the Rudder Server                                          *
* You can get a full error message by running: /usr/bin/perl /var/rudder/cfengine-community/inputs/inventory/1.0/test-inventory.pl /var/rudder/tmp/inventory/fqdn-04f7cc13-d1e8-4c6c-a985-a07898f7f5d4.ocs
********************************************************************************

The issue happens due the test-inventory.pl not being executed with the bundled perl but the OS-Perl.

/usr/bin/perl /var/rudder/cfengine-community/inputs/inventory/1.0/test-inventory.pl /var/rudder/tmp/inventory/fqdn-04f7cc13-d1e8-4c6c-a985-a07898f7f5d4.ocs
Can't locate XML/TreePP.pm in @INC (you may need to install the XML::TreePP module) (@INC contains: /usr/lib/perl5/site_perl/5.18.2/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.18.2 /usr/lib/perl5/vendor_perl/5.18.2/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.18.2 /usr/lib/perl5/5.18.2/x86_64-linux-thread-multi /usr/lib/perl5/5.18.2 /usr/lib/perl5/site_perl .) at /var/rudder/cfengine-community/inputs/inventory/1.0/test-inventory.pl line 5.
BEGIN failed--compilation aborted at /var/rudder/cfengine-community/inputs/inventory/1.0/test-inventory.pl line 5.

It helps if I manually specify the perl5lib envvar:

fqdn# PERL5LIB=/opt/rudder/lib/perl5 /usr/bin/perl /var/rudder/cfengine-community/inputs/inventory/1.0/test-inventory.pl /var/rudder/tmp/inventory/fqdn-04f7cc13-d1e8-4c6c-a985-a07898f7f5d4.ocs

Actions #6

Updated by Janos Mattyasovszky over 6 years ago

Apparently there is somekind of strangeness going on:

./inventory/1.0/fusionAgent.cf:      "has_rudder_perl" expression => fileexists("/opt/rudder/bin/perl");

vs:

# ll /opt/rudder/bin/perl
ls: cannot access '/opt/rudder/bin/perl': No such file or directory

So it does not use the build-in perl, which means it's not using the only rudder-provided perl module

Is it possible the perl is copied there if it's hanging on a root server and receiving policy?

Actions #7

Updated by Nicolas CHARLES over 6 years ago

  • Related to Bug #12235: Inventory failed on debian 9 on relay only added
Actions #8

Updated by Nicolas CHARLES over 6 years ago

Hi Janos,
The following error message

You can get a full error message by running: /usr/bin/perl /var/rudder/cfengine-community/inputs/inventory/1.0/test-inventory.pl /var/rudder/tmp/inventory/fqdn-04f7cc13-d1e8-4c6c-a985-a07898f7f5d4.ocs

is really surprising - it should contain a -I somewhere, code does include that
Is it a copy&paste issue, or are you really missing the -I part in the report ??

Actions #9

Updated by Nicolas CHARLES over 6 years ago

  • Related to Bug #12042: Inventory validation broken on Centos 7 on Rudder 4.3 added
Actions #10

Updated by Alexis Mousset over 6 years ago

Looks a lot like #12042, which should have been fixed in 4.3beta1. rc1 package content looks correct. Did this happen with initial ppolicies? If not, what is the version of rudder-techniques on the server?

Actions #11

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 4.3.0~rc2 to 4.3.0~rc3
Actions #12

Updated by François ARMAND over 6 years ago

  • Translation missing: en.field_tag_list set to Blocking 4.3
Actions #13

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 4.3.0~rc3 to 4.3.0
Actions #14

Updated by François ARMAND over 6 years ago

  • Status changed from New to Rejected

We were not able to reproduce it recently. It could had been a variation of #12042, and we did a lot of iteration in the packaging of the agent on that release cycle.

I'm closing it for now.

If you happen to still encounter it in 4.3-rc3 or latter, please reoppen the tikcet with the conditions when it happens.

Actions #15

Updated by Nicolas CHARLES over 6 years ago

I just got the same when upgrading from 4.1 to 4.3 on debian9

root@server:/opt/rudder/sbin# /usr/bin/perl /var/rudder/cfengine-community/inputs/inventory/1.0/test-inventory.pl /var/rudder/tmp/inventory/server-root.ocs 
Can't locate XML/TreePP.pm in @INC (you may need to install the XML::TreePP module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /var/rudder/cfengine-community/inputs/inventory/1.0/test-inventory.pl line 5.
BEGIN failed--compilation aborted at /var/rudder/cfengine-community/inputs/inventory/1.0/test-inventory.pl line 5.

root@server:/opt/rudder/sbin# locate TreePP
/opt/rudder/lib/perl5/XML/TreePP.pm
/opt/rudder/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/XML-TreePP-0.43
/opt/rudder/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/XML-TreePP-0.43/MYMETA.json
/opt/rudder/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/XML-TreePP-0.43/install.json
/opt/rudder/lib/perl5/x86_64-linux-gnu-thread-multi/auto/XML/TreePP
/opt/rudder/lib/perl5/x86_64-linux-gnu-thread-multi/auto/XML/TreePP/.packlist

since inventory was not updated, the command line used to cal perl is invalid

Actions

Also available in: Atom PDF