Skip to content

Commit d9ef8eb

Browse files
committed
fix
1 parent fd59dde commit d9ef8eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

controller/node_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,12 +1389,12 @@ func (nc *NodeController) getNewAndMissingOrphanedReplicaDataStores(diskName, di
13891389

13901390
if !ok {
13911391
if reused {
1392-
nc.logger.Infof("Orphan %v is reused by replica. Marking DeleteCustomResourceOnly.", orphan.Name)
1392+
nc.logger.Infof("Orphan %v is reused by replica. Tring to mark DeleteCustomResourceOnly.", orphan.Name)
1393+
orphan = orphan.DeepCopy()
13931394
orphan.Labels[types.DeleteCustomResourceOnly] = string(longhorn.ConditionStatusTrue)
13941395
if _, err := nc.ds.UpdateOrphan(orphan); err != nil {
13951396
nc.logger.WithError(err).Warnf("Failed to update orphan %v after setting DeleteCustomResourceOnly label", orphan.Name)
13961397
}
1397-
13981398
}
13991399
nc.logger.Infof("Adding Orphan %v to missingOrphan", orphan.Name)
14001400
missingOrphanedReplicaDataStores[dataStore] = ""

0 commit comments

Comments
 (0)