Skip to content
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

Cleanups to rpm/deb install upgrade scripts #644

Draft
wants to merge 16 commits into
base: dev
Choose a base branch
from

Conversation

grooverdan
Copy link
Member

based on #607 , so from "rpm-install: use save_failure_logs trap" is new.

This makes it more generic and expands the columnstore saving
to the required information.
* service logs
* columnstore data dir (tar.bz2)
* /tmp/columnstore_tmp_files (appended to log file)

More information like the mariadb.service journal and coredumps are saved.
…te,verify}_structures

These are handled by rpm/deb-install/upgrade.
As we going be in set -e mode when this is called, the trap will
handle the saving of the error information.
We are under set -e so the error saving routine is there.
replace pattern:

  # comment about what we are doing that isn't in bb log
  if something_might_go_wrong; then
     log_err - it went wrong
     (missing error capture)
  exit 1

to:

   bb_log_info "where testing this"
   sometime_might_go_wrong

The something_might_go_wrong in the second step will trap
and have all the saving of the failure afterwards leaving
the user with the info of what was being tested to provide
the failure context.
echo $v | sudo xargs ..
is a antipattern, just use bash arrays.

Replace if test condition; then fail
with just; test condition, and let +e handle it.

Rather than set -u /+u give ID_LIKE
a default value so it won't error
or match suse when its blank.
As script comments don't show when running make the output more readable.
There was no need for subshell, and to make shellcheck
happy do the glob to arrays.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant