[Spacewalk-list] Invalid cross-device link error

Pierre Casenove pcasenove at gmail.com
Mon Jan 23 13:02:55 UTC 2012


Hello,
I've straced spacewalk-repo-sync call.
Here is the error:
stat("/data/satellite/redhat/1/bbe/mrepo/0.8.7-2.el5/noarch/bbe01b9ea61f85f4892dedc0fbb89b73/mrepo-0.8.7-2.el5.noarch.rpm",
0x7fff4f62f540) = -1 ENOENT (No such file or directory)
stat("/data/satellite/redhat/1/bbe/mrepo/0.8.7-2.el5/noarch/bbe01b9ea61f85f4892dedc0fbb89b73",
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
rename("/var/www/html/pub/epel/5/epel5-x86_64/mrepo-0.8.7-2.el5.noarch.rpm",
"/data/satellite/redhat/1/bbe/mrepo/0.8.7-2.el5/noarch/bbe01b9ea61f85f4892dedc0fbb89b73/mrepo-0.8.7-2.el5.noarch.rpm")
= -1 EXDEV (Invalid cross-device link)

/data/satellite is Spacewalk mount_point
/var/www/html/pub/epel/5/epel5-x86_64 is where the rpm is stored
locally on the server. It gets here using reposync.
Folder /data/satellite/redhat/1/bbe/mrepo/0.8.7-2.el5/noarch/bbe01b9ea61f85f4892dedc0fbb89b73/
is correctly created.

I've also dug a bit in bugzilla and found BZ 676369 being corrected
for spacewalk 1.6. And this commit in particular:
2dbe4deade884d410f93bfcd30947bb77dd18e88
-    pkgfd = os.open(packagePath, os.O_WRONLY | os.O_CREAT | os.O_TRUNC)
-    os.lseek(fd, 0, 0)
-    while 1:
-        buffer = os.read(fd, 65536)
-        if not buffer:
-            break
-        n = os.write(pkgfd, buffer)
-        if n != len(buffer):
-            # Error writing to the file
-            raise IOError, "Wrote %s out of %s bytes in file %s" % (
-                n, len(buffer), packagePath)
-    os.close(pkgfd)
+    os.rename(filename, packagePath)
     # set the path perms readable by all users
-    setPermsPath(packagePath, chmod=0644)
+    os.chmod(packagePath, 0644)


This patch introduces the use of os.rename command... which seems to
be a problem with local repositories.

Thanks in advance for your help,

Pierre


2012/1/23 Pierre Casenove <pcasenove at gmail.com>:
> Sorry to spam: it works well with public repositories, it only fails
> with repositories built on the server, in my case:
> - mrepo
> - a subset of EPEL : I use reposync to download and built locally a
> repo with only some rpms of EPEL.
>
> Pierre
>
> 2012/1/23 Pierre Casenove <pcasenove at gmail.com>:
>> Some more information:
>> - reposync also fails with public repositories from internet (like
>> spacewalk client)
>> - on my system /usr partition is mounted readonly
>> - the rpms are stored on a NFS volume
>>
>> Thanks,
>>
>> Pierre
>>
>>
>> 2012/1/23 Pierre Casenove <pcasenove at gmail.com>:
>>> Hello,
>>> I have spacewalk 1.6 on postgresql and I have the following error log
>>> when trying to reposync packages dowloaded by mrepo:
>>> 57/57 : busybox-1.2.0-10.el5_7.1-1.x86_64
>>> (50, 'Package upload failed: [Errno 18] Invalid cross-device link',
>>> 'Invalid information uploaded to the server')
>>>
>>> Could you please tell me waht is the meaning of such error?
>>>
>>> Thanks in advance,
>>>
>>> Pierre




More information about the Spacewalk-list mailing list