-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(PE-39351) Update add_database plan to work with patching/HAC
This commit updates the add_database plan to include the pe-patching and pe-hac databases when it cleans up the original postgres on the primary. The add_database plan uses pg_basebackup to copy the entire contents of the postgres DB from the original primary DB to the new DB node's postgres. That process doesn't individually update a list of databases, so there's no context of "which DBs to move", because it just moves everything. However, during the cleanup process on the original DB That exists on the primary, the plan _does_ need to list the individual internal postgres dbs that need to be deleted.
- Loading branch information
1 parent
66567dc
commit d5ab3a4
Showing
2 changed files
with
45 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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,40 @@ | ||
function peadm::pe_db_names ( | ||
String $pe_ver, | ||
) >> Array { | ||
case $pe_ver { | ||
# The patching service was added in 2025.0.0 | ||
SemVerRange('>= 2025.0.0'): { | ||
Check warning on line 6 in functions/pe_db_names.pp GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)
|
||
[ | ||
'pe-activity', | ||
'pe-classifier', | ||
'pe-inventory', | ||
'pe-orchestrator', | ||
'pe-rbac', | ||
'pe-hac', | ||
'pe-patching', | ||
] | ||
} | ||
|
||
# The host-action-collector (hac) was added in 2023.8 | ||
SemVerRange('>= 2023.8.0'): { | ||
Check warning on line 19 in functions/pe_db_names.pp GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)
|
||
[ | ||
'pe-activity', | ||
'pe-classifier', | ||
'pe-inventory', | ||
'pe-orchestrator', | ||
'pe-rbac', | ||
'pe-hac', | ||
] | ||
} | ||
|
||
default: { | ||
[ | ||
'pe-activity', | ||
'pe-classifier', | ||
'pe-inventory', | ||
'pe-orchestrator', | ||
'pe-rbac', | ||
] | ||
} | ||
} | ||
} |
This file contains 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