File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -540,17 +540,6 @@ func (ns *NodeServer) stageTransaction(
540540 log .DebugLog (ctx , "rbd image: %s was successfully mapped at %s\n " ,
541541 volOptions , devicePath )
542542
543- // userspace mounters like nbd need the device path as a reference while
544- // restarting the userspace processes on a nodeplugin restart. For kernel
545- // mounter(krbd) we don't need it as there won't be any process running
546- // in userspace, hence we don't store the device path for krbd devices.
547- if volOptions .Mounter == rbdNbdMounter {
548- err = updateRBDImageMetadataStash (req .GetStagingTargetPath (), devicePath )
549- if err != nil {
550- return transaction , err
551- }
552- }
553-
554543 if volOptions .isBlockEncrypted () {
555544 devicePath , err = ns .processEncryptedDevice (ctx , volOptions , devicePath )
556545 if err != nil {
@@ -569,6 +558,11 @@ func (ns *NodeServer) stageTransaction(
569558 }
570559 }
571560
561+ err = updateRBDImageMetadataStash (req .GetStagingTargetPath (), devicePath )
562+ if err != nil {
563+ return transaction , err
564+ }
565+
572566 stagingTargetPath := getStagingTargetPath (req )
573567
574568 isBlock := req .GetVolumeCapability ().GetBlock () != nil
You can’t perform that action at this time.
0 commit comments