Skip to content
Open
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
1 change: 1 addition & 0 deletions docs/manila-csi-plugin/using-manila-csi-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Parameter | Required | Description
----------|----------|------------
`shareID` | if `shareName` is not given | The UUID of the share
`shareName` | if `shareID` is not given | The name of the share
`shareAccessID` | _no_ | The UUID of the access rule for the share. This parameter is being deprecated and replaced by `shareAccessIDs`.
`shareAccessIDs` | _yes_ | Comma separated UUIDs of access rules for the share
`cephfs-mounter` | _no_ | Relevant for CephFS Manila shares. Specifies which mounting method to use with the CSI CephFS driver. Available options are `kernel` and `fuse`, defaults to `fuse`. See [CSI CephFS docs](https://github.com/ceph/ceph-csi/blob/csi-v1.0/docs/deploy-cephfs.md#configuration) for further information.
`cephfs-kernelMountOptions` | _no_ | Relevant for CephFS Manila shares. Specifies mount options for CephFS kernel client. See [CSI CephFS docs](https://github.com/ceph/ceph-csi/blob/csi-v1.0/docs/deploy-cephfs.md#configuration) for further information.
Expand Down
20 changes: 10 additions & 10 deletions tests/e2e/cloudprovider/test-lb-service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function _check_lb_tags {
local tags=$3

if [ -z "$tags" ]; then
tags=$(openstack loadbalancer show $lbID -f value -c tags)
tags=$(openstack loadbalancer show $lbID -f json -c tags | jq -r '.tags[]')
tags=$(echo $tags)
fi
if [[ ! "$tags" =~ (^|[[:space:]])kube_service_(.+?)$svcName($|[[:space:]]) ]]; then
Expand Down Expand Up @@ -468,7 +468,7 @@ EOF
lbID=$(_check_service_lb_annotation "${service1}")

printf "\n>>>>>>> Validating tags of openstack load balancer %s \n" "$lbID"
tags=$(openstack loadbalancer show $lbID -f value -c tags)
tags=$(openstack loadbalancer show $lbID -f json -c tags | jq -r '.tags[]')
tags=$(echo $tags)
_check_lb_tags $lbID $service1 "$tags"
if [ $? -ne 0 ]; then
Expand Down Expand Up @@ -509,7 +509,7 @@ EOF
fi

printf "\n>>>>>>> Validating tags of openstack load balancer %s \n" "$lbID"
tags=$(openstack loadbalancer show $lbID -f value -c tags)
tags=$(openstack loadbalancer show $lbID -f json -c tags | jq -r '.tags[]')
tags=$(echo $tags)
_check_lb_tags $lbID $service1 "$tags"
if [ $? -ne 0 ]; then
Expand Down Expand Up @@ -560,7 +560,7 @@ EOF
wait_for_loadbalancer $lbID

printf "\n>>>>>>> Validating tags of openstack load balancer %s \n" "$lbID"
tags=$(openstack loadbalancer show $lbID -f value -c tags)
tags=$(openstack loadbalancer show $lbID -f json -c tags | jq -r '.tags[]')
tags=$(echo $tags)
_check_lb_tags $lbID $service1 "$tags"
if [ $? -ne 0 ]; then
Expand Down Expand Up @@ -605,7 +605,7 @@ EOF
wait_for_service_address ${service3}

printf "\n>>>>>>> Validating tags of openstack load balancer %s \n" "$lbID"
tags=$(openstack loadbalancer show $lbID -f value -c tags)
tags=$(openstack loadbalancer show $lbID -f json -c tags | jq -r '.tags[]')
tags=$(echo $tags)
_check_lb_tags $lbID $service3 "$tags"
if [ $? -ne 0 ]; then
Expand Down Expand Up @@ -637,7 +637,7 @@ EOF
sleep 10

printf "\n>>>>>>> Validating tags of openstack load balancer %s \n" "$lbID"
tags=$(openstack loadbalancer show $lbID -f value -c tags)
tags=$(openstack loadbalancer show $lbID -f json -c tags | jq -r '.tags[]')
tags=$(echo $tags)
_check_lb_tags $lbID $service1 "$tags"
if [ $? -ne 0 ]; then
Expand All @@ -660,7 +660,7 @@ EOF
sleep 5

printf "\n>>>>>>> Validating tags of openstack load balancer %s \n" "$lbID"
tags=$(openstack loadbalancer show $lbID -f value -c tags)
tags=$(openstack loadbalancer show $lbID -f json -c tags | jq -r '.tags[]')
tags=$(echo $tags)
_check_lb_tags $lbID $service1 "$tags"
if [ $? -ne 0 ]; then
Expand All @@ -680,7 +680,7 @@ EOF
wait_for_loadbalancer $lbID

printf "\n>>>>>>> Validating tags of openstack load balancer %s \n" "$lbID"
tags=$(openstack loadbalancer show $lbID -f value -c tags)
tags=$(openstack loadbalancer show $lbID -f json -c tags | jq -r '.tags[]')
tags=$(echo $tags)
_check_lb_tags $lbID $service1 "$tags"
if [ $? -eq 0 ]; then
Expand Down Expand Up @@ -778,7 +778,7 @@ EOF
lbID=$(_check_service_lb_annotation "${service1}")

printf "\n>>>>>>> Validating tags of openstack load balancer %s \n" "$lbID"
tags=$(openstack loadbalancer show $lbID -f value -c tags)
tags=$(openstack loadbalancer show $lbID -f json -c tags | jq -r '.tags[]')
tags=$(echo $tags)
_check_lb_tags $lbID $service1 "$tags"
if [ $? -ne 0 ]; then
Expand All @@ -792,7 +792,7 @@ EOF
wait_for_service_deleted ${service1}

printf "\n>>>>>>> Validating tags of openstack load balancer %s \n" "$lbID"
tags=$(openstack loadbalancer show $lbID -f value -c tags)
tags=$(openstack loadbalancer show $lbID -f json -c tags | jq -r '.tags[]')
tags=$(echo $tags)
_check_lb_tags $lbID $service1 "$tags"
if [ $? -eq 0 ]; then
Expand Down
19 changes: 15 additions & 4 deletions tests/e2e/csi/manila/manilavolume.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package test
import (
"bytes"
"context"
"os"
"os/exec"
"strconv"
"strings"
Expand All @@ -13,6 +14,10 @@ import (
storageframework "k8s.io/kubernetes/test/e2e/storage/framework"
)

// Environment variable for DHSS=True mode share network.
// This must match the variable in testdriver.go.
var manilaShareNetworkIDForVolume = os.Getenv("MANILA_SHARE_NETWORK_ID")

func runCmd(name string, args ...string) ([]byte, error) {
var stdout, stderr bytes.Buffer
cmd := exec.Command(name, args...)
Expand Down Expand Up @@ -47,9 +52,8 @@ func manilaCreateVolume(
ginkgo.By("Creating a test Manila volume externally")

// Create share.

out, err := runCmd(
"openstack",
// Build command arguments, optionally including share network for DHSS=True mode.
args := []string{
"share",
"create",
shareProto,
Expand All @@ -58,7 +62,14 @@ func manilaCreateVolume(
"--format=value",
"--column=id",
"--wait",
)
}

// Support for DHSS=True mode: include share network ID if specified
if manilaShareNetworkIDForVolume != "" {
args = append(args, "--share-network="+manilaShareNetworkIDForVolume)
}

out, err := runCmd("openstack", args...)

shareID := strings.TrimSpace(string(out))

Expand Down
12 changes: 12 additions & 0 deletions tests/e2e/csi/manila/testdriver.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package test
import (
"context"
"fmt"
"os"

"github.com/onsi/gomega"
v1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -30,6 +31,12 @@ const (
manilaShareSizeGiB = 1
)

// Environment variables for DHSS=True (driver_handles_share_servers) mode.
// Set MANILA_SHARE_NETWORK_ID to enable testing with share networks.
var (
manilaShareNetworkID = os.Getenv("MANILA_SHARE_NETWORK_ID")
)

type manilaTestDriver struct {
driverInfo storageframework.DriverInfo
volumeAttributes []map[string]string
Expand Down Expand Up @@ -129,6 +136,11 @@ func (d *manilaTestDriver) GetDynamicProvisionStorageClass(ctx context.Context,
"csi.storage.k8s.io/node-publish-secret-namespace": manilaSecretNamespace,
}

// Support for DHSS=True mode: include share network ID if specified
if manilaShareNetworkID != "" {
parameters["shareNetworkID"] = manilaShareNetworkID
}

sc := storageframework.GetStorageClass(
d.driverInfo.Name,
parameters,
Expand Down
2 changes: 1 addition & 1 deletion tests/playbooks/roles/install-devstack/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
user: "stack"
workdir: "/home/{{ user }}/devstack"
branch: "stable/2025.1"
branch: "stable/2025.2"
enable_services:
- nova
- glance
Expand Down
29 changes: 26 additions & 3 deletions tests/playbooks/roles/install-k3s/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,39 @@
retries: 100
delay: 5

- name: Prepare kubectl and kubeconfig file
- name: Prepare kubeconfig file
shell:
executable: /bin/bash
cmd: |
set -ex

mkdir -p {{ ansible_user_dir }}/.kube
scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i {{ ansible_user_dir }}/.ssh/id_rsa ubuntu@{{ k3s_fip }}:/etc/rancher/k3s/k3s.yaml {{ ansible_user_dir }}/.kube/config
curl -sLO# https://dl.k8s.io/release/$(curl -Ls https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x ./kubectl; sudo mv ./kubectl /usr/local/bin/kubectl

- name: Get latest kubectl version
uri:
url: https://dl.k8s.io/release/stable.txt
return_content: yes
register: kubectl_version
retries: 5
delay: 10
until: kubectl_version.status == 200

- name: Download kubectl binary
get_url:
url: "https://dl.k8s.io/release/{{ kubectl_version.content | trim }}/bin/linux/amd64/kubectl"
dest: /usr/local/bin/kubectl
mode: '0755'
become: true
retries: 5
delay: 10

- name: Set kubectl cluster config
shell:
executable: /bin/bash
cmd: |
set -ex

kubectl config set-cluster default --server=https://{{ k3s_fip }}:6443 --kubeconfig {{ ansible_user_dir }}/.kube/config

- name: Wait for k8s node ready
Expand Down