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

Update test for CA clone with replicated DS #4642

Merged
merged 1 commit into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/ca-clone-replicated-ds-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,16 @@ jobs:

diff primaryds.dn secondaryds.dn

- name: Create search indexes
run: |
docker exec secondary pki-server ca-db-index-add -v
docker exec secondary pki-server ca-db-index-rebuild -v

- name: Create VLV indexes
run: |
docker exec secondary pki-server ca-db-vlv-add -v
docker exec secondary pki-server ca-db-vlv-reindex -v

# https://github.com/dogtagpki/pki/wiki/Installing-CA-Clone-with-Existing-DS
- name: Install secondary CA
run: |
Expand Down
18 changes: 9 additions & 9 deletions base/server/python/pki/server/deployment/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1557,15 +1557,6 @@ def setup_database(self, subsystem, master_config):
skip_base=skip_base,
skip_containers=skip_containers)

# always create indexes
subsystem.add_indexes()

# if the database is already replicated but not yet indexed, rebuild the indexes
if config.str2bool(self.mdict['pki_clone']) and \
not config.str2bool(self.mdict['pki_clone_setup_replication']) and \
config.str2bool(self.mdict['pki_clone_reindex_data']):
subsystem.rebuild_indexes()

if config.str2bool(self.mdict['pki_clone']) and \
config.str2bool(self.mdict['pki_clone_setup_replication']):
self.setup_replication(subsystem, master_config)
Expand All @@ -1586,6 +1577,15 @@ def setup_database(self, subsystem, master_config):

subsystem.grant_database_access(dbuser)

# Always create search and VLV indexes since they will not be replicated
subsystem.add_indexes()

# If the database is already replicated but not yet indexed, rebuild the indexes
if config.str2bool(self.mdict['pki_clone']) and \
not config.str2bool(self.mdict['pki_clone_setup_replication']) and \
config.str2bool(self.mdict['pki_clone_reindex_data']):
subsystem.rebuild_indexes()

subsystem.add_vlv()
subsystem.reindex_vlv()

Expand Down
Loading