-
Notifications
You must be signed in to change notification settings - Fork 56
(PE-40691) document automated steps for failed postgres and adding compilers #554
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| # Recovery procedures | ||
|
|
||
| These instructions provide automated procedures for recovering from select failures of PE components which are managed by PEADM. | ||
|
|
||
| Manual procedures are documented in [recovery.md](recovery.md) | ||
|
|
||
| ## Recover from failed Puppet primary server | ||
|
|
||
| 1. Promote the replica ([official docs](https://puppet.com/docs/pe/2019.8/dr_configure.html#dr-promote-replica)) | ||
| 2. [Replace missing or failed replica Puppet server](#replace-missing-or-failed-replica-puppet-server) | ||
|
|
||
| ## Replace missing or failed replica Puppet server | ||
davidmalloncares marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| This procedure uses the following placeholder references. | ||
|
|
||
| * _\<primary-server-fqdn\>_ - The FQDN and certname of the Puppet primary server | ||
| * _\<replica-postgres-server-fqdn\>_ - The FQDN and certname of the PE-PostgreSQL server which resides in the same availability group as the replacement replica Puppet server | ||
davidmalloncares marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| * _\<replacement-replica-fqdn\>_ - The FQDN and certname of the replacement replica Puppet server | ||
davidmalloncares marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 1. Run `peadm::add_replica` plan to deploy replacement replica Puppet server | ||
davidmalloncares marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 1. For Standard and Large deployments | ||
davidmalloncares marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| bolt plan run peadm::add_replica primary_host=<primary-server-fqdn> replica_host=<replacement-replica-fqdn> | ||
|
|
||
| 2. For Extra Large deployments | ||
davidmalloncares marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| bolt plan run peadm::add_replica primary_host=<primary-server-fqdn> replica_host=<replacement-replica-fqdn> replica_postgresql_host=<replica-postgres-server-fqdn> | ||
|
|
||
| ## Replace failed PE-PostgreSQL server (A or B side) | ||
|
|
||
| The procedure for replacing a failed PE-PostgreSQL server is the same regardless of which PE-PostgreSQL server is missing or whether the name of the PE-PostgreSQL server is the same or different. This procedure uses the following placeholder references. | ||
|
|
||
| * _\<replacement-postgres-server-fqdn\>_ - The FQDN and certname of the new server being brought in to replace the failed PE-PostgreSQL server | ||
| * _\<working-postgres-server-fqdn\>_ - The FQDN and certname of the still-working PE-PostgreSQL server | ||
| * _\<failed-postgres-server-fqdn\>_ - The FQDN and certname of the failed PE-PostgreSQL server | ||
| * _\<primary-server-fqdn\>_ - The FQDN and certname of the Puppet primary server | ||
| * _\<replica-server-fqdn\>_ - The FQDN and certname of the replica Puppet server | ||
davidmalloncares marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Procedure: | ||
|
|
||
| 1. Run the `peadm::replace_failed_postgresql` plan to replace the failed PE-PostgreSQL server: | ||
|
|
||
| bolt plan run peadm::replace_failed_postgresql \ | ||
| primary_host=<primary-server-fqdn> \ | ||
| replica_host=<replica-server-fqdn> \ | ||
| working_postgresql_host=<working-postgres-server-fqdn> \ | ||
| failed_postgresql_host=<failed-postgres-server-fqdn> \ | ||
| replacement_postgresql_host=<replacement-postgres-server-fqdn> | ||
|
|
||
| ## Replace failed replica Puppet server AND failed replica PE-PostgreSQL server | ||
davidmalloncares marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| This procedure uses the following placeholder references. | ||
|
|
||
| * _\<primary-server-fqdn\>_ - The FQDN and certname of the Puppet primary server | ||
| * _\<failed-replica-fqdn\>_ - The FQDN and certname of the failed replica Puppet server | ||
davidmalloncares marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 1. Ensure the old replica server is forgotten. | ||
|
|
||
| bolt command run "/opt/puppetlabs/bin/puppet infrastructure forget <failed-replica-fqdn>" --targets <primary-server-fqdn> | ||
|
|
||
| 2. [Replace failed PE-PostgreSQL server (A or B side)](#replace-failed-pe-postgresql-server-a-or-b-side) | ||
| 3. [Replace missing or failed replica Puppet server](#replace-missing-or-failed-replica-puppet-server) | ||
davidmalloncares marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Add or replace compilers | ||
|
|
||
| This procedure uses the following placeholder references. | ||
|
|
||
| * _\<avail-group-letter\>_ - Either A or B; whichever of the two letter designations the compiler is being assigned to | ||
| * _\<compiler-hosts\>_ - A comma-separated list of FQDN and certname of the new compiler(s) | ||
| * _\<dns-alt-names\>_ - A comma-separated list of DNS alt names for the compiler | ||
| * _\<primary-server-fqdn\>_ - The FQDN and certname of the Puppet primary server | ||
| * _\<postgresql-server-fqdn\>_ - The FQDN and certname of the PE-PostgreSQL server with availability group _\<avail-group-letter\>_ | ||
|
|
||
| Procedure: | ||
|
|
||
| 1. Run the `peadm::add_compilers` plan to add the compilers: | ||
|
|
||
| bolt plan run peadm::add_compilers \ | ||
| primary_host=<primary-server-fqdn> \ | ||
| compiler_hosts=<compiler-hosts> \ | ||
| avail_group_letter=<avail-group-letter> \ | ||
| dns_alt_names=<dns-alt-names> \ | ||
| primary_postgresql_host=<postgresql-server-fqdn> | ||
|
|
||
| Please note, the optional parameters and values of the plan are as follows: | ||
|
|
||
| <!-- table --> | ||
|
|
||
| | Parameter | Default value | Description | | ||
| | ------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------ | | ||
| | `avail_group_letter` | `A` | By default, each compiler will be added to the primary group A. | | ||
| | `dns_alt_names` | `undef` | | | ||
| | `primary_postgresql_host` | `undef` | By default, this will pre-populate to the required value depending on whether your architecture contains HA and or external databases. | | ||
|
|
||
| For more information around adding compilers to your infrastructure [Expanding Your Deployment](expanding.md#adding-compilers-with-peadmadd_compiler) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.