[Puppet Users] Re: A section with name main already exists (Bug 5231)

2011-01-11 Thread jcbollinger

On Jan 11, 10:24 am, Arnau Bria  wrote:
> On Tue, 11 Jan 2011 07:04:19 -0800 (PST)
>
> jcbollinger jcbollinger wrote:
> > I assume that yum itself is not complaining, so perhaps it is silently
> > ignoring the [main] sections in your .repo files.  If that's the case
> > then the best workaround is probably to just remove those sections.
>
> Ok, I will do that, but seems strange to me that puppet is failing when
> yum doesn't resulting in puppet more restrictive than yum...

I agree that it's strange, and I encourage you to file a ticket about
it.  I suppose that Puppet is trying to treat [main] in your .repo
files as a repository section instead of as a superfluous main
section.  If that's what the problem is then it should be fairly
straightforward to fix.

Cheers,

John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: A section with name main already exists (Bug 5231)

2011-01-11 Thread Arnau Bria
On Tue, 11 Jan 2011 07:04:19 -0800 (PST)
jcbollinger jcbollinger wrote:

Hi,

> Bug 5231 is about the lack of clarity and specificity in error
> messages about conflicts between yum repos, not about the fact that an
> error was raised in the first place. It sounds like you are expecting
> Puppet to successfully apply your manifest.  If indeed it should do
> so, then you should file a separate ticket.

Ok then, sorry for confusing things. As I have a repo conflict problem
I thought it was the same case. 

> However, it's not clearcut to me that Puppet should do that.  Do
> versions of yum more recent than 3.2.22 in fact allow [main] sections
> to appear in .repo files?  Version 3.2.22 does not.  From the man page
> for yum.conf(5): "There should be only one [main] section. [...] The
> [main] section must exist" (perforce in yum.conf) "for yum to do
> anything."  If the yum configuration on your system is faulty then I
> think it reasonable for Puppet to raise an error in response.

My version is yum-2.4.1-11.slc4, its man says same as yours but I
have a main section per repo, which is "correct/acceptable" as yum works
perfectly and it's distro default. I've tested my conf  (adding some
empty main sections per repo ) in Centos 5 with yum 3.2.22 and yum
still works fine, ignoring those section.

# yum install foo
Loading "changelog" plugin
Loading "installonlyn" plugin
[...]
No Match for argument: foo
Nothing to do

 
> I assume that yum itself is not complaining, so perhaps it is silently
> ignoring the [main] sections in your .repo files.  If that's the case
> then the best workaround is probably to just remove those sections.

Ok, I will do that, but seems strange to me that puppet is failing when
yum doesn't resulting in puppet more restrictive than yum...

> Alternatively, if yum is in fact using all those [main] sections then
> you may be able to work around the problem by, for example, merging
> all the [main] sections together into yum.conf (if that's indeed
> equivalent to what yum does with them).

> Cheers,
> John
Many thanks for your reply John,
Cheers,
Arnau

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: A section with name main already exists (Bug 5231)

2011-01-11 Thread jcbollinger

On Jan 11, 4:02 am, Arnau Bria  wrote:
> Hi all,
>
> I'm facing the bug 5231 when running puppet: host has some repos with
> many section main defined:
>
> # grep main *
> atrpms.repo:[main]
> cern-extra.repo:[main]
> cern-extra-srpms.repo:[main]
> cern-only.repo:[main]
> cern-only-srpms.repo:[main]
> cern.repo:[main]
> cern-srpms.repo:[main]
> cern-test.repo:[main]
> cern-test-srpms.repo:[main]
> cern-update.repo:[main]
> cern-update-srpms.repo:[main]
> dag.repo:[main]
> rhaps2.repo:[main]
> rhaps2-srpms.repo:[main]
>
> and puppet complains about it when adding a repo with no main section:
>
> # cat puppet-local-repo.repo
> [puppet-local-repo]
> name=puppet-local-repo
>
> I see no solution on puppet-bug and the only way I found to by-pass it
> is moving yum.repos.d direcotry.
>
> anyone who already faced it could give me a workaround?

Bug 5231 is about the lack of clarity and specificity in error
messages about conflicts between yum repos, not about the fact that an
error was raised in the first place.  It sounds like you are expecting
Puppet to successfully apply your manifest.  If indeed it should do
so, then you should file a separate ticket.

However, it's not clearcut to me that Puppet should do that.  Do
versions of yum more recent than 3.2.22 in fact allow [main] sections
to appear in .repo files?  Version 3.2.22 does not.  From the man page
for yum.conf(5): "There should be only one [main] section. [...] The
[main] section must exist" (perforce in yum.conf) "for yum to do
anything."  If the yum configuration on your system is faulty then I
think it reasonable for Puppet to raise an error in response.

I assume that yum itself is not complaining, so perhaps it is silently
ignoring the [main] sections in your .repo files.  If that's the case
then the best workaround is probably to just remove those sections.
Alternatively, if yum is in fact using all those [main] sections then
you may be able to work around the problem by, for example, merging
all the [main] sections together into yum.conf (if that's indeed
equivalent to what yum does with them).


Cheers,

John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.