Skip to content
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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ gocsi
.idea
csm-common.mk
go-code-tester

vendor/
16 changes: 9 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright © 2021-2025 Dell Inc. or its subsidiaries. All Rights Reserved.
# Copyright © 2021-2026 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -11,21 +11,23 @@
# limitations under the License

# some arguments that must be supplied
ARG GOPROXY
ARG GOIMAGE
ARG BASEIMAGE
ARG VERSION="2.16.0"

# Stage to build the driver
FROM $GOIMAGE as builder
ARG GOPROXY
ARG VERSION

RUN mkdir -p /go/src
COPY ./ /go/src/

WORKDIR /go/src/
RUN CGO_ENABLED=0 \
make build
RUN make build IMAGE_VERSION=$VERSION

# Stage to build the driver image
FROM $BASEIMAGE AS final
ARG VERSION

# copy in the driver
COPY --from=builder /go/src/csi-isilon /
Expand All @@ -36,8 +38,8 @@ LABEL vendor="Dell Technologies" \
name="csi-isilon" \
summary="CSI Driver for Dell EMC PowerScale" \
description="CSI Driver for provisioning persistent storage from Dell EMC PowerScale" \
release="1.15.0" \
version="2.15.0" \
release="1.16.0" \
version=$VERSION \
license="Apache-2.0"

COPY ./licenses /licenses
26 changes: 0 additions & 26 deletions Gopkg.toml

This file was deleted.

159 changes: 63 additions & 96 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,96 +1,63 @@
# default target
all: help

# include an overrides file, which sets up default values and allows user overrides
include overrides.mk

# Help target, prints usefule information
help:
@echo
@echo "The following targets are commonly used:"
@echo
@echo "build - Builds the code locally"
@echo "clean - Cleans the local build"
@echo "docker - Builds the code within a golang container and then creates the driver image"
@echo "integration-test - Runs the integration tests. Requires access to an array"
@echo "push - Pushes the built container to a target registry"
@echo "unit-test - Runs the unit tests"
@echo
@make -s overrides-help

# Clean the build
clean:
rm -f core/core_generated.go go-code-tester
rm -f semver.mk
go clean

# Dependencies
dependencies:
go generate
go run core/semver/semver.go -f mk >semver.mk

format:
@gofmt -w -s .

# Build the driver locally
build: dependencies
GOOS=linux CGO_ENABLED=0 go build

# Generates the docker container (but does not push)
podman-build:
make -f docker.mk podman-build

# Generates the docker container without using cache(but does not push)
podman-build-no-cache:
make -f docker.mk podman-build-no-cache

docker: build
make -f docker.mk docker

# Pushes container to the repository
podman-build-image-push: podman-build
make -f docker.mk podman-build-image-push

dev-build-image-push: dev-build
make -f docker.mk docker-build-image-push

# Windows or Linux; requires no hardware
unit-test: go-code-tester
GITHUB_OUTPUT=/dev/null \
./go-code-tester 90 "." "" "true" "" "" "./service/mock|./common/constants|./test/integration|./core|./provider"

coverage:
cd service; go tool cover -html=c.out -o coverage.html

# Linux only; populate env.sh with the hardware parameters
integration-test:
( cd test/integration; sh run.sh )

version:
go generate
go run core/semver/semver.go -f mk >semver.mk
make -f docker.mk version

gosec:
gosec -quiet -log gosec.log -out=gosecresults.csv -fmt=csv ./...

.PHONY: actions action-help
actions: ## Run all GitHub Action checks that run on a pull request creation
@echo "Running all GitHub Action checks for pull request events..."
@act -l | grep -v ^Stage | grep pull_request | grep -v image_security_scan | awk '{print $$2}' | while read WF; do \
echo "Running workflow: $${WF}"; \
act pull_request --no-cache-server --platform ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest --job "$${WF}"; \
done

go-code-tester:
curl -o go-code-tester -L https://raw.githubusercontent.com/dell/common-github-actions/main/go-code-tester/entrypoint.sh \
&& chmod +x go-code-tester

action-help: ## Echo instructions to run one specific workflow locally
@echo "GitHub Workflows can be run locally with the following command:"
@echo "act pull_request --no-cache-server --platform ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest --job <jobid>"
@echo ""
@echo "Where '<jobid>' is a Job ID returned by the command:"
@echo "act -l"
@echo ""
@echo "NOTE: if act is not installed, it can be downloaded from https://github.com/nektos/act"
# Copyright © 2026 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Dell Technologies, Dell and other trademarks are trademarks of Dell Inc.
# or its subsidiaries. Other trademarks may be trademarks of their respective
# owners.

include images.mk

# This will be overridden during image build.
IMAGE_VERSION ?= 0.0.0
LDFLAGS = "-X main.ManifestSemver=$(IMAGE_VERSION)"

# default target
all: help

# Help target, prints usefule information
help:
@echo
@echo "The following targets are commonly used:"
@echo
@echo "build - Builds the code locally"
@echo "clean - Cleans the local build"
@echo "integration-test - Runs the integration tests. Requires access to an array"
@echo "unit-test - Runs the unit tests"
@echo "vendor - Downloads a vendor list (local copy) of repositories required to compile the repo."
@echo
@make -s overrides-help

# Clean the build
clean:
rm -f core/core_generated.go go-code-tester
rm -f semver.mk
rm -rf csm-common.mk
rm -rf vendor
go clean

format:
@gofmt -w -s .

# Build the driver locally
build: generate vendor
CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -mod=vendor -ldflags $(LDFLAGS) -o csi-isilon

# Windows or Linux; requires no hardware
unit-test: go-code-tester
GITHUB_OUTPUT=/dev/null \
./go-code-tester 90 "." "" "true" "" "" "./service/mock|./common/constants|./test/integration|./core|./provider"

coverage:
cd service; go tool cover -html=c.out -o coverage.html

# Linux only; populate env.sh with the hardware parameters
integration-test:
( cd test/integration; sh run.sh )

gosec:
gosec -quiet -log gosec.log -out=gosecresults.csv -fmt=csv ./...

go-code-tester:
git clone --depth 1 git@github.com:CSM/actions.git temp-repo
cp temp-repo/go-code-tester/entrypoint.sh ./go-code-tester
chmod +x go-code-tester
rm -rf temp-repo
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# :lock: **Important Notice**
Starting with the release of **Container Storage Modules v1.16.0**, this repository will no longer be maintained as an open source project. Future development will continue under a closed source model. This change reflects our commitment to delivering even greater value to our customers by enabling faster innovation and more deeply integrated features with the Dell storage portfolio.<br>
For existing customers using Dell’s Container Storage Modules, you will continue to receive:
* **Ongoing Support & Community Engagement**<br>
You will continue to receive high-quality support through Dell Support and our community channels. Your experience of engaging with the Dell community remains unchanged.
* **Streamlined Deployment & Updates**<br>
Deployment and update processes will remain consistent, ensuring a smooth and familiar experience.
* **Access to Documentation & Resources**<br>
All documentation and related materials will remain publicly accessible, providing transparency and technical guidance.
* **Continued Access to Current Open Source Version**<br>
The current open-source version will remain available under its existing license for those who rely on it.

Moving to a closed source model allows Dell’s development team to accelerate feature delivery and enhance integration across our Enterprise Kubernetes Storage solutions ultimately providing a more seamless and robust experience.<br>
We deeply appreciate the contributions of the open source community and remain committed to supporting our customers through this transition.<br>

For questions or access requests, please contact the maintainers via [Dell Support](https://www.dell.com/support/kbdoc/en-in/000188046/container-storage-interface-csi-drivers-and-container-storage-modules-csm-how-to-get-support).

# CSI Driver for Dell EMC PowerScale

[![Go Report Card](https://goreportcard.com/badge/github.com/dell/csi-isilon?style=flat-square)](https://goreportcard.com/report/github.com/dell/csi-isilon)
Expand Down Expand Up @@ -49,4 +66,3 @@ Both the Controller and the Node portions of the driver can only be run on nodes
## Documentation

For more detailed information on the driver, please refer to [Container Storage Modules documentation](https://dell.github.io/csm-docs/).

4 changes: 2 additions & 2 deletions common/constants/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package constants
import (
"time"

"github.com/sirupsen/logrus"
csmlog "github.com/dell/csmlog"
)

/*
Expand Down Expand Up @@ -64,7 +64,7 @@ const (
IsilonConfigFile = "/isilon-configs/config"

// DefaultLogLevel for csi logs
DefaultLogLevel = logrus.DebugLevel
DefaultLogLevel = csmlog.DebugLevel

// ParamCSILogLevel csi driver log level
ParamCSILogLevel = "CSI_LOG_LEVEL"
Expand Down
12 changes: 7 additions & 5 deletions common/utils/fromcontext/from-context.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,20 @@ import (
"fmt"
"strconv"

"github.com/dell/csi-isilon/v2/common/utils/logging"
csmlog "github.com/dell/csmlog"
csictx "github.com/dell/gocsi/context"
"gopkg.in/yaml.v3"
)

var log = csmlog.GetLogger()

// GetBoolean parses an environment variable into a boolean value. If an error is encountered, default is set to false, and error is logged
func GetBoolean(ctx context.Context, key string) bool {
log := logging.GetRunIDLogger(ctx)
log := log.WithContext(ctx)
if val, ok := csictx.LookupEnv(ctx, key); ok {
b, err := strconv.ParseBool(val)
if err != nil {
log.WithField(key, val).Debugf(
log.WithFields(csmlog.Fields{key: val}).Debugf(
"invalid boolean value for '%s', defaulting to false", key)
return false
}
Expand All @@ -55,11 +57,11 @@ func GetArray(ctx context.Context, key string) ([]string, error) {

// GetUint parses an environment variable into a uint value. If an error is encountered, default is set to 0, and error is logged
func GetUint(ctx context.Context, key string) uint {
log := logging.GetRunIDLogger(ctx)
log := log.WithContext(ctx)
if val, ok := csictx.LookupEnv(ctx, key); ok {
i, err := strconv.ParseUint(val, 10, 0)
if err != nil {
log.WithField(key, val).Debugf(
log.WithFields(csmlog.Fields{key: val}).Debugf(
"invalid int value for '%s', defaulting to 0", key)
return 0
}
Expand Down
4 changes: 2 additions & 2 deletions common/utils/identifiers/fqdn.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ import (
"net"
"strings"

csmlog "github.com/dell/csmlog"
"github.com/Showmax/go-fqdn"
"github.com/dell/csi-isilon/v2/common/utils/logging"
)

// GetFQDNByIP returns the FQDN based on the parsed ip address
func GetFQDNByIP(ctx context.Context, ip string) (string, error) {
log := logging.GetRunIDLogger(ctx)
log := csmlog.GetLogger().WithContext(ctx)
names, err := net.LookupAddr(ip)
if err != nil {
log.Debugf("error getting FQDN: '%s'", err)
Expand Down
4 changes: 2 additions & 2 deletions common/utils/identifiers/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"fmt"
"regexp"

"github.com/dell/csi-isilon/v2/common/utils/logging"
csmlog "github.com/dell/csmlog"
)

const (
Expand All @@ -36,7 +36,7 @@ var NodeIDPattern = regexp.MustCompile(fmt.Sprintf("^(.+)%s(.+)%s(.+)$", NodeIDS

// ParseNodeID parses NodeID to node name, node FQDN and IP address using pattern '^(.+)=#=#=(.+)=#=#=(.+)'
func ParseNodeID(ctx context.Context, nodeID string) (string, string, string, error) {
log := logging.GetRunIDLogger(ctx)
log := csmlog.GetLogger().WithContext(ctx)

matches := NodeIDPattern.FindStringSubmatch(nodeID)

Expand Down
6 changes: 3 additions & 3 deletions common/utils/identifiers/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"fmt"
"strings"

"github.com/dell/csi-isilon/v2/common/utils/logging"
csmlog "github.com/dell/csmlog"
)

// SnapshotIDSeparator is the separator that separates snapshot id and cluster name (two components that a normalized snapshot ID is comprised of)
Expand All @@ -29,7 +29,7 @@ const SnapshotIDSeparator = "=_=_="
// GetNormalizedSnapshotID combines snapshotID ID and cluster name and access zone to form the normalized snapshot ID
// e.g. 12345 + cluster1 + accessZone => 12345=_=_=cluster1=_=_=zone1
func GetNormalizedSnapshotID(ctx context.Context, snapshotID, clusterName, accessZone string) string {
log := logging.GetRunIDLogger(ctx)
log := csmlog.GetLogger().WithContext(ctx)

snapID := fmt.Sprintf("%s%s%s%s%s", snapshotID, SnapshotIDSeparator, clusterName, SnapshotIDSeparator, accessZone)

Expand All @@ -43,7 +43,7 @@ func GetNormalizedSnapshotID(ctx context.Context, snapshotID, clusterName, acces
// e.g. 12345 => 12345, ""
// e.g. 12345=_=_=cluster1=_=_=zone => 12345, cluster1, zone
func ParseNormalizedSnapshotID(ctx context.Context, snapID string) (string, string, string, error) {
log := logging.GetRunIDLogger(ctx)
log := csmlog.GetLogger().WithContext(ctx)
tokens := strings.Split(snapID, SnapshotIDSeparator)
if len(tokens) < 1 {
return "", "", "", fmt.Errorf("snapshot ID '%s' cannot be split into tokens", snapID)
Expand Down
4 changes: 2 additions & 2 deletions common/utils/identifiers/uuid.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ limitations under the License.
package identifiers

import (
"github.com/dell/csi-isilon/v2/common/utils/logging"
csmlog "github.com/dell/csmlog"
"github.com/google/uuid"
)

// GetNewUUID generates a UUID
func GetNewUUID() (string, error) {
log := logging.GetLogger()
log := csmlog.GetLogger()
id, err := uuid.NewUUID()
if err != nil {
log.Errorf("error generating UUID : '%s'", err)
Expand Down
Loading
Loading