Bug 895995 - Exception occured while running cobbler reposync.
Summary: Exception occured while running cobbler reposync.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: cobbler
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: James C.
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-16 13:05 UTC by Juris Krumins
Modified: 2013-01-16 14:17 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-16 14:01:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Juris Krumins 2013-01-16 13:05:43 UTC
Description of problem:

Running following command ended up with mentioned exception.

[root@localhost pxelinux.cfg]# cobbler reposync
..... cut .......
received on stderr: 
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'no /usr/bin/wget found, please install wget'
Exception Info:
  File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 126, in die
    raise CX(msg)

Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'no /usr/bin/wget found, please install wget'
Exception Info:
  File "/usr/lib/python2.7/site-packages/cobbler/action_reposync.py", line 125, in run
    self.sync(repo)
   File "/usr/lib/python2.7/site-packages/cobbler/action_reposync.py", line 169, in sync
    return self.yum_sync(repo)
   File "/usr/lib/python2.7/site-packages/cobbler/action_reposync.py", line 407, in yum_sync
    utils.die(self.logger,"no /usr/bin/wget found, please install wget")
   File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 134, 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.7/site-packages/cobbler/utils.py", line 126, 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.7/site-packages/cobbler/remote.py", line 89, in run
    rc = self._run(self)
   File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 251, in runner
    name=None, nofail=nofail, logger=self.logger)
   File "/usr/lib/python2.7/site-packages/cobbler/api.py", line 758, in reposync
    return reposync.run(name)
   File "/usr/lib/python2.7/site-packages/cobbler/action_reposync.py", line 147, in run
    utils.die(self.logger,"reposync failed, retry limit reached, aborting")
   File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 134, in die
    raise CX(msg)

!!! TASK FAILED !!!
[root@localhost pxelinux.cfg]#



Version-Release number of selected component (if applicable):

[root@localhost pxelinux.cfg]# cat /etc/fedora-release 
Fedora release 18 (Spherical Cow)
[root@localhost pxelinux.cfg]# rpm -q cobbler
cobbler-2.2.3-3.fc18.noarch
[root@localhost pxelinux.cfg]# 



How reproducible:

Every time you run cobbler reposync

Steps to Reproduce:
1.Define external repo in cobbler
2.Run cobbler reposync
3.Get error
  
Actual results:

[root@localhost pxelinux.cfg]# cobbler reposync
..... cut .......
received on stderr: 
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'no /usr/bin/wget found, please install wget'
Exception Info:
  File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 126, in die
    raise CX(msg)

Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'no /usr/bin/wget found, please install wget'
Exception Info:
  File "/usr/lib/python2.7/site-packages/cobbler/action_reposync.py", line 125, in run
    self.sync(repo)
   File "/usr/lib/python2.7/site-packages/cobbler/action_reposync.py", line 169, in sync
    return self.yum_sync(repo)
   File "/usr/lib/python2.7/site-packages/cobbler/action_reposync.py", line 407, in yum_sync
    utils.die(self.logger,"no /usr/bin/wget found, please install wget")
   File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 134, 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.7/site-packages/cobbler/utils.py", line 126, 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.7/site-packages/cobbler/remote.py", line 89, in run
    rc = self._run(self)
   File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 251, in runner
    name=None, nofail=nofail, logger=self.logger)
   File "/usr/lib/python2.7/site-packages/cobbler/api.py", line 758, in reposync
    return reposync.run(name)
   File "/usr/lib/python2.7/site-packages/cobbler/action_reposync.py", line 147, in run
    utils.die(self.logger,"reposync failed, retry limit reached, aborting")
   File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 134, in die
    raise CX(msg)

!!! TASK FAILED !!!
[root@localhost pxelinux.cfg]#


Expected results:

.... cut ....
received on stdout: Spawning worker 0 with 6346 pkgs
Worker 0: 
Worker 0: iso-8859-1 encoding on Ville Skytt� <ville.skytta> - 2.8.2-2
Worker 0: 
Workers Finished
Gathering worker results

Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete

received on stderr: 
creating: /var/www/cobbler/repo_mirror/CTCO-repo/config.repo
running: chown -R root:apache /var/www/cobbler/repo_mirror/CTCO-repo
received on stdout: 
received on stderr: 
running: chmod -R 755 /var/www/cobbler/repo_mirror/CTCO-repo
received on stdout: 
received on stderr: 
*** TASK COMPLETE ***

Additional info:

I believe it's necessary to include wget in cobbler rpm package spec file as Require.

Comment 1 James C. 2013-01-16 14:01:54 UTC
Cobbler intentionally leaves a lot of requires off the list, because many of them are feature-specific, for instance many users don't use reposync. We pretty much only require what is needed for core functionality and don't force people to install a lot of unnecessary packages if they don't need them. Also, some people prefer curl over wget, so cobbler (if I remember right) checks for both. Frankly, it is quite rare to find a system that has neither curl nor wget so this is a rare error.

That being said, cobbler should handle the error more gracefully than a stack dump (this is a long running bug, already tracked on github), and a "cobbler check" option could be added to determine if any mirrored repos exist and to check that wget exists. 

So, I'm going to close this here as NOTABUG, with the caveat that I'm tracking it via pre-existing issues opened on github related to user experience (https://github.com/cobbler/cobbler/issues/396).

Comment 2 Juris Krumins 2013-01-16 14:17:47 UTC
Good.

Thanks for short explanation.(In reply to comment #1)

> Cobbler intentionally leaves a lot of requires off the list, because many of
> them are feature-specific, for instance many users don't use reposync. We
> pretty much only require what is needed for core functionality and don't
> force people to install a lot of unnecessary packages if they don't need
> them. Also, some people prefer curl over wget, so cobbler (if I remember
> right) checks for both. Frankly, it is quite rare to find a system that has
> neither curl nor wget so this is a rare error.
> 
> That being said, cobbler should handle the error more gracefully than a
> stack dump (this is a long running bug, already tracked on github), and a
> "cobbler check" option could be added to determine if any mirrored repos
> exist and to check that wget exists. 
> 
> So, I'm going to close this here as NOTABUG, with the caveat that I'm
> tracking it via pre-existing issues opened on github related to user
> experience (https://github.com/cobbler/cobbler/issues/396).


Note You need to log in before you can comment on or make changes to this bug.