Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArchiveServiceLogs ¶ added in v1.2.1
func ArchiveServiceLogs(cs *kubernetes.Clientset, reportPath string)
ArchiveServiceLogs collects the logs on the node and controller service pods and writes them in the specified report path. Logs will be collected from beegfs and csi-provisioner containers. This should typically be called after the test suite completes.
func VerifyDirectoryModeUidGidInPod ¶
func VerifyDirectoryModeUidGidInPod(f *e2eframework.Framework, directory, expectedMode, expectedUid, expectedGid string, pod *corev1.Pod)
VerifyDirectoryModeUidGidInPod verifies expected mode, UID, and GID of the target directory This implementation is similar to [`VerifyFilePathGidInPod`](https://github.com/kubernetes/kubernetes/blob/v1.21.0/test/e2e/storage/utils/utils.go#L709).
func VerifyNoOrphanedMounts ¶ added in v1.2.1
func VerifyNoOrphanedMounts(cs *kubernetes.Clientset)
VerifyNoOrphanedMounts uses SSH to access all cluster nodes and verify that none of them have a BeeGFS file system mounted as a PersistentVolume. VerifyNoOrphanedMounts could be used within a single test case, but mounts are orphaned intermittently and it would be unlikely to catch an orphan mount without including an extremely long stress test within the case. It is currently preferred to use VerifyNoOrphanedMounts before and after an entire suite of tests runs to ensure none of the tests within the suite causes a mount to be orphaned.
Types ¶
type FSExec ¶
type FSExec struct {
Resource *storageframework.VolumeResource // Export for easy inspection.
// contains filtered or unexported fields
}
FSExec makes it easy to execute commands on a node that has a BeeGFS file system mounted. FSExec handles creating a volume resource, creating a pod to mount it, and tracking the node that has it mounted. This frees the caller to worry only about what command to execute.
func NewFSExec ¶
func NewFSExec(cfg *storageframework.PerTestConfig, driver *driver.BeegfsDriver, sizeRange e2evolume.SizeRange) FSExec
NewFSExec initializes an FSExec.
func (*FSExec) IssueCommandWithBeegfsPaths ¶
func (e *FSExec) IssueCommandWithBeegfsPaths(cmdFmtString string, beegfsPaths ...string) (string, error)
IssueCommandWithBeegfsPaths takes a format string (like the ones passed to fmt.Printf, fmt.Sprintf, etc.) and any number of BeeGFS relative paths. It converts the relative paths to absolute paths on the host that will execute a command.
func (*FSExec) IssueCommandWithResult ¶
IssueCommandWithResult works exactly like hostExec.IssueCommandWithResult, except that it identifies the correct node (the one with our BeeGFS file system mounted) on which to execute the passed command automatically.