Skip to content

Commit

Permalink
CSM 1.11.1 related changes
Browse files Browse the repository at this point in the history
  • Loading branch information
adarsh-dell committed Sep 24, 2024
1 parent 95bbc3f commit 832b9da
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 32 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.podman
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ LABEL vendor="Dell Inc." \
name="csi-unity" \
summary="CSI Driver for Dell Unity XT" \
description="CSI Driver for provisioning persistent storage from Dell Unity XT" \
version="2.11.0" \
version="2.11.1" \
license="Apache-2.0"
COPY csi-unity/licenses /licenses
4 changes: 2 additions & 2 deletions dell-csi-helm-installer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ This project provides the following capabilitites, each one is discussed in deta


Most of these usages require the creation/specification of a values file. These files specify configuration settings that are passed into the driver and configure it for use. To create one of these files, the following steps should be followed:
1. Download a template file for the driver to a new location, naming this new file is at the users discretion. The template files are always found at `https://github.com/dell/helm-charts/raw/csi-unity-2.11.0/charts/csi-unity/values.yaml`
1. Download a template file for the driver to a new location, naming this new file is at the users discretion. The template files are always found at `https://github.com/dell/helm-charts/raw/csi-unity-2.11.1/charts/csi-unity/values.yaml`
2. Edit the file such that it contains the proper configuration settings for the specific environment. These files are yaml formatted so maintaining the file structure is important.

For example, to create a values file for the Unity XT driver the following steps can be executed
Expand All @@ -58,7 +58,7 @@ For example, to create a values file for the Unity XT driver the following steps
cd dell-csi-helm-installer
# download the template file
wget -O my-unity-settings.yaml https://github.com/dell/helm-charts/raw/csi-unity-2.11.0/charts/csi-unity/values.yaml
wget -O my-unity-settings.yaml https://github.com/dell/helm-charts/raw/csi-unity-2.11.1/charts/csi-unity/values.yaml
# edit the newly created values file
vi my-unity-settings.yaml
Expand Down
4 changes: 2 additions & 2 deletions dell-csi-helm-installer/csi-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ PROG="${0}"
NODE_VERIFY=1
VERIFY=1
MODE="install"
DEFAULT_DRIVER_VERSION="v2.11.0"
DEFAULT_DRIVER_VERSION="v2.11.1"
WATCHLIST=""

DRIVERVERSION="csi-unity-2.11.0"
DRIVERVERSION="csi-unity-2.11.1"

# usage will print command execution help and then exit
function usage() {
Expand Down
8 changes: 4 additions & 4 deletions dell-csi-helm-installer/csi-offline-bundle.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ For example, here is the output of a request to build an offline bundle for the
dellemc/csi-metadata-retriever:v1.6.0
dellemc/csipowermax-reverseproxy:v2.6.0
dellemc/csi-powermax:v2.11.0
dellemc/csi-powerstore:v2.11.0
dellemc/csi-unity:v2.11.0
dellemc/csi-vxflexos:v2.11.0
dellemc/csi-powerstore:v2.11.1
dellemc/csi-unity:v2.11.1
dellemc/csi-vxflexos:v2.11.1
dellemc/csm-authorization-sidecar:v1.9.0
dellemc/csm-metrics-powerflex:v1.5.0
dellemc/csm-metrics-powerscale:v1.2.0
Expand Down Expand Up @@ -189,7 +189,7 @@ Preparing a offline bundle for installation
*
* Loading docker images
Loaded image: docker.io/dellemc/csi-powerstore:v2.11.0
Loaded image: docker.io/dellemc/csi-powerstore:v2.11.1
Loaded image: docker.io/dellemc/csi-isilon:v2.11.0
...
...
Expand Down
2 changes: 1 addition & 1 deletion dell-csi-helm-installer/csi-offline-bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ DRIVER="csi-unity"
SCRIPTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
REPODIR="$( dirname "${SCRIPTDIR}" )"

DRIVERVERSION="csi-unity-2.11.0"
DRIVERVERSION="csi-unity-2.11.1"

while getopts "cprv:h" opt; do
case $opt in
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/dell/gocsi v1.11.0
github.com/dell/gofsutil v1.16.1
github.com/dell/goiscsi v1.9.0
github.com/dell/gounity v1.18.0
github.com/dell/gounity v1.18.1
github.com/fsnotify/fsnotify v1.4.9
github.com/kubernetes-csi/csi-lib-utils v0.7.0
github.com/sirupsen/logrus v1.9.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ github.com/dell/goiscsi v1.9.0 h1:VvMHbAO4vk80oc/TAbQPYlxysscCqVBW78GyPoUxgik=
github.com/dell/goiscsi v1.9.0/go.mod h1:NI/W/0O1UrMW2zVdMxy4z395Jn0r7utH6RQDFSZiFyQ=
github.com/dell/gonvme v1.8.1 h1:46M5lPqj7+Xjen+qxooRN9cx/+uJG4xtK9TpwduWDgE=
github.com/dell/gonvme v1.8.1/go.mod h1:ajbuF+fswq+ty2tRTG5FN4ecIMJsG7aDu/bkMynTKAs=
github.com/dell/gounity v1.18.0 h1:vE8nS2bMt6SEN5KLFlUysoxbtt4bQtOGnwFOBFAMEq8=
github.com/dell/gounity v1.18.0/go.mod h1:pf6iJHk4mVPqb6/O+fJNUaRek65mzyCaiwlyULViBPc=
github.com/dell/gounity v1.18.1 h1:ivE3qu8jUe3KOaeZoVuoVyNzg2c2K2b81RQzq7WIqOM=
github.com/dell/gounity v1.18.1/go.mod h1:pf6iJHk4mVPqb6/O+fJNUaRek65mzyCaiwlyULViBPc=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
Expand Down
45 changes: 26 additions & 19 deletions service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,15 @@ func (s *service) syncDriverSecret(ctx context.Context) error {
if err != nil {
return fmt.Errorf("unable to initialize the Unity client [%v]", err)
}
err = unityClient.Authenticate(ctx, &gounity.ConfigConnect{
Endpoint: endpoint,
Username: secret.Username,
Password: secret.Password,
Insecure: insecure,
})
if err != nil {
log.Errorf("unable to authenticate [%v]", err)
}
secret.UnityClient = unityClient

copyStorage := StorageArrayConfig{}
Expand Down Expand Up @@ -794,28 +803,26 @@ func (s *service) requireProbe(ctx context.Context, arrayID string) error {
func singleArrayProbe(ctx context.Context, probeType string, array *StorageArrayConfig) error {
rid, log := utils.GetRunidAndLogger(ctx)
ctx, log = setArrayIDContext(ctx, array.ArrayID)
if array.UnityClient.GetToken() == "" {
err := array.UnityClient.Authenticate(ctx, &gounity.ConfigConnect{
Endpoint: array.Endpoint,
Username: array.Username,
Password: array.Password,
Insecure: *array.SkipCertificateValidation,
})
if err != nil {
log.Errorf("Unity authentication failed for array %s error: %v", array.ArrayID, err)
if e, ok := status.FromError(err); ok {
if e.Code() == codes.Unauthenticated {
array.IsProbeSuccess = false
return status.Error(codes.FailedPrecondition, utils.GetMessageWithRunID(rid, "Unable to login to Unity. Error: %s", err.Error()))
}

err := array.UnityClient.BasicSystemInfo(ctx, &gounity.ConfigConnect{
Endpoint: array.Endpoint,
Username: array.Username,
Password: array.Password,
Insecure: *array.SkipCertificateValidation,
})
if err != nil {
log.Errorf("Unity probe failed for array %s error: %v", array.ArrayID, err)
if e, ok := status.FromError(err); ok {
if e.Code() == codes.Unauthenticated {
array.IsProbeSuccess = false
return status.Error(codes.FailedPrecondition, utils.GetMessageWithRunID(rid, "Unable Get basic system info from Unity. Error: %s", err.Error()))
}
array.IsProbeSuccess = false
return status.Error(codes.FailedPrecondition, utils.GetMessageWithRunID(rid, "Unable to login to Unity. Verify hostname/IP Address of unity. Error: %s", err.Error()))
}
array.IsProbeSuccess = true
log.Debugf("%s Probe Success", probeType)
return nil
array.IsProbeSuccess = false
return status.Error(codes.FailedPrecondition, utils.GetMessageWithRunID(rid, "Unable Get basic system info from Unity. Verify hostname/IP Address of unity. Error: %s", err.Error()))
}
array.IsProbeSuccess = true
log.Debugf("%s Probe Success", probeType)
return nil
}

Expand Down

0 comments on commit 832b9da

Please sign in to comment.