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

Fix wrong backup check for SQL Always on High availability Groups #648

Closed
wants to merge 0 commits into from

Conversation

fabiozanella
Copy link

General information

I resume the @marcohald's Bug Fix with some small improvements.

I looked at the GitHub history and saw that This commit was introduced to watch only the primary replica. But usually, with Always on, the backup are performed on secondary replica (see Microsoft resource).
Additionally, when you perform a failover to the second node, you lose track of previously performed backups.

Bug reports

Operating system name and version

SQL Always on High availability Groups on SQL Server 2019
Windows Server 2019

Detailed steps to reproduce the bug

  1. Create a Backup of a High Available Database on Server1
  2. Move the Database to Server2
  3. You get a backup Error because no actual backup is found

Proposed changes

What is the expected behavior?

The Agent should return the Backup status, even if it is not the primary Server

What is the observed behavior?

The Agent does not return the Backup if it is not the Primary Replica

If it's not obvious from the above: In what way does your patch change the current behavior?

The Primary Server check is removed

List of changes

  • Remove the filter to extract backups only from the primary replica.
  • Simplify backup query.

I have read the CLA Document and I hereby sign the CLA or my organization already has a signed CLA.

@fabiozanella fabiozanella marked this pull request as ready for review November 23, 2023 15:59
@fabiozanella fabiozanella changed the title Alwayson backup Fix wrong backup check for SQL Always on High availability Groups Nov 23, 2023
@fabiozanella fabiozanella force-pushed the alwayson-backup branch 5 times, most recently from 66e3dbf to cc52e27 Compare November 29, 2023 15:08
@fabiozanella fabiozanella force-pushed the alwayson-backup branch 2 times, most recently from 3586511 to 5517b16 Compare December 5, 2023 11:33
@CheckmkCI CheckmkCI force-pushed the master branch 2 times, most recently from 875a494 to 3419412 Compare May 29, 2024 08:27
@CheckmkCI CheckmkCI closed this Jun 19, 2024
@TimotheusBachinger
Copy link
Contributor

Dear Checkmk Contributor! Unfortunately, we had to re-write our git-repo history, rendering your PR auto-closed. We will therefore rebase your PR onto the current master and reopen it again. Sorry for the inconvenience.

@TimotheusBachinger
Copy link
Contributor

Dear Contributor. Unfortunately, we learned that re-opening a PR which was force-rebased, is not possible (see isaacs/github#361). Therefore we kindly ask you to create a new PR for your change. We apologize for the circumstances and will implement technical measures to prevent such incidents in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants