earthenterprise icon indicating copy to clipboard operation
earthenterprise copied to clipboard

RPM install should stop/rollback if any error occurs in a scriptlet

Open tst-ccamp opened this issue 6 years ago • 1 comments

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

  1. RPM installs will halt the installation if any errors occur during RPM scripets (all RPMs)
  2. write follow-up tickets if errors reporting lacking specificity (either in RPM command output or ansible)

Scenarios to consider

  1. With/without MrSID library installed when RPMs are compiled against MrSID
  2. Install on a "clean" server (Has never had GEE installed before)
  3. Upgrading an existing RPM

NOTES

  1. ensure scriptlets have set -e; review code for explicit set +e (don't want that one)
  2. handle better individual scriptlets command and potential errors
  3. use OR command to ignore errors that are known and OK to fail for specific commands
  4. 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

tst-ccamp avatar Mar 16 '18 17:03 tst-ccamp

Will look into changing this: https://github.com/google/earthenterprise/blob/93bf8911e7568dfe22f413b88a1d83103796d2a5/earth_enterprise/rpms/opengee-server/snippets/pre-install.sh#L37-L38

Calder-Ty avatar Jan 29 '19 14:01 Calder-Ty