On Thu, Oct 27, 2011 at 16:03, Dan White ygor@comcast.net wrote:
----- Greg Swift gregswift@gmail.com wrote:
On Wed, Oct 26, 2011 at 20:40, Dan White ygor@comcast.net wrote:
On Oct 26, 2011, at 8:36 PM, Greg Swift wrote:
On Wed, Oct 26, 2011 at 19:06, Dan White ygor@comcast.net wrote:
So, if I understand the patterns (I'm new to using producer/consumer patterns), I set up a Pulp Server to manage the mirror-repositories (producer) and point the Cobbler Server at them (as a client/consumer) and let Cobbler feed out the RPM's to the cobbler-ized client-hosts.
You can actually have Cobbler do pass through repositories to pulp if
you
uncheck 'mirror locally' under advanced (I believe that is the right option).
This sounds very do-able !
I have a repo on my Cobbler server of RPM's that are not from another repo, so I have to run "createrepo" manually whenever I update the collection. The client-hosts connecting thru Cobbler pick up the
changes.
OK, one more question: I'm using Red Hat Enterprise Linux 5. Can I
still
register these client-hosts with Red Hat Network ? I recently
encountered a
problem with Cobbler-generated yum mirror-repositories and the yum-rhn-plugin not playing nice together.
I use cobbler+rhn regularly and haven't seen any issues. feel free to bring this up in #cobbler on freenode or on the cobbler list.
I have brought it up on the cobbler list (not dev) <
http://www.mail-archive.com/cobbler@lists.fedorahosted.org/msg06621.html%3E
and did not get any helpful information, and no one is active on the
IRC
every time I have tried -- #cobbler Right ? Is there a #cobbler-dev ?
So looking at your problem, I'm actually concerned that you were not
gettign
the error on both version of yum-rhn-plugin. If the repositories are
named
the same thing, it should always complain. Maybe they just increased the verbosity of the check, which is unfortunate to you, but is technicaly correct. I'd say the better solution is to rename the name of the repository in cobbler rather than disabling the update of the package.
Am I missing something?
I think you are missing something. Or I am.
Let me use the name of the offending repo as a specific example:
Cobbler/Kickstart-Server (call it cobb) builds host foo
After it finishes, on foo, any yum command fails with error message: "Repository rhel-x86_64-server-5 is listed more than once in the configuration" unless I include a command line option of "--disableplugin=rhnplugin"
RedHat Support told me to edit /etc/yum.repos.d/cobbler-config.repo and change the entry for rhel-x86_64-server-5
The file is generated by cobbler and the particular entry in question reads:
[rhel-x86_64-server-5] name=rhel-x86_64-server-5 baseurl=http://<cobb's IP>/cobbler/repo_mirror/rhel-x86_64-server-5 enabled=1 priority=99 gpgcheck=0
So I change the first line to read: [mirror-rhel-x86_64-server-5]
and yum commands work again on foo.
Now, back to cobb. This is where I may have shot off my own foot.
#cobbler repo report --name=rhel-x86_64-server-5 Name : rhel-x86_64-server-5 Arch : x86_64 Breed : rhn Comment : Local RHEL - Server Core (v. 5 for 64-bit x86_64) Createrepo Flags : <<inherit>> Environment Variables : {} Keep Updated : True Mirror : rhn://rhel-x86_64-server-5 Mirror locally : True Owners : ['admin'] Priority : 99 RPM List : [] Yum Options :
I am of the opinion that this repo name and the name on the host, foo, should be the same. So I changed it. and then tried a "cobbler reposync --only=mirror-rhel-x86_64-server-5" and I get (edited down):
... Exception value: 'ERROR: repository mirror-rhel-x86_64-server-5 needs to be renamed rhel-x86_64-server-5 as the name of the cobbler repository must match the name of the RHN channel' ... !!! TASK FAILED !!!
So I resort to backing the yum-rhn-plugin on foo down to yum-rhn-plugin-0.5.4-22.el from yum-rhn-plugin-0.5.4-22.el5_7.2 and adding an exception in /etc/yum.conf
Contrarywise, RH Support further told me I can edit a file (/etc/yum/pluginconf.d/rhnplugin.conf) and set a section as follows: [main] enabled = 0 gpgcheck = 1
This has the same effect of the --disableplugin command line option, but I am concerned about what other effect this may have.
Does that remove some of the fog or make it worse ?
I think i get what is happening. Correct me if I get something wrong:
1: You have your standard RHN setup that your servers will attach to 2: In your cobbler build environment you are mirroring the RHEL base channel from RHN so that it can be used during installation for install time updates 3: Your cobbler setup then configures your cobbler repos to be present post-installation as well
Once I saw this I went and checked to see why I wasn't having this problem because I actually thought I was doing the exact same thing.
Apparently, I started to set this up, I have the repo being mirrored but I've never attached it inside any of my profiles.
So if I interpreted that correctly then, yes, its breaking because it has duplicate repositories configured. If i'm wrong ignore the following:
I guess the trick to making this "right" would be something along the lines of:
if redhat_management_type is enabled then the generated repo configuration should not include any repositories of the type 'rhn' because of the conflict potential.
OR
cobbler could prefix the repositories with cobbler- in the name when it generates the client configuration file. Since cobbler's configured repo have a lower priority, you'd always just get your packages from RHN.
But either way, I don't think that yum-plugin is the problem.