Skip to content

Commit

Permalink
Update privateMountDir path for unity nfs (#113)
Browse files Browse the repository at this point in the history
* change mount dir for nfs volume mount

* increase failsecs for unity test cases with retry need more time
  • Loading branch information
alikdell authored Mar 15, 2022
1 parent 117fc27 commit 53d5201
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 21 deletions.
5 changes: 3 additions & 2 deletions internal/monitor/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ package monitor

import (
"fmt"
log "github.com/sirupsen/logrus"
"os"
"strings"

log "github.com/sirupsen/logrus"
)

type drivertype interface {
Expand Down Expand Up @@ -103,7 +104,7 @@ func (d *UnityDriver) GetDriverName() string {

//GetDriverMountDir returns the Unity private mount directory.
func (d *UnityDriver) GetDriverMountDir(volumeHandle, pvName, podUUID string) string {
privateMountDir := fmt.Sprintf("/var/lib/kubelet/plugins/kubernetes.io/csi/pv/%s/mount", pvName)
privateMountDir := fmt.Sprintf("/var/lib/kubelet/pods/%s/volumes/kubernetes.io~csi/%s/mount", podUUID, pvName)
log.Debugf("privateMountDir: %s", privateMountDir)
return privateMountDir
}
Expand Down
38 changes: 19 additions & 19 deletions internal/monitor/features/integration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ Feature: Integration Test
Examples:
| kubeConfig | podsPerNode | nVol | nDev | driverType | storageClass | workers | primary | failure | failSecs | deploySecs | runSecs | nodeCleanSecs |
# Small number of pods, increasing number of vols and devs
| "" | "1-2" | "1-1" | "1-1" | "unity" | "unity-iscsi" | "one-third" | "zero" | "interfacedown" | 240 | 900 | 900 | 900 |
| "" | "1-2" | "1-1" | "1-1" | "unity" | "unity-iscsi" | "one-third" | "zero" | "interfacedown" | 600 | 900 | 900 | 900 |
# | "" | "1-2" | "2-2" | "2-2" | "unity" | "unity-iscsi" | "one-third" | "zero" | "interfacedown" | 240 | 900 | 900 | 900 |
# | "" | "1-2" | "4-4" | "4-4" | "unity" | "unity-iscsi" | "one-third" | "zero" | "interfacedown" | 240 | 900 | 900 | 900 |
# Slightly more pods, increasing number of vols and devs
# | "" | "3-5" | "1-1" | "1-1" | "unity" | "unity-iscsi" | "one-third" | "zero" | "interfacedown" | 240 | 900 | 900 | 900 |
| "" | "3-5" | "2-2" | "2-2" | "unity" | "unity-iscsi" | "one-third" | "zero" | "interfacedown" | 240 | 900 | 900 | 900 |
| "" | "3-5" | "2-2" | "2-2" | "unity" | "unity-iscsi" | "one-third" | "zero" | "interfacedown" | 600 | 900 | 900 | 900 |
# | "" | "3-5" | "4-4" | "4-4" | "unity" | "unity-iscsi" | "one-third" | "zero" | "interfacedown" | 240 | 1500 | 900 | 900 |

@unity-integration
Expand All @@ -118,12 +118,12 @@ Feature: Integration Test
Examples:
| kubeConfig | podsPerNode | nVol | nDev | driverType | storageClass | workers | primary | failure | failSecs | deploySecs | runSecs | nodeCleanSecs |
# Small number of pods, increasing number of vols and devs
| "" | "1-2" | "1-1" | "0-0" | "unity" | "unity-nfs" | "one-third" | "zero" | "interfacedown" | 240 | 900 | 900 | 900 |
| "" | "1-2" | "1-1" | "0-0" | "unity" | "unity-nfs" | "one-third" | "zero" | "interfacedown" | 600 | 900 | 900 | 900 |
# | "" | "1-2" | "2-2" | "0-0" | "unity" | "unity-nfs" | "one-third" | "zero" | "interfacedown" | 240 | 900 | 900 | 900 |
# | "" | "1-2" | "4-4" | "0-0" | "unity" | "unity-nfs" | "one-third" | "zero" | "interfacedown" | 240 | 900 | 900 | 900 |
# Slightly more pods, increasing number of vols and devs
# | "" | "3-5" | "1-1" | "0-0" | "unity" | "unity-nfs" | "one-third" | "zero" | "interfacedown" | 240 | 900 | 900 | 900 |
| "" | "3-5" | "2-2" | "0-0" | "unity" | "unity-nfs" | "one-third" | "zero" | "interfacedown" | 240 | 900 | 900 | 900 |
| "" | "3-5" | "2-2" | "0-0" | "unity" | "unity-nfs" | "one-third" | "zero" | "interfacedown" | 600 | 900 | 900 | 900 |
# | "" | "3-5" | "4-4" | "0-0" | "unity" | "unity-nfs" | "one-third" | "zero" | "interfacedown" | 240 | 1500 | 900 | 900 |

@unity-integration
Expand Down Expand Up @@ -206,13 +206,13 @@ Feature: Integration Test
# Examples:
# | kubeConfig | podsPerNode | nVol | nDev | driverType | storageClass | workers | primary | failure | failSecs | deploySecs | runSecs | nodeCleanSecs |
# # Small number of pods, increasing number of vols and devs
# | "" | "1-2" | "1-1" | "1-1" | "unity" | "unity-iscsi" | "one-third" | "zero" | "reboot" | 240 | 900 | 900 | 600 |
# | "" | "1-2" | "2-2" | "2-2" | "unity" | "unity-iscsi" | "one-third" | "zero" | "reboot" | 240 | 900 | 900 | 600 |
# | "" | "1-2" | "4-4" | "4-4" | "unity" | "unity-iscsi" | "one-third" | "zero" | "reboot" | 240 | 900 | 900 | 600 |
# | "" | "1-2" | "1-1" | "1-1" | "unity" | "unity-iscsi" | "one-third" | "zero" | "reboot" | 600 | 900 | 900 | 600 |
# | "" | "1-2" | "2-2" | "2-2" | "unity" | "unity-iscsi" | "one-third" | "zero" | "reboot" | 600 | 900 | 900 | 600 |
# | "" | "1-2" | "4-4" | "4-4" | "unity" | "unity-iscsi" | "one-third" | "zero" | "reboot" | 600 | 900 | 900 | 600 |
# # Slightly more pods, increasing number of vols and devs
# | "" | "3-5" | "1-1" | "1-1" | "unity" | "unity-iscsi" | "one-third" | "zero" | "reboot" | 240 | 1500 | 600 | 600 |
# | "" | "3-5" | "2-2" | "2-2" | "unity" | "unity-iscsi" | "one-third" | "zero" | "reboot" | 240 | 1500 | 600 | 600 |
# | "" | "3-5" | "4-4" | "4-4" | "unity" | "unity-iscsi" | "one-third" | "zero" | "reboot" | 240 | 1500 | 600 | 600 |
# | "" | "3-5" | "1-1" | "1-1" | "unity" | "unity-iscsi" | "one-third" | "zero" | "reboot" | 600 | 1500 | 600 | 600 |
# | "" | "3-5" | "2-2" | "2-2" | "unity" | "unity-iscsi" | "one-third" | "zero" | "reboot" | 600 | 1500 | 600 | 600 |
# | "" | "3-5" | "4-4" | "4-4" | "unity" | "unity-iscsi" | "one-third" | "zero" | "reboot" | 600 | 1500 | 600 | 600 |

# @unity-integration
# Scenario Outline: Basic node failover testing using test StatefulSet pods (node slow reboots)
Expand All @@ -230,13 +230,13 @@ Feature: Integration Test
# Examples:
# | kubeConfig | podsPerNode | nVol | nDev | driverType | storageClass | workers | primary | failure | failSecs | deploySecs | runSecs | nodeCleanSecs |
# # Small number of pods, increasing number of vols and devs
# | "" | "1-2" | "1-1" | "0-0" | "unity" | "unity-nfs" | "one-third" | "zero" | "reboot" | 120 | 900 | 900 | 600 |
# | "" | "1-2" | "2-2" | "0-0" | "unity" | "unity-nfs" | "one-third" | "zero" | "reboot" | 120 | 900 | 900 | 600 |
# | "" | "1-2" | "4-4" | "0-0" | "unity" | "unity-nfs" | "one-third" | "zero" | "reboot" | 120 | 900 | 900 | 600 |
# | "" | "1-2" | "1-1" | "0-0" | "unity" | "unity-nfs" | "one-third" | "zero" | "reboot" | 600 | 900 | 900 | 600 |
# | "" | "1-2" | "2-2" | "0-0" | "unity" | "unity-nfs" | "one-third" | "zero" | "reboot" | 600 | 900 | 900 | 600 |
# | "" | "1-2" | "4-4" | "0-0" | "unity" | "unity-nfs" | "one-third" | "zero" | "reboot" | 600 | 900 | 900 | 600 |
# # Slightly more pods, increasing number of vols and devs
# | "" | "3-5" | "1-1" | "0-0" | "unity" | "unity-nfs" | "one-third" | "zero" | "reboot" | 240 | 1500 | 900 | 900 |
# | "" | "3-5" | "2-2" | "0-0" | "unity" | "unity-nfs" | "one-third" | "zero" | "reboot" | 240 | 1500 | 900 | 900 |
# | "" | "3-5" | "4-4" | "0-0" | "unity" | "unity-nfs" | "one-third" | "zero" | "reboot" | 240 | 1500 | 900 | 900 |
# | "" | "3-5" | "1-1" | "0-0" | "unity" | "unity-nfs" | "one-third" | "zero" | "reboot" | 600 | 1500 | 900 | 900 |
# | "" | "3-5" | "2-2" | "0-0" | "unity" | "unity-nfs" | "one-third" | "zero" | "reboot" | 600 | 1500 | 900 | 900 |
# | "" | "3-5" | "4-4" | "0-0" | "unity" | "unity-nfs" | "one-third" | "zero" | "reboot" | 600 | 1500 | 900 | 900 |


@powerflex-integration
Expand Down Expand Up @@ -272,7 +272,7 @@ Feature: Integration Test
Then finally cleanup everything
Examples:
| kubeConfig | podsPerNode | nVol | nDev | driverType | storageClass | workers | primary | failure | failSecs | deploySecs | nodeCleanSecs |
| "" | "1-2" | "1-1" | "1-1" | "unity" | "unity-iscsi" | "one-third" | "zero" | "interfacedown" | 240 | 900 | 900 |
| "" | "1-2" | "1-1" | "1-1" | "unity" | "unity-iscsi" | "one-third" | "zero" | "interfacedown" | 600 | 900 | 900 |
# | "" | "1-2" | "1-1" | "1-1" | "unity" | "unity-iscsi" | "one-third" | "zero" | "reboot" | 240 | 900 | 900 |

@unity-integration
Expand All @@ -290,7 +290,7 @@ Feature: Integration Test
Then finally cleanup everything
Examples:
| kubeConfig | podsPerNode | nVol | nDev | driverType | storageClass | workers | primary | failure | failSecs | deploySecs | nodeCleanSecs |
| "" | "1-2" | "1-1" | "0-0" | "unity" | "unity-nfs" | "one-third" | "zero" | "interfacedown" | 240 | 900 | 900 |
| "" | "1-2" | "1-1" | "0-0" | "unity" | "unity-nfs" | "one-third" | "zero" | "interfacedown" | 600 | 900 | 900 |
# | "" | "1-2" | "1-1" | "0-0" | "unity" | "unity-nfs" | "one-third" | "zero" | "reboot" | 240 | 900 | 900 |

@powerflex-integration
Expand Down Expand Up @@ -345,7 +345,7 @@ Feature: Integration Test

Examples:
| kubeConfig | podsPerNode | nVol | nDev | driverType | storageClass | workers | primary | failure | failSecs | deploySecs | runSecs | nodeCleanSecs |
| "" | "1-1" | "1-1" | "1-1" | "unity" | "unity-iscsi" | "one-third" | "zero" | "interfacedown" | 240 | 900 | 900 | 900 |
| "" | "1-1" | "1-1" | "1-1" | "unity" | "unity-iscsi" | "one-third" | "zero" | "interfacedown" | 600 | 900 | 900 | 900 |
# | "" | "1-1" | "1-1" | "1-1" | "unity" | "unity-iscsi" | "one-third" | "zero" | "reboot" | 240 | 900 | 900 | 900 |

# @unity-integration
Expand Down
4 changes: 4 additions & 0 deletions internal/monitor/integration_steps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,13 @@ func (i *integration) deployPods(protected bool, podsPerNode, numVols, numDevs,

// Select the deployment script to use based on the driver type.
var deployScript string
cleanUpWait := 1 * time.Second
switch driverType {
case "vxflexos":
deployScript = "insv.sh"
case "unity":
deployScript = "insu.sh"
cleanUpWait = 120 * time.Second
}

// Set test namespace prefix is based on the driver type.
Expand Down Expand Up @@ -429,6 +431,8 @@ func (i *integration) deployPods(protected bool, podsPerNode, numVols, numDevs,
command.Stdout = os.Stdout
command.Stderr = os.Stderr

// For consecutive run provide Unity array some cleanup times
time.Sleep(cleanUpWait)
log.Infof("Attempting to deploy with command: %v", command)
err = command.Start()
if err != nil {
Expand Down

0 comments on commit 53d5201

Please sign in to comment.