From 68856c600624d10598113ad6dd8dbbef79dd91d5 Mon Sep 17 00:00:00 2001 From: Derek Higgins Date: Fri, 2 Oct 2015 00:26:22 +0100 Subject: [PATCH] Restrict search for python object files to ./usr Traversing the /proc filesystem causes find to error if it changes while its being searched. We have had a lot of ci failures on this find command since it was added in Ibe40e6b8b884f37e3b5aeab6e7654593bcd63123 Change-Id: Ia8cfc923cce749a69d5108e588db2360238d866c Closes-Bug: #1501949 --- elements/ironic-agent/cleanup.d/99-ramdisk-create | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elements/ironic-agent/cleanup.d/99-ramdisk-create b/elements/ironic-agent/cleanup.d/99-ramdisk-create index ae83338ce..a128e5837 100755 --- a/elements/ironic-agent/cleanup.d/99-ramdisk-create +++ b/elements/ironic-agent/cleanup.d/99-ramdisk-create @@ -19,7 +19,7 @@ sudo mv ./tmp/fstab.new ./etc/fstab sudo ln -s ./sbin/init ./ # Remove python object files, they're not particularly useful for a ramdisk -sudo find . -name "*.pyc" -or -name "*.pyo" -delete +sudo find ./usr -name "*.pyc" -or -name "*.pyo" -delete sudo find . -path './sys/*' -prune -o -path './proc/*' -prune -o -path './tmp/*' -prune -o -path './boot/*' -prune -o -path './root/*' -prune -o -path './usr/lib/locale/*' -prune -o -path './usr/share/doc/*' -prune -o -path './usr/share/man/*' -prune -o -path './usr/share/info/*' -prune -o -path './usr/share/licenses/*' -prune -o -path './usr/share/misc/*' -prune -o -print | sudo cpio -o -H newc | gzip > ${IMAGE_PATH}.initramfs