Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Unable to use repo I've just installed #28

Open
MrReasonable opened this issue Oct 21, 2013 · 2 comments
Open

Unable to use repo I've just installed #28

MrReasonable opened this issue Oct 21, 2013 · 2 comments

Comments

@MrReasonable
Copy link

Is it just me or does this module not do a yum clean after adding a new repo?

After I add the a repo, I need to provision again before I can actually use it. I've got a convoluted set of requires setup in my own modules to achieve this but it makes my module files look a little messy.

@campos-ddc
Copy link
Contributor

I think I have a similar issue in Centos7, tested with a simple single provision file:

class { 'yum':
    extrarepo => [ 'epel' , 'rpmforge' ],
}
->
exec { "yum-update":
    command => "/usr/bin/yum makecache fast;/usr/bin/yum update -y",
}
->
package {
    [
        "hdf5-devel",
        "libqxt-devel",
        "libyaml-devel",
        "unrar",
    ]:
    ensure => installed,
    allow_virtual => true,
}

Will always fail with ==> default: Error: /Stage[main]/Main/Package[hdf5-devel]/ensure: change from absent to present failed: Execution of '/bin/yum -d 0 -e 0 -y install hdf5-devel' returned 1: Error: Nothing to do when ran for the first time.

Running provision again will work.

Full output goes:

==> default:    (at /usr/share/ruby/vendor_ruby/puppet/type/package.rb:430:in `block (3 levels) in <module:Puppet>')
==> default: Info: Applying configuration version '1427289427'
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel]/File[/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7]/ensure: defined content as '{md5}58fa8ae27c89f37b08429f04fd4a88cc'
==> default: Notice: /Stage[main]/Yum::Repo::Rpmforge/Yum::Managed_yumrepo[rpmforge]/File[/etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag]/ensure: defined content as '{md5}a44f72c72b873d0f8f3021690bb3e52f'
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel-testing-source]/File[/etc/yum.repos.d/epel-testing-source.repo]/ensure: created
==> default: Notice: /Stage[main]/Main/Exec[yum-update]/returns: executed successfully
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel-source]/File[/etc/yum.repos.d/epel-source.repo]/ensure: created
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel-source]/Yumrepo[epel-source]/ensure: created
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel-testing]/File[/etc/yum.repos.d/epel-testing.repo]/ensure: created
==> default: Error: Execution of '/bin/yum -d 0 -e 0 -y install libqxt-devel' returned 1: Error: Nothing to do
==> default: Error: /Stage[main]/Main/Package[libqxt-devel]/ensure: change from absent to present failed: Execution of '/bin/yum -d 0 -e 0 -y install libqxt-devel' returned 1: Error: Nothing to do
==> default: Notice: /Stage[main]/Yum::Repo::Rpmforge/Yum::Managed_yumrepo[rpmforge]/File[/etc/yum.repos.d/rpmforge.repo]/ensure: created
==> default: Notice: /Stage[main]/Yum::Repo::Rpmforge/Yum::Managed_yumrepo[rpmforge]/Yumrepo[rpmforge]/ensure: created
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel-testing-source]/Yumrepo[epel-testing-source]/ensure: created
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel-debuginfo]/File[/etc/yum.repos.d/epel-debuginfo.repo]/ensure: created
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel-debuginfo]/Yumrepo[epel-debuginfo]/ensure: created
==> default: Error: Execution of '/bin/yum -d 0 -e 0 -y install unrar' returned 1: Error: Nothing to do
==> default: Error: /Stage[main]/Main/Package[unrar]/ensure: change from absent to present failed: Execution of '/bin/yum -d 0 -e 0 -y install unrar' returned 1: Error: Nothing to do
==> default: Notice: /Stage[main]/Yum::Prerequisites/Yum::Plugin[priorities]/Package[yum-plugin-priorities]/ensure: created
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel-testing]/Yumrepo[epel-testing]/ensure: created
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel-testing-debuginfo]/File[/etc/yum.repos.d/epel-testing-debuginfo.repo]/ensure: created
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel-testing-debuginfo]/Yumrepo[epel-testing-debuginfo]/ensure: created
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel]/File[/etc/yum.repos.d/epel.repo]/ensure: created
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel]/Yumrepo[epel]/ensure: created
==> default: Error: Execution of '/bin/yum -d 0 -e 0 -y install hdf5-devel' returned 1: Error: Nothing to do
==> default: Error: /Stage[main]/Main/Package[hdf5-devel]/ensure: change from absent to present failed: Execution of '/bin/yum -d 0 -e 0 -y install hdf5-devel' returned 1: Error: Nothing to do
==> default: Notice: /Stage[main]/Main/Package[libyaml-devel]/ensure: created
==> default: Info: Creating state file /var/lib/puppet/state/state.yaml
==> default: Notice: Finished catalog run in 87.38 seconds

@campos-ddc
Copy link
Contributor

Forcing a clean after adding repos does not seem to do anything (it looks like clean is running while extrarepos are still being added):

class { 'yum':
    extrarepo => [ 'epel' , 'rpmforge' ],
}
->
exec { "yum-clean":
    command => "/usr/bin/yum clean all",
}
->
exec { "yum-update":
    command => "/usr/bin/yum makecache fast;/usr/bin/yum update -y",
}
->
package {
    [
        "hdf5-devel",
        "libqxt-devel",
        "libyaml-devel",
        "unrar",
    ]:
    ensure => installed,
    allow_virtual => true,
}

Gives output:

==> default:    (at /usr/share/ruby/vendor_ruby/puppet/type/package.rb:430:in `block (3 levels) in <module:Puppet>')
==> default: Info: Applying configuration version '1427290040'
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel]/File[/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7]/ensure: defined content as '{md5}58fa8ae27c89f37b08429f04fd4a88cc'
==> default: Notice: /Stage[main]/Yum::Repo::Rpmforge/Yum::Managed_yumrepo[rpmforge]/File[/etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag]/ensure: defined content as '{md5}a44f72c72b873d0f8f3021690bb3e52f'
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel-testing-source]/File[/etc/yum.repos.d/epel-testing-source.repo]/ensure: created
==> default: Notice: /Stage[main]/Main/Exec[yum-clean]/returns: executed successfully
==> default: Notice: /Stage[main]/Main/Exec[yum-update]/returns: executed successfully
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel-source]/File[/etc/yum.repos.d/epel-source.repo]/ensure: created
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel-source]/Yumrepo[epel-source]/ensure: created
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel-testing]/File[/etc/yum.repos.d/epel-testing.repo]/ensure: created
==> default: Error: Execution of '/bin/yum -d 0 -e 0 -y install libqxt-devel' returned 1: Error: Nothing to do
==> default: Error: /Stage[main]/Main/Package[libqxt-devel]/ensure: change from absent to present failed: Execution of '/bin/yum -d 0 -e 0 -y install libqxt-devel' returned 1: Error: Nothing to do
==> default: Notice: /Stage[main]/Yum::Repo::Rpmforge/Yum::Managed_yumrepo[rpmforge]/File[/etc/yum.repos.d/rpmforge.repo]/ensure: created
==> default: Notice: /Stage[main]/Yum::Repo::Rpmforge/Yum::Managed_yumrepo[rpmforge]/Yumrepo[rpmforge]/ensure: created
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel-testing-source]/Yumrepo[epel-testing-source]/ensure: created
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel-debuginfo]/File[/etc/yum.repos.d/epel-debuginfo.repo]/ensure: created
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel-debuginfo]/Yumrepo[epel-debuginfo]/ensure: created
==> default: Error: Execution of '/bin/yum -d 0 -e 0 -y install unrar' returned 1: Error: Nothing to do
==> default: Error: /Stage[main]/Main/Package[unrar]/ensure: change from absent to present failed: Execution of '/bin/yum -d 0 -e 0 -y install unrar' returned 1: Error: Nothing to do
==> default: Notice: /Stage[main]/Yum::Prerequisites/Yum::Plugin[priorities]/Package[yum-plugin-priorities]/ensure: created
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel-testing]/Yumrepo[epel-testing]/ensure: created
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel-testing-debuginfo]/File[/etc/yum.repos.d/epel-testing-debuginfo.repo]/ensure: created
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel-testing-debuginfo]/Yumrepo[epel-testing-debuginfo]/ensure: created
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel]/File[/etc/yum.repos.d/epel.repo]/ensure: created
==> default: Notice: /Stage[main]/Yum::Repo::Epel/Yum::Managed_yumrepo[epel]/Yumrepo[epel]/ensure: created
==> default: Error: Execution of '/bin/yum -d 0 -e 0 -y install hdf5-devel' returned 1: Error: Nothing to do
==> default: Error: /Stage[main]/Main/Package[hdf5-devel]/ensure: change from absent to present failed: Execution of '/bin/yum -d 0 -e 0 -y install hdf5-devel' returned 1: Error: Nothing to do
==> default: Notice: /Stage[main]/Main/Package[libyaml-devel]/ensure: created
==> default: Info: Creating state file /var/lib/puppet/state/state.yaml
==> default: Notice: Finished catalog run in 94.05 seconds

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants