"Invalid cross-device link" and failed to preserve ownership error on image-output...
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Image |
Fix Released
|
Medium
|
Barry Warsaw |
Bug Description
Here is your wall of traceback:
cro@ubuntu:~$ sudo /snap/bin/
> --extra-
> -c beta -o ${DIR2_
> ${DIR4_}/ics.model
Fetching core
Copying "/home/
Fetching pc
linuxium-kernel already prepared, skipping
COMMAND FAILED: ['cp', '-p', '--sparse=always', '/tmp/tmpsjo_
cp: failed to preserve ownership for '/home/
uncaught exception in state machine step: [11] finish
Traceback (most recent call last):
File "/snap/
os.rename(src, real_dst)
OSError: [Errno 18] Invalid cross-device link: '/tmp/tmpsjo_
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/snap/
step()
File "/snap/
shutil.
File "/snap/
copy_
File "/snap/
run(args)
File "/snap/
proc.
File "/snap/
self.stderr)
subprocess.
Crash in state machine
Traceback (most recent call last):
File "/snap/
os.rename(src, real_dst)
OSError: [Errno 18] Invalid cross-device link: '/tmp/tmpsjo_
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/snap/
list(
File "/snap/
step()
File "/snap/
shutil.
File "/snap/
copy_
File "/snap/
run(args)
File "/snap/
proc.
File "/snap/
self.stderr)
subprocess.
This fix worked for me:
cro@ubuntu:~$ diff /tmp/helpers.py /snap/ubuntu-
139c139
< args = ['cp', '--sparse=always', src, dst]
---
> args = ['cp', '-p', '--sparse=always', src, dst]
Changed in ubuntu-image: | |
milestone: | none → 0.13 |
Changed in ubuntu-image: | |
status: | Triaged → In Progress |
assignee: | nobody → Barry Warsaw (barry) |
Changed in ubuntu-image: | |
status: | In Progress → Fix Committed |
Changed in ubuntu-image: | |
status: | Fix Committed → Fix Released |
Hi David,
Thanks for the bug report. So, 'cp -p' should only fail if the target filesystem is not a POSIX filesystem. Is that the case for you? I see /home/cro/ home_root/ mnt/hgfs/ cro/Documents/ TanagerProjects /Signage/ flock_installer /ics-ubuntu- image.img as a destination, I'm not sure if 'hgfs' refers to a particular filesystem with non-POSIX semantics?
This is certainly a legitimate bug. We may be able to drop the '-p' with the reasoning that a file copy will create the new file with the same umask and owner as the original file creation, but we need to check this assumption.