aminator icon indicating copy to clipboard operation
aminator copied to clipboard

post provision kill process that may have started in chroot

Open coryb opened this issue 11 years ago • 2 comments

Sometimes packages start up process as they are installed. This will cause the umount to fail so we cannot take an ebs snapshot. We need to discover processes with open files or cwd inside the chroot.

Python psutil looks promising for this: https://pypi.python.org/pypi/psutil http://code.google.com/p/psutil/wiki/Documentation#Processes

We can iterate over all open processes, then call getcwd() and maybe get_open_files() to see if the paths overlap with our chroot.

-Cory

coryb avatar Feb 04 '14 22:02 coryb

This issue is likely what I was trying to work around with commit 9ea0f6c082dbb6a861432a66718f1c47d7e4977e
If this were to be solved the retry attempts could be clawed back as upping the retires doesn't solve the issue.

tjbaker avatar May 09 '14 13:05 tjbaker

@coryb you ever have any luck with this? Ran into an issue with it today where it couldn't umount because php-fpm was running in the chroot.

stevenjack avatar Jun 25 '15 09:06 stevenjack