-
Notifications
You must be signed in to change notification settings - Fork 2k
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
host_volume/volume/volume_mount does not work with java driver #6709
Comments
host_volume
/volume
/volume_mount
does not work with java
driverjava
driver
java
driver
Seems like this might be an issue with the exec-driver as well, based on discussions on gitter. |
Thanks for reporting this @martingms! Yeah, that definitely looks like a documentation and validation issue. |
Hi @tgross thanks for the quick reply :) What do you mean with documentation and validation issue? Is |
I did some digging and chatted with one of my colleagues and it turns out I'm wrong -- this should work. Sorry about the confusion. Going to mark this as a bug. |
I've got host-volumes working using the exec driver FWIW. |
I have same issue , looking for a resolution |
This is crucial for us, excellent timing putting this into 0.11.1 👍 |
I just tested 0.11.1, and if I'm not totally lost (been a long day..) it seems that java_driver mount is now working? |
This person reported the same: #6709 (comment). I never got a chance to actually reproduce this issue, but because two people reported it in this thread I'm hesitant to close this out until I've done so. I have this on my plate for the next patch release, so lemme take a quick look again in the next day or so to confirm. |
Let me know if I can try/test anything. The puzzling thing is that I started off with the java_driver, didn't work. Tested with docker, and it worked so I just waited for 0.11.1, but I see this has been moved to 0.11.2. Either way, I just restarted the java-job I had and it seems like the storage popped up. It is not showing in the UI -> Files though. Going through the new "exec" is showing the directory content. |
The UI uses the same API as |
Certainly does. I tested another java-job and it looks to be the same behavior. |
Short follow-up, I've had my java-app write to the store successfully. The store is an EFS share that I've mounted locally on all my nomad clients. Seems to work just fine. I feel this issue should be closed (I was personally waiting for it to be resolved, pure luck that I did some extra tests and found it already working), but as you say @tgross it would be good to do some extra checks. |
Ok, I was able to confirm that host volumes were working with both My relevant client config: client {
host_volume "srv" {
path = "/path/to/my/stuff"
read_only = true
}
} My job "example" {
datacenters = ["dc1"]
group "group" {
volume "srv" {
type = "host"
source = "srv"
read_only = true
}
task "task" {
driver = "java"
config {
jar_path = "/local/srv/services-kotlin-0.0.1-all.jar"
jvm_options = ["-Xmx1024m"]
}
volume_mount {
volume = "srv"
destination = "/local/srv"
}
env {
PORT = "9001"
}
resources {
cpu = 1024
memory = 1024
}
}
}
} My job "example" {
datacenters = ["dc1"]
group "group" {
volume "srv" {
type = "host"
source = "srv"
read_only = true
}
task "task" {
driver = "exec"
config {
command = "sleep"
args = ["3600"]
}
volume_mount {
volume = "srv"
destination = "/local/srv"
}
}
}
} |
Thanks @tgross ! |
@martingms we had an internal discussion of another bug and I think the original problem you've had here isn't specific to the |
Okay! It's been a while, but I'll test if upgrading to the latest version changes anything. Following #7796 as well. |
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. |
Nomad version
Nomad v0.10.1 (0d4e5d949fe073c47a947ea36bfef31a3c49224f)
Operating system and Environment details
Ubuntu 18.04.3 LTS
Issue
host_volume
/volume
/volume_mount
does not work withjava
driver. The directory is created in the allocation, but not mounted/available.Reproduction steps
Add
host_volume
in client config, with correspondingvolume
andvolume_mount
in job spec, using the"java"
driver. Put a file in the directory, and attempt to find it/read it from within the java program.Job file (if appropriate)
client.hcl:
my-job.nomad:
Nomad Client logs (if appropriate)
Nomad Server logs (if appropriate)
Seems like nothing about this shows up in the logs
The text was updated successfully, but these errors were encountered: