Skip to content

Commit e274c83

Browse files
Merge release v0.1.21
Release v0.1.21
2 parents 2b597dd + d81a7cb commit e274c83

11 files changed

Lines changed: 454 additions & 108 deletions

File tree

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ dm:
5959
container:
6060
${GINKGO_RUN} --label-filter='container' .
6161

62+
# Run gfs2 fence test
63+
.PHONY: gfs2_fence
64+
gfs2_fence:
65+
${GINKGO_RUN} --label-filter='gfs2_fence' .
66+
6267
.PHONY: .version
6368
.version: ## Uses the git-version-gen script to generate a tag version
6469
./git-version-gen --fallback `git rev-parse HEAD` > .version

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ module github.com/NearNodeFlash/nnf-integration-test
33
go 1.23.9
44

55
require (
6-
github.com/DataWorkflowServices/dws v0.0.1-0.20250826235427-3ba3755ecbb4
7-
github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20250827135601-4d150db05d08
8-
github.com/NearNodeFlash/nnf-ec v0.0.1-0.20250902204910-828ccfe450c3 // indirect
9-
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20250910191707-694eda76a3d0
6+
github.com/DataWorkflowServices/dws v0.0.1-0.20251201192617-99a03aa3170f
7+
github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20251210162744-b3f481b47161
8+
github.com/NearNodeFlash/nnf-ec v0.0.1-0.20251021182141-d22098d70c26 // indirect
9+
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20251210164542-0745ce4c3473
1010
github.com/onsi/ginkgo/v2 v2.22.2
1111
github.com/onsi/gomega v1.36.2
1212
go.openly.dev/pointy v1.3.0

go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
github.com/DataWorkflowServices/dws v0.0.1-0.20250826235427-3ba3755ecbb4 h1:c5bKT/hZUHzgx4HxiFMGoxEFDXPv/qlFmLwDTbJAA00=
2-
github.com/DataWorkflowServices/dws v0.0.1-0.20250826235427-3ba3755ecbb4/go.mod h1:NbNOIG2ybY2XHVSJn0KF7edPlX3I1ji7je6MGzuPeaA=
3-
github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20250827135601-4d150db05d08 h1:1IYv2gDH/+hxBo6TZenIRs30PSpzO49USDkj/aBo/g4=
4-
github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20250827135601-4d150db05d08/go.mod h1:1lpNL1ZYtVwDU6Fuju5u/xiza6Z2Ua8KWZeaGBKpn5o=
5-
github.com/NearNodeFlash/nnf-ec v0.0.1-0.20250902204910-828ccfe450c3 h1:CAJW97TU2fzzECwbwgmYkYe0kzvkZccXg6f8Ukom8Ws=
6-
github.com/NearNodeFlash/nnf-ec v0.0.1-0.20250902204910-828ccfe450c3/go.mod h1:slDsqUJtN2uZ5Z7z4J6wWrtKksQAaH4JqRzUonDXNKo=
7-
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20250910191707-694eda76a3d0 h1:IPvOz9ZYP4XTmofIlSiuw3L0d6UxFbrFZ51fLNEkf5g=
8-
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20250910191707-694eda76a3d0/go.mod h1:wT5lUEvqLjpPGGbuyWmJYhThvTDkJM4Rqe22DrT7zdw=
1+
github.com/DataWorkflowServices/dws v0.0.1-0.20251201192617-99a03aa3170f h1:ezj0+9HY6VvPnJbDoIXr/IzwBFe1X2pLLEZpHodOulU=
2+
github.com/DataWorkflowServices/dws v0.0.1-0.20251201192617-99a03aa3170f/go.mod h1:NbNOIG2ybY2XHVSJn0KF7edPlX3I1ji7je6MGzuPeaA=
3+
github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20251210162744-b3f481b47161 h1:7NCIXYOp8jW/OS3KQg27+xw5DikxoHJRYRLWiT6fQ8I=
4+
github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20251210162744-b3f481b47161/go.mod h1:4QNBl5vMm4dFW49oqXa/1NzIjgt8EJKuAixmeoIVLCU=
5+
github.com/NearNodeFlash/nnf-ec v0.0.1-0.20251021182141-d22098d70c26 h1:CHEvLPUEZDj0Z1hn0kXB//mHKh2eQ2EP/mMjy4zB9+g=
6+
github.com/NearNodeFlash/nnf-ec v0.0.1-0.20251021182141-d22098d70c26/go.mod h1:slDsqUJtN2uZ5Z7z4J6wWrtKksQAaH4JqRzUonDXNKo=
7+
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20251210164542-0745ce4c3473 h1:VgFA+7Tklv0TNjkdcNtCRJspheNaP3wxMxjCMgKtOX4=
8+
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20251210164542-0745ce4c3473/go.mod h1:6EQR4F5Wscxpy4ekZOdu9+xfkfuvrD1ZeM6Z+zi/gdA=
99
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
1010
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
1111
github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=

int_test.go

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,15 @@ package test
2121

2222
import (
2323
"fmt"
24+
"time"
2425

2526
. "github.com/NearNodeFlash/nnf-integration-test/internal"
2627

2728
. "github.com/onsi/ginkgo/v2"
2829
. "github.com/onsi/gomega"
2930
"go.openly.dev/pointy"
3031

31-
dwsv1alpha6 "github.com/DataWorkflowServices/dws/api/v1alpha6"
32+
dwsv1alpha7 "github.com/DataWorkflowServices/dws/api/v1alpha7"
3233
)
3334

3435
var (
@@ -41,9 +42,9 @@ var (
4142
highTimeout = "5m"
4243

4344
// Which states use the high timeout
44-
highTimeoutStates = []dwsv1alpha6.WorkflowState{
45-
dwsv1alpha6.StateSetup,
46-
dwsv1alpha6.StateTeardown,
45+
highTimeoutStates = []dwsv1alpha7.WorkflowState{
46+
dwsv1alpha7.StateSetup,
47+
dwsv1alpha7.StateTeardown,
4748
}
4849
)
4950

@@ -56,8 +57,12 @@ var tests = []*T{
5657
// Mark a test case as Pending(). Ginkgo will not run any tests that have the Pending decorator
5758
// MakeTest("Pending", "#DW ...").Pending()
5859
//
59-
// Mark a test case so it will stop after the workflow achieves the desired state of PreRun
60-
// MakeTest("Stop After", "#DW ...").StopAfter(wsv1alpha1.StatePreRun),
60+
// Mark a test case, so it will stop after the workflow achieves the desired state of PreRun
61+
// MakeTest("Stop After", "#DW ...").StopAfter(dwsv1alpha7.StatePreRun),
62+
//
63+
// Mark a test case, so it delays for the specified period after a workflow achieves the desired state
64+
// Multiple delays can be added by calling DelayInState multiple times.
65+
// MakeTest("Delay In State", "#DW ...").DelayInState(dwsv1alpha7.StateDataIn, 2*time.Minute).DelayInState(dwsv1alpha7.StateDataOut, 2*time.Minute),
6166
//
6267
// Duplicate a test case 20 times.
6368
// DuplicateTest(
@@ -73,13 +78,24 @@ var tests = []*T{
7378
// External Computes
7479
MakeTest("Lustre External", "#DW jobdw type=lustre name=lustre capacity=50GB").WithExternalComputes().WithLabels(ExternalLustre),
7580

81+
// GFS2 Fence
82+
MakeTest("GFS2 Fence", "#DW jobdw type=gfs2 name=gfs2-fence capacity=50GB").WithLabels(GFS2Fence).
83+
DelayInState(dwsv1alpha7.StateDataIn, 15*time.Second). // start pacemaker
84+
DelayInState(dwsv1alpha7.StatePreRun, 60*time.Second). // fence node(s)
85+
DelayInState(dwsv1alpha7.StateDataOut, 15*time.Second), // stop pacemaker on surviving node(s)
86+
7687
// Storage Profiles
7788
MakeTest("XFS with Storage Profile",
7889
"#DW jobdw type=xfs name=xfs-storage-profile capacity=50GB profile=my-xfs-storage-profile").
7990
WithStorageProfile(),
8091
MakeTest("GFS2 with Storage Profile",
8192
"#DW jobdw type=gfs2 name=gfs2-storage-profile capacity=50GB profile=my-gfs2-storage-profile").
8293
WithStorageProfile(),
94+
// WithStorageProfile().DelayInState(dwsv1alpha7.StateDataIn, 15*time.Second).DelayInState(dwsv1alpha7.StateDataOut, 15*time.Second).Focused(), // Useful for debugging
95+
// WithStorageProfile().DelayInState(dwsv1alpha7.StateDataIn, 15*time.Second).StopAfter(dwsv1alpha7.StatePreRun).Focused(),
96+
MakeTest("XFS with Storage Profile and LV Create",
97+
"#DW jobdw type=xfs name=xfs-storage-profile capacity=14TB profile=my-xfs-storage-profile").
98+
WithStorageProfileLvCreate("--zero n --activate y --type raid5 --nosync --extents $PERCENT_VG --stripes $DEVICE_NUM-1 --stripesize=64KiB --name $LV_NAME $VG_NAME"),
8399

84100
// Persistent
85101
MakeTest("Persistent Lustre",
@@ -143,17 +159,17 @@ var tests = []*T{
143159
"#DW container name=prerun-timeout-mpi profile=example-mpi-prerun-timeout").
144160
WithPermissions(1050, 1051).WithLabels("mpi", "timeout").
145161
WithContainerProfile("example-mpi", &ContainerProfileOptions{PrerunTimeoutSeconds: pointy.Int(1), NoStorage: true}).
146-
ExpectError(dwsv1alpha6.StatePreRun),
162+
ExpectError(dwsv1alpha7.StatePreRun),
147163
MakeTest("PostRun timeout on MPI containers",
148164
"#DW container name=postrun-timeout-mpi profile=example-mpi-postrun-timeout").
149165
WithPermissions(1050, 1051).WithLabels("mpi", "timeout").
150166
WithContainerProfile("example-mpi-webserver", &ContainerProfileOptions{PostrunTimeoutSeconds: pointy.Int(1), NoStorage: true}).
151-
ExpectError(dwsv1alpha6.StatePostRun),
167+
ExpectError(dwsv1alpha7.StatePostRun),
152168
MakeTest("Non-zero exit on MPI containers",
153169
"#DW container name=mpi-container-fail profile=example-mpi-fail-noretry").
154170
WithPermissions(1050, 1051).WithLabels("mpi", "fail").
155171
WithContainerProfile("example-mpi-fail", &ContainerProfileOptions{RetryLimit: pointy.Int(0)}).
156-
ExpectError(dwsv1alpha6.StatePostRun),
172+
ExpectError(dwsv1alpha7.StatePostRun),
157173

158174
// Containers - Non-MPI
159175
MakeTest("GFS2 with Containers",
@@ -175,27 +191,27 @@ var tests = []*T{
175191
"#DW container name=prerun-timeout profile=example-prerun-timeout").
176192
WithPermissions(1050, 1051).WithLabels("non-mpi", "timeout").
177193
WithContainerProfile("example-forever", &ContainerProfileOptions{PrerunTimeoutSeconds: pointy.Int(1), NoStorage: true}).
178-
ExpectError(dwsv1alpha6.StatePreRun),
194+
ExpectError(dwsv1alpha7.StatePreRun),
179195
MakeTest("PostRun timeout on non-MPI containers",
180196
"#DW container name=postrun-timeout profile=example-postrun-timeout").
181197
WithPermissions(1050, 1051).WithLabels("non-mpi", "timeout").
182198
WithContainerProfile("example-forever", &ContainerProfileOptions{PostrunTimeoutSeconds: pointy.Int(1), NoStorage: true}).
183-
ExpectError(dwsv1alpha6.StatePostRun),
199+
ExpectError(dwsv1alpha7.StatePostRun),
184200
MakeTest("Non-zero exit on non-MPI containers",
185201
"#DW container name=container-fail profile=example-fail-noretry").
186202
WithPermissions(1050, 1051).WithLabels("non-mpi", "fail").
187203
WithContainerProfile("example-fail", &ContainerProfileOptions{RetryLimit: pointy.Int(0)}).
188-
ExpectError(dwsv1alpha6.StatePostRun),
204+
ExpectError(dwsv1alpha7.StatePostRun),
189205

190206
// Containers - Unsupported Filesystems. These should fail as xfs/raw filesystems are not supported for containers.
191207
MakeTest("XFS with Containers",
192208
"#DW jobdw type=xfs name=xfs-with-containers capacity=100GB",
193209
"#DW container name=xfs-with-containers profile=example-success DW_JOB_foo_local_storage=xfs-with-containers").
194-
ExpectError(dwsv1alpha6.StateProposal).WithLabels("unsupported-fs"),
210+
ExpectError(dwsv1alpha7.StateProposal).WithLabels("unsupported-fs"),
195211
MakeTest("Raw with Containers",
196212
"#DW jobdw type=raw name=raw-with-containers capacity=100GB",
197213
"#DW container name=raw-with-containers profile=example-success DW_JOB_foo_local_storage=raw-with-containers").
198-
ExpectError(dwsv1alpha6.StateProposal).WithLabels("unsupported-fs"),
214+
ExpectError(dwsv1alpha7.StateProposal).WithLabels("unsupported-fs"),
199215

200216
// Containers - Multiple Storages
201217
MakeTest("GFS2 and Lustre with Containers",
@@ -250,7 +266,7 @@ var _ = Describe("NNF Integration Test", func() {
250266
// TODO: Ginkgo's `--fail-fast` option still seems to execute DeferCleanup() calls
251267
// See if this is by design or if we might need to move this to an AfterEach()
252268
if !context.SpecReport().Failed() {
253-
t.AdvanceStateAndWaitForReady(ctx, k8sClient, workflow, dwsv1alpha6.StateTeardown)
269+
t.AdvanceStateAndWaitForReady(ctx, k8sClient, workflow, dwsv1alpha7.StateTeardown)
254270

255271
Expect(k8sClient.Delete(ctx, workflow)).To(Succeed())
256272
}

internal/internal.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3030
"k8s.io/apimachinery/pkg/util/intstr"
3131

32-
dwsv1alpha6 "github.com/DataWorkflowServices/dws/api/v1alpha6"
32+
dwsv1alpha7 "github.com/DataWorkflowServices/dws/api/v1alpha7"
3333
"github.com/DataWorkflowServices/dws/utils/dwdparse"
3434
)
3535

@@ -68,7 +68,7 @@ type T struct {
6868
decorators []interface{}
6969

7070
// Workflow defines the DWS Workflow resource that is the target of the test.
71-
workflow *dwsv1alpha6.Workflow
71+
workflow *dwsv1alpha7.Workflow
7272

7373
// User Id to use for the workflow
7474
userId int
@@ -84,7 +84,7 @@ type T struct {
8484
helperPods []*corev1.Pod
8585

8686
// Compute nodes that were assigned to the test. This is determined at test runtime.
87-
computes *dwsv1alpha6.Computes
87+
computes *dwsv1alpha7.Computes
8888
}
8989

9090
func MakeTest(name string, directives ...string) *T {
@@ -118,13 +118,13 @@ func MakeTest(name string, directives ...string) *T {
118118
t.directives = []string{}
119119
}
120120

121-
t.workflow = &dwsv1alpha6.Workflow{
121+
t.workflow = &dwsv1alpha7.Workflow{
122122
ObjectMeta: metav1.ObjectMeta{
123123
Name: t.WorkflowName(),
124124
Namespace: corev1.NamespaceDefault,
125125
},
126-
Spec: dwsv1alpha6.WorkflowSpec{
127-
DesiredState: dwsv1alpha6.StateProposal,
126+
Spec: dwsv1alpha7.WorkflowSpec{
127+
DesiredState: dwsv1alpha7.StateProposal,
128128
DWDirectives: t.WorkflowDirectives(),
129129
JobID: intstr.FromInt(GinkgoParallelProcess()),
130130
WLMID: strconv.Itoa(GinkgoParallelProcess()),
@@ -145,14 +145,15 @@ func (t *T) WorkflowDirectives() []string {
145145
return t.directives
146146
}
147147

148-
func (t *T) Workflow() *dwsv1alpha6.Workflow {
148+
func (t *T) Workflow() *dwsv1alpha7.Workflow {
149149
return t.workflow
150150
}
151151

152152
// To apply a set of labels for a particular test, use the withLables() method. Labels
153153
const (
154154
Simple = "simple"
155155
ExternalLustre = "external_lustre"
156+
GFS2Fence = "gfs2_fence"
156157
)
157158

158159
func (t *T) WithLabels(labels ...string) *T { t.labels = append(t.labels, labels...); return t }

0 commit comments

Comments
 (0)