6 Commits

Author SHA1 Message Date
James Rasell
6c39285538 e2e: Ensure test resources are cleaned. (#25611)
I couldn't find any reason the exec2 HTTP jobs were not being run
with a generated cleanup function, so I added this.

The deletion of the DHV ACL policy does not seem like it would
have any negative impact.
2025-04-07 14:15:29 +01:00
Tim Gross
3b9290a11e E2E: fix column parsing for dynamic host volumes test (#25228)
In #25185 we changed the output of `volume status` to include both DHV and CSI
volumes by default. When the E2E test parses the output, it's not expecting the
new section header.

Ref: https://github.com/hashicorp/nomad/pull/25185
2025-02-26 09:52:47 -05:00
Tim Gross
a11325863e E2E: dynamic host volumes (#25063)
I merged #24869 having forgotten we don't run these tests in PR CI, so there's a compile error in the test. Fix that error and add the no-op import we use to catch this kind of thing.

Ref: https://github.com/hashicorp/nomad/pull/24869
2025-02-07 16:27:36 -05:00
Tim Gross
3f2d4000a6 E2E: dynamic host volume tests for sticky volumes (#24869)
Add tests for dynamic host volumes where the claiming jobs have `volume.sticky =
true`. Includes a test for forced rescheduling and a test for node drain.

This changeset includes a new `e2e/v3`-style package for creating dynamic host
volumes, so we can reuse that across other tests.
2025-02-07 15:50:54 -05:00
Tim Gross
6ea40cbfb2 E2E: dynamic host volumes test reliability (#24854)
The nightly runs for E2E have been failing the recently added dynamic host
volumes tests for a number of reasons:

* Adding timing logs to the tests shows that it can take over 5s (the original
  test timeout) for the client fingerprint to show up on the client. This seems
  like a lot but seems to be host-dependent because it's much faster locally.
  Extend the timeout and leave in the timing logs so that we can keep an eye on
  this problem in the future.

* The register test doesn't wait for the dispatched job to complete, and the
  dispatched job was actually broken when TLS was in use because we weren't using
  the Task API socket. Fix the jobspec for the dispatched job and add waiting
  for the dispatched allocation to be marked complete before checking for the
  volume on the server.

I've also change both the mounter jobs to batch workloads, so that we don't have
to wait 10s for the deployment to complete.
2025-01-14 12:26:31 -05:00
Tim Gross
997358d855 E2E: dynamic host volumes workflows (#24816)
Initial end-to-end tests for dynamic host volumes. This includes tests for two
workflows:

* One where a dynamic host volume is created by a plugin and then mounted by a job.
* Another where a dynamic host volume is created out-of-band and registered by a
  job, then mounted by another job.

This changeset also moves the existing `volumes` E2E test package to the
better-named `volume_mounts`.

Ref: https://hashicorp.atlassian.net/browse/NET-11551
2025-01-09 08:41:22 -05:00