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

[BACKPORT][v1.5.1][BUG - 1.5.0 Upgrade] Instance Manager Pods CrashLoop After Upgrade From 1.4.0 #6265

Closed
github-actions bot opened this issue Jul 10, 2023 · 2 comments
Assignees
Labels
component/longhorn-manager Longhorn manager (control plane) kind/backport Backport request kind/bug priority/0 Must be implement or fixed in this release (managed by PO) severity/1 Function broken (a critical incident with very high impact (ex: data corruption, failed upgrade)
Milestone

Comments

@github-actions
Copy link

backport #6264

@github-actions github-actions bot added component/longhorn-manager Longhorn manager (control plane) kind/backport Backport request kind/bug priority/0 Must be implement or fixed in this release (managed by PO) severity/1 Function broken (a critical incident with very high impact (ex: data corruption, failed upgrade) labels Jul 10, 2023
@github-actions github-actions bot added this to the v1.5.1 milestone Jul 10, 2023
@ChanYiLin ChanYiLin self-assigned this Jul 10, 2023
@longhorn-io-github-bot
Copy link

longhorn-io-github-bot commented Jul 10, 2023

Pre Ready-For-Testing Checklist

  • Where is the reproduce steps/test steps documented?
    The reproduce steps/test steps are at:

    • Create a PVC with storageClassName in annotation instead of spec
    apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
      name: test
      annotations:
        volume.beta.kubernetes.io/storage-class: longhorn
    spec:
      accessModes:
        - ReadWriteOnce
      # storageClassName: longhorn
      resources:
        requests:
          storage: 1Gi
    
    • Write some data into the Volume
    • Backup the Volume
    • describe the BackupVolume
    k describe lhbv -n longhorn-system
    
    • Can still get the storageClassName from BackupVolume CR status
  • Is there a workaround for the issue? If so, where is it documented?
    The workaround is at:

  • manually edit pvc to add "storageClassName" to pvc.Spec
  • Have the backend code been merged (Manager, Engine, Instance Manager, BackupStore etc) (including backport-needed/*)?
    The PR is at

@roger-ryao
Copy link

roger-ryao commented Jul 12, 2023

Verified on v1.5.x-head 20230712

The test steps

  1. Set up a Longhorn v1.4.2 cluster with some orphan resources.
  2. Create a Pod with PVC with storageClassName in annotation instead of spec
    Create a Pod with a PVC that has the storageClassName specified in the annotation instead of the spec.
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: longhorn-volv-pvc
annotations:
  volume.beta.kubernetes.io/storage-class: longhorn
spec:
accessModes:
  - ReadWriteOnce
# storageClassName: longhorn
resources:
  requests:
    storage: 1Gi
---
apiVersion: v1
kind: Pod
metadata:
name: volume-test
namespace: default
spec:
restartPolicy: Always
containers:
- name: volume-test
  image: nginx
  imagePullPolicy: IfNotPresent
  livenessProbe:
    exec:
      command:
        - ls
        - /data/lost+found
    initialDelaySeconds: 5
    periodSeconds: 5
  volumeMounts:
  - name: volv
    mountPath: /data
  ports:
  - containerPort: 80
volumes:
- name: volv
  persistentVolumeClaim:
    claimName: longhorn-volv-pvc
  1. Write some data into the Volume
  2. Backup the Volume
  3. describe the BackupVolume
kubectl describe lhbv -n longhorn-system
  1. Upgrade to v1.5.x-head
  2. describe the BackupVolume after upgrade
    Verify that the storageClassName is present in the BackupVolume CR status.

Result Passed

  1. The storageClassName was present in the BackupVolume CR status after upgraded.
    Screenshot_20230712_112518

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/longhorn-manager Longhorn manager (control plane) kind/backport Backport request kind/bug priority/0 Must be implement or fixed in this release (managed by PO) severity/1 Function broken (a critical incident with very high impact (ex: data corruption, failed upgrade)
Projects
Status: Closed
Development

No branches or pull requests

3 participants