Skip to content

Commit 9714dba

Browse files
authored
Merge pull request #1102 from huww98/rm-blockdev
disk: remove the call to NeedResize
2 parents 0a58142 + b591e13 commit 9714dba

File tree

3 files changed

+6
-17
lines changed

3 files changed

+6
-17
lines changed

build/gather-node-deps.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ DEPS=(
88
/etc/netconfig
99
/etc/mke2fs.conf /sbin/{fsck,mkfs,mount,umount}.{ext{2,3,4},xfs,nfs}
1010
/usr/bin/{mount,umount,lspci,lsof,chmod,grep,tail,partx}
11-
/usr/sbin/{fsck,mkfs,sfdisk,losetup,blockdev}
12-
/sbin/dumpe2fs /sbin/resize2fs
13-
/usr/sbin/xfs_io /usr/sbin/xfs_growfs
11+
/usr/sbin/{fsck,mkfs,sfdisk,losetup}
12+
/sbin/resize2fs
13+
/usr/sbin/xfs_growfs
1414
)
1515

1616
declare -A FILE_PACKAGES

hack/base-image-deps.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@ e2fsprogs 1.47.0-2+b2
44
fdisk 2.38.1-5+deb12u3
55
grep 3.8-5
66
libblkid1 2.38.1-5+deb12u3
7-
libbsd0 0.11.7-2
87
libc6 2.36-9+deb12u13
98
libcom-err2 1.47.0-2+b2
10-
libdevmapper1.02.1 2:1.02.185-2
11-
libedit2 3.1-20221030-2
129
libext2fs2 1.47.0-2+b2
1310
libfdisk1 2.38.1-5+deb12u3
1411
libgssapi-krb5-2 1.20.1-2+deb12u4
@@ -19,7 +16,6 @@ libkmod2 30+20221128-1
1916
libkrb5-3 1.20.1-2+deb12u4
2017
libkrb5support0 1.20.1-2+deb12u4
2118
liblzma5 5.4.1-1
22-
libmd0 1.0.4-2
2319
libmount1 2.38.1-5+deb12u3
2420
libpci3 1:3.9.0-4
2521
libpcre2-8-0 10.42-1

pkg/disk/nodeserver.go

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -678,16 +678,9 @@ func (ns *nodeServer) setupDisk(ctx context.Context, device, targetPath string,
678678
logger.V(2).Info("mount successful", "target", targetPath, "device", device, "mkfsOptions", mkfsOptions, "options", mountOptions)
679679

680680
r := k8smount.NewResizeFs(diskMounter.Exec)
681-
needResize, err := r.NeedResize(device, targetPath)
682-
if err != nil {
683-
logger.Error(err, "could not determine if volume need to be resized")
684-
return nil
685-
}
686-
if needResize {
687-
klog.V(3).Info("resizing volume")
688-
if _, err := r.Resize(device, targetPath); err != nil {
689-
return fmt.Errorf("could not resize volume %s: %w", volumeId, err)
690-
}
681+
logger.V(3).Info("resizing volume")
682+
if _, err := r.Resize(device, targetPath); err != nil {
683+
return fmt.Errorf("could not resize volume %s: %w", volumeId, err)
691684
}
692685
return nil
693686
}

0 commit comments

Comments
 (0)