earthenterprise
earthenterprise copied to clipboard
RPM install should stop/rollback if any error occurs in a scriptlet
This is a follow-up to #720 because this task proved to be larger in scope than anticipated. The end goal is to leave the set -e
flag in for all the scriptlets, but cleanup in error handling is needed throughout.
AC
- RPM installs will halt the installation if any errors occur during RPM scripets (all RPMs)
- write follow-up tickets if errors reporting lacking specificity (either in RPM command output or ansible)
Scenarios to consider
- With/without MrSID library installed when RPMs are compiled against MrSID
- Install on a "clean" server (Has never had GEE installed before)
- Upgrading an existing RPM
NOTES
- ensure scriptlets have
set -e
; review code for explicitset +e
(don't want that one) - handle better individual scriptlets command and potential errors
- use OR command to ignore errors that are known and OK to fail for specific commands
- errors that occur in a post-install script do not roll back the RPM install, so good error messages are important to let the installer know what should be done to fix the issue
- Consider allowing the script to continue with other required steps if possible
Will look into changing this: https://github.com/google/earthenterprise/blob/93bf8911e7568dfe22f413b88a1d83103796d2a5/earth_enterprise/rpms/opengee-server/snippets/pre-install.sh#L37-L38