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

fix: a sha256 checking bug when downloading different versions of binary files #1646

Merged
merged 1 commit into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/service/operation/file/containerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func NewContainerd(sshClient ssh.Interface, rootFs rootfs.Interface, version, ar
RootFs: rootFs,
Type: FileBinary,
Name: fileName,
LocalFullPath: filepath.Join(rootFs.ClusterRootFsDir(), fileName),
LocalFullPath: filepath.Join(rootFs.ClusterRootFsDir(), ContainerdID, version, arch, fileName),
RemoteFullPath: filepath.Join(BinDir, fileName),
})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/service/operation/file/crictl.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func NewCrictl(sshClient ssh.Interface, rootFs rootfs.Interface, version, arch s
RootFs: rootFs,
Type: FileBinary,
Name: fileName,
LocalFullPath: filepath.Join(rootFs.ClusterRootFsDir(), fileName),
LocalFullPath: filepath.Join(rootFs.ClusterRootFsDir(), CrictlID, version, arch, fileName),
RemoteFullPath: filepath.Join(BinDir, fileName),
})
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions pkg/service/operation/file/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func NewDocker(sshClient ssh.Interface, rootFs rootfs.Interface, version, arch s
RootFs: rootFs,
Type: FileBinary,
Name: fileName,
LocalFullPath: filepath.Join(rootFs.ClusterRootFsDir(), fileName),
LocalFullPath: filepath.Join(rootFs.ClusterRootFsDir(), DockerID, version, arch, fileName),
RemoteFullPath: filepath.Join(directory.BinDir, fileName),
})
if err != nil {
Expand Down Expand Up @@ -100,7 +100,7 @@ func NewCRIDockerd(sshClient ssh.Interface, rootFs rootfs.Interface, version, ar
RootFs: rootFs,
Type: FileBinary,
Name: fileName,
LocalFullPath: filepath.Join(rootFs.ClusterRootFsDir(), fileName),
LocalFullPath: filepath.Join(rootFs.ClusterRootFsDir(), CRIDockerdID, version, arch, fileName),
RemoteFullPath: filepath.Join(directory.BinDir, fileName),
})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/service/operation/file/k3s.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func NewK3s(sshClient ssh.Interface, rootFs rootfs.Interface, version, arch stri
RootFs: rootFs,
Type: FileBinary,
Name: fileName,
LocalFullPath: filepath.Join(rootFs.ClusterRootFsDir(), fileName),
LocalFullPath: filepath.Join(rootFs.ClusterRootFsDir(), K3sID, version, arch, fileName),
RemoteFullPath: filepath.Join(BinDir, fileName),
})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/service/operation/file/kubeadm.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func NewKubeadm(sshClient ssh.Interface, rootFs rootfs.Interface, version, arch
RootFs: rootFs,
Type: FileBinary,
Name: fileName,
LocalFullPath: filepath.Join(rootFs.ClusterRootFsDir(), fileName),
LocalFullPath: filepath.Join(rootFs.ClusterRootFsDir(), KubeadmID, version, arch, fileName),
RemoteFullPath: filepath.Join(BinDir, fileName),
})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/service/operation/file/kubecni.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func NewKubecni(sshClient ssh.Interface, rootFs rootfs.Interface, version, arch
RootFs: rootFs,
Type: FileBinary,
Name: fileName,
LocalFullPath: filepath.Join(rootFs.ClusterRootFsDir(), fileName),
LocalFullPath: filepath.Join(rootFs.ClusterRootFsDir(), KubecniID, version, arch, fileName),
RemoteFullPath: filepath.Join(OptCniBinDir, fileName),
})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/service/operation/file/kubectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func NewKubectl(sshClient ssh.Interface, rootFs rootfs.Interface, version, arch
RootFs: rootFs,
Type: FileBinary,
Name: fileName,
LocalFullPath: filepath.Join(rootFs.ClusterRootFsDir(), fileName),
LocalFullPath: filepath.Join(rootFs.ClusterRootFsDir(), KubectlID, version, arch, fileName),
RemoteFullPath: filepath.Join(BinDir, fileName),
})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/service/operation/file/kubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func NewKubelet(sshClient ssh.Interface, rootFs rootfs.Interface, version, arch
RootFs: rootFs,
Type: FileBinary,
Name: fileName,
LocalFullPath: filepath.Join(rootFs.ClusterRootFsDir(), fileName),
LocalFullPath: filepath.Join(rootFs.ClusterRootFsDir(), KubeletID, version, arch, fileName),
RemoteFullPath: filepath.Join(BinDir, fileName),
})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/service/operation/file/runc.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func NewRunc(sshClient ssh.Interface, rootFs rootfs.Interface, version, arch str
RootFs: rootFs,
Type: FileBinary,
Name: fileName,
LocalFullPath: filepath.Join(rootFs.ClusterRootFsDir(), fileName),
LocalFullPath: filepath.Join(rootFs.ClusterRootFsDir(), RuncID, version, arch, fileName),
RemoteFullPath: filepath.Join(BinDir, fileName),
})
if err != nil {
Expand Down