Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ccm-fetch and ncm-ncd broken during installation when an extra repo overwrites a package #52

Open
JulienNauroy opened this issue Dec 3, 2015 · 1 comment

Comments

@JulienNauroy
Copy link

Hi,

I found the following problem and I'm not able to find a solution by myself.
Here's the details:

  • I'm adding a repository on one of my clusters which contains a version of perl-common-sense considered as newer by yum (unfortunately I can't give you a pointer to this repo since it's a paying extension to a Nagios-like software called Centreon).

  • when installing the machine, right after the first reboot I have the following error when running ccm-fetch

    $ ccm-fetch
    Can't locate common/sense.pm in @inc (@inc contains: /opt/edg/lib/perl /usr/lib/perl > /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 /usr/lib64/perl5/JSON/XS.pm line 104.
    (...)

Because of this package, the module is on another location:

$ locate common/sense.pm
/usr/lib/perl5/vendor_perl/common/sense.pm

  • I can manually set PERL5LIB but it doesn't work with ncm-ncd for some reason:

$export PERL5LIB=/usr/lib/perl5/vendor_perl
$ ccm-fetch
updated /var/lib/ccm/data/...
updated /var/lib/ccm/latest.cid
updated /var/lib/ccm/current.cid
updated /var/lib/ccm/data/...
updated /var/lib/ccm/profile.1/profile.url
updated /var/lib/ccm/profile.1/profile.xml

ncm-ncd --configure --all
Can't locate common/sense.pm in @inc (@inc contains: /usr/lib/perl /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 /usr/lib64/perl5/JSON/XS.pm line 104.
(...)

  • I of course marked perl-common-sense as an excluded package in the definition of the repository, but it doesn't seem to work during the installation process. The repositories are not set yet:

$ ll /etc/yum.repos.d/
-rw-r--r--. 1 root root 1837 Feb 20 2012 sl6x.repo
-rw-r--r--. 1 root root 2817 Mar 7 2013 sl-other.repo
-rw-r--r--. 1 root root 1767 Aug 17 17:23 sl.repo

I don't know what's happening under the hood and if it's considered normal behaviour or it's something that should be fixed in Quattor in order not to allow external packages to interfere with the installation process (or simply respect the "excludepkgs" directive).
Can you give me your opinion on this, and if possible a workaround?

Cheers,
Julien

@stdweird
Copy link
Member

stdweird commented Dec 3, 2015

salut julien,

I found the following problem and I'm not able to find a solution by
myself. Here's the details:

  • I'm adding a repository on one of my clusters which contains a
    version of perl-common-sense considered as newer by yum
    (unfortunately I can't give you a pointer to this repo since it's a
    paying extension to a Nagios-like software called Centreon).
    do you need the "newer" version or not? depending on the answer,
    different possibilities arise.
  • when installing the machine, right after the first reboot I have
    the following error when running ccm-fetch
    you mean AII or the first reboot after adding this reboot on an already
    existing repo?

$ ccm-fetch Can't locate common/sense.pm in @inc (@inc contains:
/opt/edg/lib/perl /usr/lib/perl > /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 /usr/lib64/perl5/JSON/XS.pm line 104. (...)

Because of this package, the module is on another location:

$ locate common/sense.pm
/usr/lib/perl5/vendor_perl/common/sense.pm
hmmm, are you sure you got the correct repo? do they have 64bit rpms or
noarch ones? (that should look under /usr/lib64/perl5/vendor_perl. on
fc20 and el7, this is installed under /usr/share/perl5/vendor_perl since
it's noarch)

can you share
rpm -q --filesbypkg perl-common-sense
?

  • I can manually set PERL5LIB but it doesn't work with ncm-ncd for
    some reason:

$export PERL5LIB=/usr/lib/perl5/vendor_perl $ ccm-fetch updated
/var/lib/ccm/data/... updated /var/lib/ccm/latest.cid updated
/var/lib/ccm/current.cid updated /var/lib/ccm/data/... updated
/var/lib/ccm/profile.1/profile.url updated
/var/lib/ccm/profile.1/profile.xml

ncm-ncd --configure --all Can't locate common/sense.pm in @inc
(@inc contains: /usr/lib/perl /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
/usr/lib64/perl5/JSON/XS.pm line 104. (...)
this is normal, the daemons run with a strict INC.

  • I of course marked perl-common-sense as an excluded package in the
    definition of the repository, but it doesn't seem to work during the
    installation process. The repositories are not set yet:
    can you clarify a bit what you mean here? what did you configure where?
    are you saying that the exclude definitions are not set in aii? (if so,
    open an issue in AII for this).

$ ll /etc/yum.repos.d/ -rw-r--r--. 1 root root 1837 Feb 20 2012
sl6x.repo -rw-r--r--. 1 root root 2817 Mar 7 2013 sl-other.repo
-rw-r--r--. 1 root root 1767 Aug 17 17:23 sl.repo

I don't know what's happening under the hood and if it's considered
normal behaviour
it's normal in the sense that the INC paths are limited to the default +
the one that quattor uses.

or it's something that should be fixed in Quattor in

order not to allow external packages to interfere with the
installation process (or simply respect the "excludepkgs"
directive).
certainly this needs to be fixed (and will indeed fix your issue if you
can live without the custom/updated version).

Can you give me your opinion on this, and if possible a

workaround?

  • lock the version of perl-common-sense to something that works/is
    provided by other repo, while we sort out the other details. AII should
    only try to install the locked version, which is provided by an upstream
    repo. (you can use wildcards, e.g. centos7 now ships
    perl-common-sense-3.6-4.el7.noarch
    you could lock with
    pkg_repl('perl-common-sense', '3.*', 'noarch');

so only lock the major version, i'd be surprised if redhat would do a
major version bump in an OS lifetime, so you would still receive any
updates.

ugly hacks

  • remove the rpm from the external repo
    long term
  • contact the provider and ask them nicely to package noarch rpm in
    /usr/share/... like the OS ones do.

stijn

Cheers, Julien

--- Reply to this email directly or view it on GitHub:
#52

ttyS4 pushed a commit to ttyS4/ncm-ncd that referenced this issue Dec 15, 2017
CCM Fetch warn when dealing with "profiles from future" due to timesync issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants