All,
attempting to add EPEL by repo adding + reposync(ing) does not appear to work:
*Add the repository* sudo cobbler repo add --name=epel6-x86_64 --breed=yum --mirror= http://dl.fedoraproject.org/pub/epel/6/x86_64
*Attempting to reposync:* sudo cobbler reposync task started: 2012-04-04_221206_reposync task started (id=Reposync, time=Wed Apr 4 22:12:06 2012) hello, reposync run, reposync, run! creating: /var/www/cobbler/repo_mirror/epel6-x86_64/.origin/epel6-x86_64.repo running: /usr/bin/reposync -l -m -d --config=/var/www/cobbler/repo_mirror/epel6-x86_64/.origin/epel6-x86_64.repo --repoid=epel6-x86_64 --download_path=/var/www/cobbler/repo_mirror -a x86_64 received on stdout: received on stderr: error: cannot open Packages database in /var/lib/rpm Traceback (most recent call last): File "/usr/bin/reposync", line 348, in <module> main() File "/usr/bin/reposync", line 148, in main my.doConfigSetup(fn=opts.config, init_plugins=opts.plugins) File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 244, in doConfigSetup return self.conf File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 887, in <lambda> conf = property(fget=lambda self: self._getConfig(), File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 295, in _getConfig startupconf = config.readStartupConfig(fn, root) File "/usr/lib/python2.6/site-packages/yum/config.py", line 878, in readStartupConfig startupconf.releasever = _getsysver(startupconf.installroot, startupconf.distroverpkg) File "/usr/lib/python2.6/site-packages/yum/config.py", line 1023, in _getsysver raise Errors.YumBaseError("Error: " + str(e)) yum.Errors.YumBaseError: Error: rpmdb open failed
Exception occured: <class 'cobbler.cexceptions.CX'> Exception value: 'cobbler reposync failed' Exception Info: File "/usr/lib/python2.6/site-packages/cobbler/utils.py", line 123, in die raise CX(msg)
Exception occured: <class 'cobbler.cexceptions.CX'> Exception value: 'cobbler reposync failed' Exception Info: File "/usr/lib/python2.6/site-packages/cobbler/action_reposync.py", line 119, in run self.sync(repo) File "/usr/lib/python2.6/site-packages/cobbler/action_reposync.py", line 150, in sync return self.yum_sync(repo) File "/usr/lib/python2.6/site-packages/cobbler/action_reposync.py", line 383, in yum_sync utils.die(self.logger,"cobbler reposync failed") File "/usr/lib/python2.6/site-packages/cobbler/utils.py", line 131, in die raise CX(msg)
reposync failed, tries left: 0 Exception occured: <class 'cobbler.cexceptions.CX'> Exception value: 'reposync failed, retry limit reached, aborting' Exception Info: File "/usr/lib/python2.6/site-packages/cobbler/utils.py", line 123, in die raise CX(msg)
Exception occured: <class 'cobbler.cexceptions.CX'> Exception value: 'reposync failed, retry limit reached, aborting' Exception Info: File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 95, in run rc = self._run(self) File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 244, in runner name=None, nofail=nofail, logger=self.logger) File "/usr/lib/python2.6/site-packages/cobbler/api.py", line 637, in reposync return reposync.run(name) File "/usr/lib/python2.6/site-packages/cobbler/action_reposync.py", line 128, in run utils.die(self.logger,"reposync failed, retry limit reached, aborting") File "/usr/lib/python2.6/site-packages/cobbler/utils.py", line 131, in die raise CX(msg)
!!! TASK FAILED !!!
Now, it appears that the EPEL repo does not have a repodata folder whatsoever ... so it makes sense that the following won't work. I'm unclear what the next steps would be to add EPEL..*
Any help would be much appreciated! * Thanks :-)
On Wed, Apr 4, 2012 at 5:15 PM, Jack Peterson jack.peterson@gmail.com wrote:
All,
attempting to add EPEL by repo adding + reposync(ing) does not appear to work:
Add the repository sudo cobbler repo add --name=epel6-x86_64 --breed=yum --mirror=http://dl.fedoraproject.org/pub/epel/6/x86_64
Attempting to reposync: sudo cobbler reposync task started: 2012-04-04_221206_reposync task started (id=Reposync, time=Wed Apr 4 22:12:06 2012) hello, reposync run, reposync, run! creating: /var/www/cobbler/repo_mirror/epel6-x86_64/.origin/epel6-x86_64.repo running: /usr/bin/reposync -l -m -d --config=/var/www/cobbler/repo_mirror/epel6-x86_64/.origin/epel6-x86_64.repo --repoid=epel6-x86_64 --download_path=/var/www/cobbler/repo_mirror -a x86_64 received on stdout: received on stderr: error: cannot open Packages database in /var/lib/rpm Traceback (most recent call last): File "/usr/bin/reposync", line 348, in <module> main() File "/usr/bin/reposync", line 148, in main my.doConfigSetup(fn=opts.config, init_plugins=opts.plugins) File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 244, in doConfigSetup return self.conf File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 887, in
<lambda> conf = property(fget=lambda self: self._getConfig(), File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 295, in _getConfig startupconf = config.readStartupConfig(fn, root) File "/usr/lib/python2.6/site-packages/yum/config.py", line 878, in readStartupConfig startupconf.releasever = _getsysver(startupconf.installroot, startupconf.distroverpkg) File "/usr/lib/python2.6/site-packages/yum/config.py", line 1023, in _getsysver raise Errors.YumBaseError("Error: " + str(e)) yum.Errors.YumBaseError: Error: rpmdb open failed
This seems to be the error - it's not able to open your RPM db in /var/lib/rpm. Are you running SELinux? I see you're running it via sudo, which could be the issue if you're running SELinux but not specifying the role in the sudoers file.
OK,,
this is a bit interesting... when running /usr/bin/reposync -l -m -d --config=/var/www/cobbler/repo_mirror/epel6-x86_64/.origin/epel6-x86_64.repo --repoid=epel6-x86_64 --download_path=/var/www/cobbler/repo_mirror -a x86_64
as root the epel library starts to download. Is this an SELinux issue, and if so... what would I need to do to fix this (without disabling SELinux altogether)?
apologies in advance for the noob question :-)
- Jack
On Wed, Apr 4, 2012 at 3:34 PM, James Cammarata jimi@sngx.net wrote:
On Wed, Apr 4, 2012 at 5:15 PM, Jack Peterson jack.peterson@gmail.com wrote:
All,
attempting to add EPEL by repo adding + reposync(ing) does not appear to work:
Add the repository sudo cobbler repo add --name=epel6-x86_64 --breed=yum --mirror=http://dl.fedoraproject.org/pub/epel/6/x86_64
Attempting to reposync: sudo cobbler reposync task started: 2012-04-04_221206_reposync task started (id=Reposync, time=Wed Apr 4 22:12:06 2012) hello, reposync run, reposync, run! creating: /var/www/cobbler/repo_mirror/epel6-x86_64/.origin/epel6-x86_64.repo running: /usr/bin/reposync -l -m -d
--config=/var/www/cobbler/repo_mirror/epel6-x86_64/.origin/epel6-x86_64.repo
--repoid=epel6-x86_64 --download_path=/var/www/cobbler/repo_mirror -a
x86_64
received on stdout: received on stderr: error: cannot open Packages database in /var/lib/rpm Traceback (most recent call last): File "/usr/bin/reposync", line 348, in <module> main() File "/usr/bin/reposync", line 148, in main my.doConfigSetup(fn=opts.config, init_plugins=opts.plugins) File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 244, in doConfigSetup return self.conf File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 887, in
<lambda> conf = property(fget=lambda self: self._getConfig(), File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 295, in _getConfig startupconf = config.readStartupConfig(fn, root) File "/usr/lib/python2.6/site-packages/yum/config.py", line 878, in readStartupConfig startupconf.releasever = _getsysver(startupconf.installroot, startupconf.distroverpkg) File "/usr/lib/python2.6/site-packages/yum/config.py", line 1023, in _getsysver raise Errors.YumBaseError("Error: " + str(e)) yum.Errors.YumBaseError: Error: rpmdb open failed
This seems to be the error - it's not able to open your RPM db in /var/lib/rpm. Are you running SELinux? I see you're running it via sudo, which could be the issue if you're running SELinux but not specifying the role in the sudoers file. _______________________________________________ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler
On Thu, Apr 5, 2012 at 12:01 AM, Jack Peterson jack.peterson@gmail.com wrote:
OK,,
this is a bit interesting... when running /usr/bin/reposync -l -m -d --config=/var/www/cobbler/repo_mirror/epel6-x86_64/.origin/epel6-x86_64.repo --repoid=epel6-x86_64 --download_path=/var/www/cobbler/repo_mirror -a x86_64
as root the epel library starts to download. Is this an SELinux issue, and if so... what would I need to do to fix this (without disabling SELinux altogether)?
apologies in advance for the noob question :-)
Check your alert log (sealert or audit2allow) and correct the issue. Running "cobbler check" also prints out a couple of commands to run if it detects SELinux is enabled, so you may need to run those if you haven't already.
Beyond that, sudo added support for transitioning role/type during a command, so you can setup "sudo cobbler" to run under the correct settings.
All,
the issue was in fact SELinux related. While I'm not sure what exactly needs to be done to resolve the issue in the long term.. the following is a temporary work-around.
*setenforce permissive*
allows me to perform the reposync, so for the moment I'm satisfied with this.
perhaps in a little bit I'll perform a complete rebuild of the cobbler server in the near future and see if I can reproduce the issue from the ground up.
Thanks all!
On Wed, Apr 4, 2012 at 10:20 PM, James Cammarata jimi@sngx.net wrote:
On Thu, Apr 5, 2012 at 12:01 AM, Jack Peterson jack.peterson@gmail.com wrote:
OK,,
this is a bit interesting... when running /usr/bin/reposync -l -m -d
--config=/var/www/cobbler/repo_mirror/epel6-x86_64/.origin/epel6-x86_64.repo
--repoid=epel6-x86_64 --download_path=/var/www/cobbler/repo_mirror -a
x86_64
as root the epel library starts to download. Is this an SELinux issue,
and
if so... what would I need to do to fix this (without disabling SELinux altogether)?
apologies in advance for the noob question :-)
Check your alert log (sealert or audit2allow) and correct the issue. Running "cobbler check" also prints out a couple of commands to run if it detects SELinux is enabled, so you may need to run those if you haven't already.
Beyond that, sudo added support for transitioning role/type during a command, so you can setup "sudo cobbler" to run under the correct settings. _______________________________________________ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler
On Fri, Apr 6, 2012 at 4:00 PM, Jack Peterson jack.peterson@gmail.com wrote:
All,
the issue was in fact SELinux related. While I'm not sure what exactly needs to be done to resolve the issue in the long term.. the following is a temporary work-around.
setenforce permissive
allows me to perform the reposync, so for the moment I'm satisfied with this.
perhaps in a little bit I'll perform a complete rebuild of the cobbler server in the near future and see if I can reproduce the issue from the ground up.
Using audit2allow is the easiest way to create a custom policy, just make sure you know what you're allowing.
cobbler@lists.fedorahosted.org