Issue #1238 has been updated by Matt Behrens.

I think I'm also tripping over this.  I started with this class:

https://github.com/Lullabot/lullapuppet/blob/4b86efe0a9c517abdb78bde883cf7db0e9d83513/asterisk/manifests/init.pp

which worked fine.  I then added this manifest:

https://gist.github.com/zigg/7419220

and now I'm getting puppet attempting to create asterisk-11.repo and enabling 
it with no baseurl.  The hopefully-relevant section of puppet apply --debug 
--verbose looks like this:

<pre>
Info: Applying configuration version '1384198322'
Debug: Prefetching rpm resources for package
Debug: Executing '/bin/rpm --version'
Debug: Executing '/bin/rpm -qa --nosignature --nodigest --qf '%{NAME} 
%|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH} :DESC: %{SUMMARY}\n''
Debug: Prefetching yum resources for package
Debug: Executing '/bin/rpm --version'
Debug: Executing '/bin/rpm -qa --nosignature --nodigest --qf '%{NAME} 
%|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH} :DESC: %{SUMMARY}\n''
Debug: Executing '/bin/rpm -q asterisknow-version --nosignature --nodigest --qf 
'%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH} :DESC: 
%{SUMMARY}\n''
Debug: Executing '/bin/rpm -i 
http://packages.asterisk.org/centos/6/current/x86_64/RPMS/asterisknow-version-3.0.0-1_centos6.noarch.rpm'
Notice: /Stage[main]/Asterisk/Package[asterisknow-version]/ensure: created
Debug: /Stage[main]/Asterisk/Package[asterisknow-version]: The container 
Class[Asterisk] will propagate my refresh event
Info: create new repo asterisk-11 in file /etc/yum.repos.d/asterisk-11.repo
Notice: /Stage[main]/Asterisk/Yumrepo[asterisk-11]/enabled: enabled changed '' 
to '1'
Info: changing mode of /etc/yum.repos.d/asterisk-11.repo from 600 to 644
Debug: /Stage[main]/Asterisk/Yumrepo[asterisk-11]: The container 
Class[Asterisk] will propagate my refresh event
Debug: Executing '/bin/rpm -q asterisk --nosignature --nodigest --qf '%{NAME} 
%|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH} :DESC: %{SUMMARY}\n''
Debug: Package[asterisk](provider=yum): Ensuring => present
Debug: Executing '/usr/bin/yum -d 0 -e 0 -y install asterisk'
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install asterisk' returned 1: 
Error: Cannot find a valid baseurl for repo: asterisk-11
</pre>

Interestingly, until I added the epel bits (starting with package 
'epel-release'), it was still working OK.

----------------------------------------
Bug #1238: strange yumrepo/package interaction
https://projects.puppetlabs.com/issues/1238#change-99774

* Author: BMDan -
* Status: Needs More Information
* Priority: Normal
* Assignee: Gerard Bernabeu
* Category: yumrepo
* Target version: 3.x
* Affected Puppet version: 
* Keywords: 
* Branch: 
----------------------------------------
Yumrepo appears to be checking file existence before allowing the package 
command to complete, meaning that it creates a file containing only "[remi]" 
and "enabled=1", overwriting the file that the RPM installed.

Manifests, additional debug output, etc., available upon request.  Just tell me 
what you need to know.  Workarounds especially welcomed.  Puppet v. 0.24.4, 
running with --debug --test, on Ruby 1.8.6.114-1, compiled from source with 
default options.

<pre>
debug: //Node[default]/remi_enabled/Yumrepo[remi]/require: requires 
Package[remi-release-5-4.el5.remi]
</pre>
...
<pre>
debug: Puppet::Type::Package::ProviderRpm: Not suitable: false value
debug: Puppet::Type::Package::ProviderRpm: Executing '/bin/rpm -q 
remi-release-5-4.el5.remi --nosignature --nodigest --qf %{NAME} 
%|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}'
debug: /Package[remi-release-5-4.el5.remi]: Changing ensure
debug: /Package[remi-release-5-4.el5.remi]: 1 change(s)
debug: Puppet::Type::Package::ProviderRpm: Executing '/bin/rpm -i --oldpackage 
http://rpms.famillecollet.com/el5.x86_64/remi-release-5-4.el5.remi.noarch.rpm'
notice: /Package[remi-release-5-4.el5.remi]/ensure: created
info: create new repo remi in file /etc/yum.repos.d/remi.repo
debug: //Node[default]/remi_enabled/Yumrepo[remi]: Changing enabled
debug: //Node[default]/remi_enabled/Yumrepo[remi]: 1 change(s)
notice: //Node[default]/remi_enabled/Yumrepo[remi]/enabled: defined 'enabled' 
as '1'
info: Filebucket[/var/lib/puppet/clientbucket]: Adding 
/etc/yum.repos.d/remi.repo(18f7009978e772c9c646b9410fa3a8b6)
</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to