Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[csi] nomad plan does not fail when required fields are missing in the volume stanza #10645

Closed
apollo13 opened this issue May 23, 2021 · 3 comments · Fixed by #10651
Closed
Assignees
Milestone

Comments

@apollo13
Copy link
Contributor

Nomad version

Nomad v1.1.0 (2678c36)

Operating system and Environment details

Any, not relevant

Issue

Planning a job that has a CSI volume stanza (https://www.nomadproject.io/docs/job-specification/volume) and does not specify attachment_mode or access_mode still allows the job to get to scheduling where it will fail with failed to setup alloc: pre-run hook "csi_hook" failed: unknown volume attachment mode:

Reproduction steps

Try scheduling this job:

job "test" {
  datacenters = ["dc1"]

  group "web" {

    volume "test" {
      type      = "csi"
      source    = "test"
      read_only = false
    }

    task "test" {
      driver = "docker"

      volume_mount {
        volume      = "test"
        destination = "/data"
        read_only   = false
      }

      config {
        image = "ubuntu:20.04"
	command = "sleep"
	args = ["--infinity"]
      }

    }
  }
}

I ran into this a part of #10626 where I managed to get thoroughly confused by the different levels where this error could be thrown :)

Expected Result

Plan should give a nice error

Actual Result

Job plans just fine

@tgross
Copy link
Member

tgross commented May 24, 2021

Hi @apollo13! Yup, looks like we missed adding that to the validator. Will fix.

@tgross
Copy link
Member

tgross commented Jun 3, 2021

The patch in #10651 has been merged and will ship in Nomad 1.1.1

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants