Skip to content

Commit 013931c

Browse files
committed
🐛 Fix default fs handling
Signed-off-by: Muhammed Hussain Karimi <[email protected]>
1 parent 7056896 commit 013931c

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

.github/workflows/k8s.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ jobs:
103103
with:
104104
name: smoke-k8s-dump
105105
path: dump
106-
- name: Setup tmate session
107-
if: ${{ failure() }}
108-
timeout-minutes: 120
109-
uses: mxschmitt/action-tmate@v3
106+
# - name: Setup tmate session
107+
# if: ${{ failure() }}
108+
# timeout-minutes: 120
109+
# uses: mxschmitt/action-tmate@v3
110110

111111
release-check:
112112
if: ${{ inputs.release-check }}

rawfile/bd2fs.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ def NodeGetInfo(self, request, context):
106106
@log_grpc_request
107107
def NodeStageVolume(self, request, context):
108108
with VolLock(request.volume_id):
109-
if not metadata_or(volume_id=request.volume_id).get("ready", False):
109+
meta = metadata_or(volume_id=request.volume_id)
110+
if not meta.get("ready", False):
110111
raise VolumeNotReadyError(request.volume_id)
111112
bd_stage_request = NodeStageVolumeRequest()
112113
bd_stage_request.CopyFrom(request)
@@ -141,7 +142,13 @@ def NodeStageVolume(self, request, context):
141142
format_options = format_options_str.split(" ")
142143
default_fs = request.volume_capability.mount.fs_type
143144
fs = get_from_device_or_fallback(
144-
bd_publish_request.target_path, (default_fs or config.default_fs)
145+
bd_publish_request.target_path,
146+
(
147+
default_fs
148+
or config.csi_driver.storage_pools[
149+
meta["storage_pool"]
150+
].default_fs
151+
),
145152
)
146153
fs.mountpoint = f"{request.staging_target_path}/mount"
147154
fs.format_and_mount(

0 commit comments

Comments
 (0)