-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
com.aws.greengrass.lifecyclemanager: New Lifecycle stage "Uninstall" #814
Comments
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. |
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. |
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.
The text was updated successfully, but these errors were encountered: