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

Add backup tests for foreman-proxy #1838

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

ehelms
Copy link
Member

@ehelms ehelms commented Aug 16, 2024

No description provided.

bats/fb-test-backup.bats Outdated Show resolved Hide resolved

tFileExists "${BACKUP_ONLINE_DIR}/pulp_data.tar"
tFileExists "${BACKUP_ONLINE_DIR}/pulpcore.dump"
tar -tvf "${BACKUP_ONLINE_DIR}/config_files.tar.gz" | grep "${HOSTNAME}.tar.gz"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tar -tvf "${BACKUP_ONLINE_DIR}/config_files.tar.gz" | grep "${HOSTNAME}.tar.gz"
tar -tvf "${BACKUP_ONLINE_DIR}/config_files.tar.gz" | grep "${HOSTNAME}-certs.tar"

It should be like this, or at least that's how the file on my machine is.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This depends on what you pass to the certs generate command. And our role in forklift uses: foreman_proxy_content_certs_tar: "/root/{{ ansible_nodename }}.tar.gz"

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@evgeni knows more about backups so I'd prefer if he also weighed in.


if ! tPackageExists foreman && tPackageExists foreman-installer-katello; then
tFileExists "${BACKUP_OFFLINE_DIR}/pulp_data.tar"
tFileExists "${BACKUP_OFFLINE_DIR}/pgsql_data.tar.gz"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't do pgsql_data.tar.gz for offline backups anymore ;)
See lines 43++ how to check that properly based on Foreman version (well, you probably need to check installer version, there).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, I had tested on Katello 4.13.

@evgeni evgeni merged commit e9a498d into theforeman:master Aug 20, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants