I am getting errors with cobbler import with --path=rsync://...
This is the first time I tried since upgrading to CentOS 7 cobbler-2.8.0-4.el7.x86_64, it used to work for me with version 2.6.
Here is the command and error to console (please excuse the line-folding):
$ sudo cobbler import --name=CentOStest --breed=redhat --os-version=rhel6 --arch=x86_64 --path=rsync://mirrors.greenmountainaccess.net/centos/6.9/os/ task started: 2017-04-28_161835_import task started (id=Media import, time=Fri Apr 28 16:18:35 2017) Exception occured: <class 'cobbler.cexceptions.CX'> Exception value: 'Command failed' Exception Info: File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 82, in run rc = self._run(self) File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 226, in runner self.logger File "/usr/lib/python2.7/site-packages/cobbler/api.py", line 876, in import_tree utils.run_this(rsync_cmd, (spacer, mirror_url, path), self.logger) File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 899, in run_this die(logger,"Command failed") File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 114, in die raise CX(msg)
!!! TASK FAILED !!!
In cobbler.log: Thu Apr 27 12:55:09 2017 - DEBUG | REMOTE CLI Authorized; user(? Thu Apr 27 12:55:09 2017 - INFO | REMOTE start_task(Reposync); event_id(2017-04-27_125509_reposync); user(?) Thu Apr 27 12:55:10 2017 - INFO | reposync; ['centos6-updates-x86_64'] Fri Apr 28 14:57:09 2017 - DEBUG | REMOTE expiring token; user(<DIRECT>) Fri Apr 28 14:57:09 2017 - DEBUG | REMOTE expiring token; user(<DIRECT>) Fri Apr 28 14:57:09 2017 - DEBUG | REMOTE CLI Authorized; user(?) Fri Apr 28 14:57:09 2017 - INFO | REMOTE start_task(Media import); event_id(2017 -04-28_145709_import); user(?) Fri Apr 28 14:57:10 2017 - INFO | import_tree; ['/home/schreian/rsync:/ mirrors.greenmountainaccess.net/centos/6.9/os/x86_64', 'CentOS6.9', None, None, None] Fri Apr 28 14:57:10 2017 - INFO | importing from a network location, running rsy nc to fetch the files first Fri Apr 28 14:57:10 2017 - INFO | running: rsync -a '/home/schreian/rsync:/mirr ors.greenmountainaccess.net/centos/6.9/os/x86_64/' /var/www/cobbler/ks_mirror/CentOS6.9- x86_64 --progress Fri Apr 28 14:57:10 2017 - INFO | received on stdout: sending incremental file l ist
sent 12 bytes received 12 bytes 48.00 bytes/sec total size is 0 speedup is 0.00
Fri Apr 28 14:57:10 2017 - DEBUG | received on stderr: rsync: change_dir "/home/ schreian/rsync:/mirrors.tripadvisor.com/centos/6.9/os/x86_64" failed: Permission denied (13) rsync error: some files/attrs were not transferred (see previous errors) (code 2 3) at main.c(1052) [sender=3.0.9]
Fri Apr 28 14:57:10 2017 - INFO | Exception occured: <class 'cobbler.cexceptions .CX'> Fri Apr 28 14:57:10 2017 - INFO | Exception value: 'Command failed'
The problem seems to be with import_tree getting set to a location relative to the current directory from which I am running the command.
I am able to successfully import from a DVD image, but would like to use rsync.
Thanks for any help Tony Schreiner
Following up a bit, more below the attached
On Fri, Apr 28, 2017 at 4:29 PM, Tony Schreiner anthony.schreiner@bc.edu wrote:
I am getting errors with cobbler import with --path=rsync://...
This is the first time I tried since upgrading to CentOS 7 cobbler-2.8.0-4.el7.x86_64, it used to work for me with version 2.6.
Here is the command and error to console (please excuse the line-folding):
$ sudo cobbler import --name=CentOStest --breed=redhat --os-version=rhel6 --arch=x86_64 --path=rsync://mirrors.greenmountainaccess.net/centos/6.9/os/ task started: 2017-04-28_161835_import task started (id=Media import, time=Fri Apr 28 16:18:35 2017) Exception occured: <class 'cobbler.cexceptions.CX'> Exception value: 'Command failed' Exception Info: File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 82, in run rc = self._run(self) File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 226, in runner self.logger File "/usr/lib/python2.7/site-packages/cobbler/api.py", line 876, in import_tree utils.run_this(rsync_cmd, (spacer, mirror_url, path), self.logger) File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 899, in run_this die(logger,"Command failed") File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 114, in die raise CX(msg)
!!! TASK FAILED !!!
In cobbler.log: Thu Apr 27 12:55:09 2017 - DEBUG | REMOTE CLI Authorized; user(? Thu Apr 27 12:55:09 2017 - INFO | REMOTE start_task(Reposync); event_id(2017-04-27_125509_reposync); user(?) Thu Apr 27 12:55:10 2017 - INFO | reposync; ['centos6-updates-x86_64'] Fri Apr 28 14:57:09 2017 - DEBUG | REMOTE expiring token; user(<DIRECT>) Fri Apr 28 14:57:09 2017 - DEBUG | REMOTE expiring token; user(<DIRECT>) Fri Apr 28 14:57:09 2017 - DEBUG | REMOTE CLI Authorized; user(?) Fri Apr 28 14:57:09 2017 - INFO | REMOTE start_task(Media import); event_id(2017 -04-28_145709_import); user(?) Fri Apr 28 14:57:10 2017 - INFO | import_tree; ['/home/schreian/rsync:/ mirrors.greenmountainaccess.net/centos/6.9/os/x86_64', 'CentOS6.9', None, None, None] Fri Apr 28 14:57:10 2017 - INFO | importing from a network location, running rsy nc to fetch the files first Fri Apr 28 14:57:10 2017 - INFO | running: rsync -a '/home/schreian/rsync:/mirr ors.greenmountainaccess.net/centos/6.9/os/x86_64/' /var/www/cobbler/ks_mirror/CentOS6.9- x86_64 --progress Fri Apr 28 14:57:10 2017 - INFO | received on stdout: sending incremental file l ist
sent 12 bytes received 12 bytes 48.00 bytes/sec total size is 0 speedup is 0.00
Fri Apr 28 14:57:10 2017 - DEBUG | received on stderr: rsync: change_dir "/home/ schreian/rsync:/mirrors.tripadvisor.com/centos/6.9/os/x86_64" failed: Permission denied (13) rsync error: some files/attrs were not transferred (see previous errors) (code 2 3) at main.c(1052) [sender=3.0.9]
Fri Apr 28 14:57:10 2017 - INFO | Exception occured: <class 'cobbler.cexceptions .CX'> Fri Apr 28 14:57:10 2017 - INFO | Exception value: 'Command failed'
The problem seems to be with import_tree getting set to a location relative to the current directory from which I am running the command.
I am able to successfully import from a DVD image, but would like to use rsync.
Thanks for any help Tony Schreiner
I poked around the code a bit, but don't pretend to fully understand what is being done,
the 2.8 code for cli.py has the following in the stanza for
elif action_name == "import": ... if options.path: # convert relative path to absolute path options.path = os.path.abspath(options.path)
there does not seem to be a check for protocol such as rsync:// or http:// here. The 2.6 code does not have this. could this be where I am getting the error?
Tony Schreiner
cobbler@lists.fedorahosted.org