Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 301769 - rsync for root_overlay deletes host's /dev for stage4/netboot
Summary: rsync for root_overlay deletes host's /dev for stage4/netboot
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: Catalyst (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Gentoo Catalyst Developers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-21 20:11 UTC by Lance Albertson (RETIRED)
Modified: 2010-01-22 13:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lance Albertson (RETIRED) gentoo-dev 2010-01-21 20:11:49 UTC
I recently discovered that the latest catalyst in git has a really nasty bug when building a stage4. When it gets to the root_overlay step, it runs an rsync with --delete enabled thus removing the buildroot (including all the bind mounts of /dev, /proc, etc) on the host thus making the host pretty unusable. I was able to save the host since I had an active connection on it and was able to run MAKEDEV by hand.

I did some digging and noticed that commit 00790284 introduced this bug by consolidating the rsync command into one command. I can confirm this broke stage4's and it appears that it may have broken the netboot target as well. I can confirm reverting the section in root_overlay in generic_stage.py to the previous direct method "fixes" the issue for stage4's. It would probably make sense to adjust the consolidated function to have the ability to deal with situations where you don't need --delete. I would provide a patch but I wasn't sure how you wanted to deal with that.

Here is a sample of the output I had with it broken:

-------
removing /data/catalyst/tmp/default-10.0/stage4-amd64-10.0-default-20100120/tmp/chroot-functions.sh from the chroot
--- Running action sequence: build_kernel
Removing AutoResume Points: ...
Emptying directory /data/catalyst/tmp/default-10.0/.autoresume-stage4-amd64-10.0-default-20100120/
--- Running action sequence: bootloader
Removing AutoResume Points: ...
Emptying directory /data/catalyst/tmp/default-10.0/.autoresume-stage4-amd64-10.0-default-20100120/
--- Running action sequence: root_overlay
rsync: delete_file: rmdir(usr/portage/packages) failed: Device or resource busy (16)
rsync: delete_file: rmdir(usr/portage/distfiles) failed: Device or resource busy (16)
cannot delete non-empty directory: usr/portage
rsync: delete_file: rmdir(usr/portage) failed: Device or resource busy (16)
cannot delete non-empty directory: usr
rsync: delete_file: rmdir(tmp/kerncache) failed: Device or resource busy (16)
cannot delete non-empty directory: tmp
rsync: delete_file: rmdir(proc/tty/ldisc) failed: Operation not permitted (1)
rsync: delete_file: unlink(proc/tty/driver/serial) failed: Operation not permitted (1)

----------
Comment 1 Andrew Gaffney (RETIRED) gentoo-dev 2010-01-22 13:31:43 UTC
This is fixed in git.