Bug 883107

Summary: "OSError: [Errno 18] Invalid cross-device link" if cachedir if tmpfs
Product: [Fedora] Fedora Reporter: Martin-Gomez Pablo <pablomg+fedora>
Component: fedupAssignee: Will Woods <wwoods>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-27 16:44:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Fedup Debug Log none

Description Martin-Gomez Pablo 2012-12-03 19:29:30 UTC
Created attachment 656917 [details]
Fedup Debug Log

Description of problem:
Upgrade to Fedora 18 Beta fail with ""OSError: [Errno 18] Invalid cross-device link"". I suspect my cachedir in /var/tmp mounted in tmpfs being the problem.

Traceback (most recent call last):
  File "/bin/fedup-cli", line 285, in <module>
    main(args)
  File "/bin/fedup-cli", line 249, in main
    prep_upgrade(pkgs)
  File "/usr/lib/python2.7/site-packages/fedup/download.py", line 345, in prep_upgrade
    link_pkgs(pkgs)
  File "/usr/lib/python2.7/site-packages/fedup/download.py", line 298, in link_pkgs
    os.link(pkgpath, target)
OSError: [Errno 18] Invalid cross-device link


Version-Release number of selected component (if applicable):
fedup.0.7.1-1.fc17  

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Will Woods 2012-12-03 21:14:21 UTC
fedup assumes that /var/tmp and /var/cache are both persistent (which is required by the various standards - see the FHS, 5.5 and 5.15). 

It also assumes that /var/tmp and /var/cache are the same filesystem - which isn't strictly required, I guess.

So if the link fails, fedup should probably copy the file to /var/tmp instead. It's a big waste of disk space but, hey, if you decide to set up your system that way, that's your problem.

Also! IMPORTANT NOTE! Your system is misconfigured. /var/tmp is supposed to be persistent. See the FHS 5.15.1:

   "The /var/tmp directory is made available for programs that require
   temporary files or directories that are preserved between system reboots."

If /var/tmp is tmpfs, fedup won't work, because its install data won't be available after the reboot. You're probably going to have to change that.

Comment 2 Martin-Gomez Pablo 2012-12-04 17:33:46 UTC
Oh I suppose that one day I told myself "Let's put every directory with tmp in tmpfs, it sound fun" without doing a research. I will let you know if everything work as it should be with /var/tmp in my / filesystem.

Comment 3 Fedora Update System 2012-12-21 04:49:01 UTC
fedup-0.7.2-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/fedup-0.7.2-1.fc17

Comment 4 Fedora Update System 2012-12-21 12:09:29 UTC
Package fedup-0.7.2-1.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing fedup-0.7.2-1.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-20801/fedup-0.7.2-1.fc17
then log in and leave karma (feedback).

Comment 5 Martin-Gomez Pablo 2012-12-27 16:44:11 UTC
Putting /var/tmp back in / solved this problem, thank you.

Comment 6 Fedora Update System 2013-01-03 07:26:07 UTC
fedup-0.7.2-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.