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

multi-writer volume does not calculate free claims correctly #8968

Closed
mkrueger-sabio opened this issue Sep 26, 2020 · 3 comments · Fixed by #9040
Closed

multi-writer volume does not calculate free claims correctly #8968

mkrueger-sabio opened this issue Sep 26, 2020 · 3 comments · Fixed by #9040
Assignees
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/storage type/bug
Milestone

Comments

@mkrueger-sabio
Copy link

Hi,

I registered a volume with multi-node-multi-writer

type = "csi"
id = "test-volume-httpd"
name = "test-volume-httpd"
external_id = "httpd"
access_mode = "multi-node-multi-writer"
attachment_mode = "file-system"
plugin_id = "csi.serviceware.gluster"

and started two jobs

job "httpd" {
  group "httpd" {

    restart {
      attempts = 10
      interval = "5m"
      delay    = "25s"
      mode     = "delay"
    }

    volume "htdocs" {
      type      = "csi"
      read_only = false
      source    = "test-volume-httpd"
    }

    task "httpd" {
      driver = "docker"

      volume_mount {
        volume      = "htdocs"
        destination = "/usr/local/apache2/htdocs"
        read_only   = false
      }

      config {
        image = "httpd:2.4"

        port_map {
          http = 80
        }
      }

      resources {
        network {
          port "http" {}
        }
      }
    }
  }
}

Of course, I could run the first job, but when I a second job I got:

Constraint CSI volume test-volume-httpd has exhausted its available writer claims filtered 1 node

My expectations was, that with multi-node-multi-writer I could use the volume in two jobs.

Is my expectation wrong or is this just not supported? Will this be supported in the future?

@tgross
Copy link
Member

tgross commented Sep 28, 2020

Hi @mkrueger-sabio! Sorry to hear about that, but thanks for reporting it!

I took a quick search through the source around that error and it looks like it's simply a bug in the WriteFreeClaims check. The CSIVolumeAccessModeMultiNodeMultiWriter should not be checking if there are 0 claims, but checking against the maximum allowed claims for that volume. This is admittedly not a case that's been well-tested because most of the cloud providers don't support it. Should be a small fix that I'll make sure gets out in the upcoming 0.13.

@tgross tgross self-assigned this Sep 28, 2020
@tgross tgross changed the title [question] Not possible to use volume in two jobs multi-writer volume does not calculate free claims correctly Sep 28, 2020
@tgross tgross added the stage/accepted Confirmed, and intend to work on. No timeline committment though. label Sep 28, 2020
@tgross tgross added this to the 0.13 milestone Oct 7, 2020
@tgross
Copy link
Member

tgross commented Oct 7, 2020

I've just merged #9040 and that will ship in the upcoming 0.13 release!

@github-actions
Copy link

github-actions bot commented Nov 1, 2022

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 Nov 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/storage type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants