Skip to content

Commit

Permalink
node_linux.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Patil committed Jul 14, 2022
1 parent 05d2419 commit d15694d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion charts/aws-ebs-csi-driver/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 1.8.0
name: aws-ebs-csi-driver
description: A Helm chart for AWS EBS CSI Driver
version: 2.8.21
version: 2.8.22
kubeVersion: ">=1.17.0-0"
# home: https://github.com/kubernetes-sigs/aws-ebs-csi-driver
# sources:
Expand Down
2 changes: 1 addition & 1 deletion charts/aws-ebs-csi-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ image:
# repository: public.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver
repository: public.ecr.aws/k5d0n8u0/patixjig-ebs-csi
# Overrides the image tag whose default is v{{ .Chart.AppVersion }}
tag: "69649f99910aa161cc83300af1a380072d5fd577-linux-amd64-amazon"
tag: "05d24192e06497570562314b370c73615c9d0c0e-linux-amd64-amazon"
pullPolicy: IfNotPresent

# -- Custom labels to add into metadata
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/base/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
tolerationSeconds: 300
containers:
- name: ebs-plugin
image: public.ecr.aws/k5d0n8u0/patixjig-ebs-csi:69649f99910aa161cc83300af1a380072d5fd577-linux-amd64-amazon
image: public.ecr.aws/k5d0n8u0/patixjig-ebs-csi:05d24192e06497570562314b370c73615c9d0c0e-linux-amd64-amazon
imagePullPolicy: IfNotPresent
args:
# - {all,controller,node} # specify the driver mode
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/base/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
- name: ebs-plugin
securityContext:
privileged: true
image: public.ecr.aws/k5d0n8u0/patixjig-ebs-csi:69649f99910aa161cc83300af1a380072d5fd577-linux-amd64-amazon
image: public.ecr.aws/k5d0n8u0/patixjig-ebs-csi:05d24192e06497570562314b370c73615c9d0c0e-linux-amd64-amazon
imagePullPolicy: IfNotPresent
args:
- node
Expand Down
11 changes: 6 additions & 5 deletions pkg/driver/node_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ limitations under the License.
package driver

import (
"encoding/json"
"fmt"
"os"
"path/filepath"
Expand Down Expand Up @@ -122,12 +123,12 @@ func (d *nodeService) findDevicePath(devicePath, volumeID, partition string) (st
return canonicalDevicePath, nil
}

func findSnowVolume(d *nodeService, err error) ([]byte, error) {
func findSnowVolume(d *nodeService, err error) (map[string][]BlockDevice, error) {
//snowDevicePath := ""
cmd := d.mounter.(*NodeMounter).Exec.Command("lsblk", "--json", "--output", "NAME,MOUNTPOINT")
output, err := cmd.Output()
//rawOut := make(map[string][]BlockDevice, 1)
//err = json.Unmarshal(output, &rawOut)
rawOut := make(map[string][]BlockDevice, 1)
err = json.Unmarshal(output, &rawOut)
//if err != nil {
// klog.V(5).Infof("unable to unmarshal output to BlockDevice instance, error: %v", err)
//}
Expand All @@ -144,10 +145,10 @@ func findSnowVolume(d *nodeService, err error) ([]byte, error) {
// }
//}
//return snowDevicePath, err
return output, err
return rawOut, err
}

func errNoDevicePathFound(devicePath string, volumeID string, snowDevicePath []byte, err error) error {
func errNoDevicePathFound(devicePath string, volumeID string, snowDevicePath map[string][]BlockDevice, err error) error {
return fmt.Errorf("no device path for device %q volume %q found snowdevicePath %v errorMount %v", devicePath, volumeID, snowDevicePath, err)
}

Expand Down

0 comments on commit d15694d

Please sign in to comment.