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

PodVolumeBackup CR status.message field has an extra colon, also the get word can be replaced with found. #7857

Closed
PrasadJoshi12 opened this issue Jun 4, 2024 · 1 comment · Fixed by #8028
Assignees

Comments

@PrasadJoshi12
Copy link

PrasadJoshi12 commented Jun 4, 2024

What steps did you take and what happened:
Triggered filesystem backup with restic and removed velero pod during the InProgress phase. PodVolumeBackup failed as expected with the error. Not a blocking issue for 1.14

old string:-
"get a podvolumebackup with status \"InProgress\" during the server starting, mark it as \"Failed\""

New string
": get a podvolumebackup with status \"InProgress\" during the server starting, mark it as \"Failed\""

What did you expect to happen:

I noticed an colon has been added to the message, also the word get can be replaced with found something similar to restore.failureReason field.

"found a restore with status \"InProgress\" during the server starting, mark it as \"Failed\""

Attached podvolumebackup CR below.

$ oc get podvolumebackup -o yaml backup1-5294a049-2269-11ef-bd2e-845cf3eff33a-h6sf7
apiVersion: velero.io/v1
kind: PodVolumeBackup
metadata:
  annotations:
    velero.io/pvc-name: postgresql
  creationTimestamp: "2024-06-04T11:57:15Z"
  generateName: backup1-5294a049-2269-11ef-bd2e-845cf3eff33a-
  generation: 3
  labels:
    velero.io/backup-name: backup1-5294a049-2269-11ef-bd2e-845cf3eff33a
    velero.io/backup-uid: e6c54302-f6ca-4a8c-9406-f83e8c9b3337
    velero.io/pvc-uid: b1ad14da-223b-42b3-aee6-f906c5d8e5c8
  name: backup1-5294a049-2269-11ef-bd2e-845cf3eff33a-h6sf7
  namespace: openshift-adp
  ownerReferences:
  - apiVersion: velero.io/v1
    controller: true
    kind: Backup
    name: backup1-5294a049-2269-11ef-bd2e-845cf3eff33a
    uid: e6c54302-f6ca-4a8c-9406-f83e8c9b3337
  resourceVersion: "163355"
  uid: f721d4b5-1ab4-44f0-8775-5cddbc0bf685
spec:
  backupStorageLocation: ts-dpa-1
  node: oadp-82541-zqmld-worker-a-2zbhr
  pod:
    kind: Pod
    name: postgresql-1-msnw8
    namespace: test-oadp-231
    uid: fac6b2dc-f59a-4c2c-8040-204fdf65acfb
  repoIdentifier: gs:oadp82541zqmld:/velero-e2e-7789e47c-225f-11ef-b036-845cf3eff33a/restic/test-oadp-231
  tags:
    backup: backup1-5294a049-2269-11ef-bd2e-845cf3eff33a
    backup-uid: e6c54302-f6ca-4a8c-9406-f83e8c9b3337
    ns: test-oadp-231
    pod: postgresql-1-msnw8
    pod-uid: fac6b2dc-f59a-4c2c-8040-204fdf65acfb
    pvc-uid: b1ad14da-223b-42b3-aee6-f906c5d8e5c8
    volume: postgresql-data
  uploaderType: restic
  volume: postgresql-data
status:
  completionTimestamp: "2024-06-04T11:57:20Z"
  message: ': get a podvolumebackup with status "InProgress" during the server starting,
    mark it as "Failed"'
  phase: Failed
  progress: {}
  startTimestamp: "2024-06-04T11:57:15Z"

The following information will help us better understand what's going on:

Anything else you would like to add:

Environment:

  • Velero version (use velero version): velero 1.14
  • Velero features (use velero client config get features):
  • Kubernetes version (use kubectl version): OCP 4.16
  • Kubernetes installer & version:
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):

Vote on this issue!

This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.

  • 👍 for "I would like to see this bug fixed as soon as possible"
  • 👎 for "There are more important bugs to focus on right now"
@blackpiglet
Copy link
Contributor

blackpiglet commented Jun 5, 2024

https://github.com/vmware-tanzu/velero/blob/a8d77eae959e17138845d81997291b6cf43a514d/pkg/controller/pod_volume_backup_controller.go#L364C30-L368

if err := controller.UpdatePVBStatusToFailed(s.ctx, client, &pvbs.Items[i],
fmt.Errorf("get a podvolumebackup with status %q during the server starting, mark it as %q", velerov1api.PodVolumeBackupPhaseInProgress, velerov1api.PodVolumeBackupPhaseFailed),
"", time.Now(), s.logger); err != nil {
s.logger.WithError(errors.WithStack(err)).Errorf("failed to patch podvolumebackup %q", pvb.GetName())
continue
}

This piece of code is why the message looks different from before.
We can use some meaningful information to replace the empty string when calling the PodVolumeBackup status update function.

mrnold added a commit to mrnold/velero that referenced this issue Jul 18, 2024
Also change "get" to "found" as requested in issue vmware-tanzu#7857.

Signed-off-by: Matthew Arnold <marnold@redhat.com>
mrnold added a commit to mrnold/velero that referenced this issue Jul 22, 2024
Also change "get" to "found" as requested in issue vmware-tanzu#7857.

Signed-off-by: Matthew Arnold <marnold@redhat.com>
mrnold added a commit to mrnold/velero that referenced this issue Jul 24, 2024
Also change "get" to "found" as requested in issue vmware-tanzu#7857.

Signed-off-by: Matthew Arnold <marnold@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants