Open kris-sum opened 3 years ago
Thanks for the feedback Kris. We'll discuss this internally to determine a priority for our roadmap.
I second this. We really need this feature. Currently, we're hacking it by making the RUN script sleep forever once done, and we put the cleanup in the shutdown script.
I second this. We really need this feature. Currently, we're hacking it by making the RUN script sleep forever once done, and we put the cleanup in the shutdown script.
Same here. Not having a clean uninstall stage is unfortunately making it a hard sell for a production environment :(
I'd also +1 this (I've thumbed up as well), it would be very very useful to have the ability to run a cleanup script when a component gets uninstalled.
I opened a feature request through AWS Enterprise Support for this, not knowing this feature request existed here.
+1 for this feature please. Without it I cannot do a proper cleanup when components are removed.
My use case is to install & uninstall an .exe file on a windows device using Greengrass component deployment. It would be great if this uninstall life cycle stage addresses this use case as well.
Feature Description We already have 'install', 'run', 'shutdown' etc as Lifecycle stages where we can configure scripts, but how about about an 'Uninstall' stage where we can perform any cleanup operations when a component is upgraded or removed.
Use Case If my component puts temporary data in the CWD, or needs to notify another component that it's being removed, it would be good to use this 'uninstall' stage which operates like the inverse of 'install', allowing us to call scripts when the current artifact is removed.
My particular use-case was to cleanup the filesystem after an install script installs dependencies - my dependencies ended up in
/home/ggc_user/.local/share/virtualenvs/{instance_id}
, and weren't removed when the component artifacts were removed. I'm aware that this isn't "The Right Way" to do things, but nonetheless I feel an Uninstall licecycle stage would be useful to others.Note: Shutdown !== Uninstall, as components can be stopped/started without being uninstalled.
Proposed Solution Uninstall scripts should be executed before any artifact cleanup is performed. Uninstall scripts should have a default timeout value, so that uninstalls don't hang the system indefinitely.