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

[FEATURE REQUEST] [PostgreSQL] [upgrade] Do not remove new packages automatically in rollback #2537

Closed
13 tasks done
to-bar opened this issue Aug 31, 2021 · 3 comments
Closed
13 tasks done

Comments

@to-bar
Copy link
Contributor

to-bar commented Aug 31, 2021

Is your feature request related to a problem? Please describe.
When PostgreSQL upgrade fails, Epiphany performs automatic rollback (Ansible rescue block) during which the following operations are done:

  • remove PostgreSQL related packages (new version)
  • remove new version data directory
  • restore repmgr symlinks
  • start and enable old PostgreSQL service
  • start and enable old repmgr service

When operator wants to debug/analyze a failure, there is no new binaries, so reproducing an issue (re-run the failed command) is difficult.

Describe the solution you'd like

The rollback creates a file (can be script) with instructions how to uninstall new binaries instead removing them automatically.

Describe alternatives you've considered
No automatic rollback, all commands in a file.

Additional context
The upgrade is run based on the condition: when: not pg_data_dir.stat.exists or pg_data_dir_files.matched == 0.
So the rollback must remove files from data dir.


DoD checklist

  • Changelog updated
  • COMPONENTS.md updated / doesn't need to be updated
  • Schema updated / doesn't need to be updated
  • Feature has automated tests
  • Automated tests passed (QA pipelines)
    • apply
    • upgrade
  • Idempotency tested
  • Documentation added / updated / doesn't need to be updated
  • All conversations in PR resolved
  • Solution meets requirements and is done according to design doc
  • Usage compliant with license
  • Backport tasks created / doesn't need to be backported
@rafzei
Copy link
Contributor

rafzei commented Sep 2, 2021

🚀

@mkyc
Copy link
Contributor

mkyc commented Sep 10, 2021

Before merging PR for this task decide with @przemyslavic if it can be merged to 1.2.0 release branch.

@przemyslavic
Copy link
Collaborator

✔️ Tested apply and upgrade from v1.0.x to v1.3.0dev with rollback procedure,
Single-node installation and cluster deployment with replication enabled have been checked.

@mkyc mkyc closed this as completed Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants