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

[Bug]: stopBackup should handle disconnects #4444

Open
4 tasks done
csdaraujo opened this issue May 6, 2024 · 0 comments
Open
4 tasks done

[Bug]: stopBackup should handle disconnects #4444

csdaraujo opened this issue May 6, 2024 · 0 comments
Assignees
Labels
triage Pending triage

Comments

@csdaraujo
Copy link

csdaraujo commented May 6, 2024

Is there an existing issue already for this bug?

  • I have searched for an existing issue, and could not find anything. I believe this is a new bug.

I have read the troubleshooting guide

  • I have read the troubleshooting guide and I think this is a new bug.

I am running a supported version of CloudNativePG

  • I have read the troubleshooting guide and I think this is a new bug.

Contact Details

caetano@heroiclabs.com

Version

older in 1.22.x

What version of Kubernetes are you using?

1.29

What is your Kubernetes environment?

Cloud: Amazon EKS

How did you install the operator?

YAML manifest

What happened?

Some backups are kept on started state blocking newer backups. One of the causes seems to be that connection is closed within the backupConnection struct and there is no re-connecting strategy. Sample log:

{
  "level": "error",
  "ts": "2024-05-05T10:44:04Z",
  "msg": "while stopping PostgreSQL physical backup",
  "step": "stop",
  "logging_pod": "mycluster-1",
  "error": "sql: connection is already closed",
  "stacktrace": "github.com/cloudnative-pg/cloudnative-pg/pkg/management/log.(*logger).Error\n\tpkg/management/log/log.go:128\ngithub.com/cloudnative-pg/cloudnative-pg/pkg/management/postgres/webserver.(*backupConnection).stopBackup.func2\n\tpkg/management/postgres/webserver/backup_connection.go:214\ngithub.com/cloudnative-pg/cloudnative-pg/pkg/management/postgres/webserver.(*backupConnection).executeWithLock\n\tpkg/management/postgres/webserver/backup_connection.go:94\ngithub.com/cloudnative-pg/cloudnative-pg/pkg/management/postgres/webserver.(*backupConnection).stopBackup\n\tpkg/management/postgres/webserver/backup_connection.go:212"
}

if err := row.Scan(&bc.data.EndLSN, &bc.data.LabelFile, &bc.data.SpcmapFile); err != nil {

Not sure if my reasoning is right but looks like a reconnect could solve the issue we are facing.

Cluster resource

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@csdaraujo csdaraujo added the triage Pending triage label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Pending triage
Projects
None yet
Development

No branches or pull requests

2 participants