Unable to mount iscsi devices in nomad deployment
See original GitHub issueTrying to turn up an *arr application with a /config directory provided by an iscsi mount. I was able to create the volume via csc
, and then set it up in nomad via terraform. However the last step, mounting it into the container, does not seem to work.
I have tried both as a file-system
and a block-device
attachment mode.
There must be something simple and obvious that I’m doing wrong, since I can’t find anything on the internet about this error message, but I’m not sure where to start looking.
Thanks in advance, again!
allocation logs:
2021-08-29T16:14:46-05:00 Setup Failure failed to setup alloc: pre-run hook "csi_hook" failed: node plugin returned an internal error, check the plugin allocation logs for more information: rpc error: code= Internal desc = {"code":125,"stdout":"","stderr":"chroot: cannot change root directory to '/host': No such file or directory\n"}
when I go look at the stderr for the node job I have this output:
{
code: 13,
message: `{"code":125,"stdout":"","stderr":"chroot: cannot change root directory to '/host': No such file or directory\\n"}`
}
stdout contains, along with a lot of status messages,
{"service":"democratic-csi","level":"info","message":"new request - driver: FreeNASDriver method: NodeStageVolume call: {\"_events\":{},\"_eventsCount\":1,\"call\":{},\"cancelled\":false,\"metadata\":{\"_internal_repr\":{\"user-agent\":[\"grpc-go/1.29.1\"]},\"flags\":0},\"request\":{\"publish_context\":{},\"secrets\":\"redacted\",\"volume_context\":{\"iqn\":\"iqn.2005-10.org.freenas.ctl:csi-radarr-volume-discovery\",\"lun\":\"0\",\"node_attach_driver\":\"iscsi\",\"portal\":\"10.10.220.110:3260\",\"provisioner_driver\":\"freenas-iscsi\"},\"volume_id\":\"radarr-volume\",\"staging_target_path\":\"/csi-data/staging/radarr-volume/rw-file-system-single-node-writer\",\"volume_capability\":{\"access_mode\":{\"mode\":\"SINGLE_NODE_WRITER\"},\"mount\":{\"mount_flags\":[\"noatime\"],\"fs_type\":\"ext4\"},\"access_type\":\"mount\"}}}"}
{"service":"democratic-csi","level":"debug","message":"operation lock keys: [\"volume_id_radarr-volume\"]"}
{"service":"democratic-csi","level":"verbose","message":"validating capabilities: [{\"access_mode\":{\"mode\":\"SINGLE_NODE_WRITER\"},\"mount\":{\"mount_flags\":[\"noatime\",\"defaults\"],\"fs_type\":\"ext4\"},\"access_type\":\"mount\"}]"}
executing fileystem command: stat /csi-data/staging/radarr-volume/rw-file-system-single-node-writer
executing iscsi command: iscsiadm -m node -T iqn.2005-10.org.freenas.ctl:csi-radarr-volume-discovery -p 10.10.220.110:3260 -o new
{"service":"democratic-csi","level":"error","message":"handler error - driver: FreeNASDriver method: NodeStageVolume error: {\"code\":125,\"stdout\":\"\",\"stderr\":\"chroot: cannot change root directory to '/host': No such file or directory\\n\"}"}
{"service":"democratic-csi","level":"info","message":"new request - driver: FreeNASDriver method: NodeUnpublishVolume call: {\"_events\":{},\"_eventsCount\":1,\"call\":{},\"cancelled\":false,\"metadata\":{\"_internal_repr\":{\"user-agent\":[\"grpc-go/1.29.1\"]},\"flags\":0},\"request\":{\"volume_id\":\"radarr-volume\",\"target_path\":\"/csi-data/per-alloc/f08e66af-efc9-b7a6-e3d6-750de3ad87fb/radarr-volume/rw-file-system-single-node-writer\"}}"}
{"service":"democratic-csi","level":"debug","message":"operation lock keys: [\"volume_id_radarr-volume\"]"}
executing mount command: findmnt --mountpoint /csi-data/per-alloc/f08e66af-efc9-b7a6-e3d6-750de3ad87fb/radarr-volume/rw-file-system-single-node-writer --output source,target,fstype,label,options,avail,size,used -b -J
executing fileystem command: stat /csi-data/per-alloc/f08e66af-efc9-b7a6-e3d6-750de3ad87fb/radarr-volume/rw-file-system-single-node-writer
failed to execute filesystem command: stat /csi-data/per-alloc/f08e66af-efc9-b7a6-e3d6-750de3ad87fb/radarr-volume/rw-file-system-single-node-writer, response: {"code":1,"stdout":"","stderr":"stat: cannot stat '/csi-data/per-alloc/f08e66af-efc9-b7a6-e3d6-750de3ad87fb/radarr-volume/rw-file-system-single-node-writer': No such file or directory\n"}
{"service":"democratic-csi","level":"info","message":"new response - driver: FreeNASDriver method: NodeUnpublishVolume response: {}"}
{"service":"democratic-csi","level":"info","message":"new request - driver: FreeNASDriver method: NodeUnstageVolume call: {\"_events\":{},\"_eventsCount\":1,\"call\":{},\"cancelled\":false,\"metadata\":{\"_internal_repr\":{\"user-agent\":[\"grpc-go/1.29.1\"]},\"flags\":0},\"request\":{\"volume_id\":\"radarr-volume\",\"staging_target_path\":\"/csi-data/staging/radarr-volume/rw-file-system-single-node-writer\"}}"}
{"service":"democratic-csi","level":"debug","message":"operation lock keys: [\"volume_id_radarr-volume\"]"}
executing mount command: findmnt --mountpoint /csi-data/staging/radarr-volume/rw-file-system-single-node-writer/block_device --output source,target,fstype,label,options,avail,size,used -b -J
executing mount command: findmnt --mountpoint /csi-data/staging/radarr-volume/rw-file-system-single-node-writer --output source,target,fstype,label,options,avail,size,used -b -J
executing mount command: findmnt --mountpoint /csi-data/staging/radarr-volume/rw-file-system-single-node-writer --output source,target,fstype,label,options,avail,size,used -b -J
executing fileystem command: stat /csi-data/staging/radarr-volume/rw-file-system-single-node-writer
executing fileystem command: rmdir /csi-data/staging/radarr-volume/rw-file-system-single-node-writer
{"service":"democratic-csi","level":"info","message":"new response - driver: FreeNASDriver method: NodeUnstageVolume response: {}"}
Issue Analytics
- State:
- Created 2 years ago
- Comments:70 (35 by maintainers)
Top Results From Across the Web
Mounting iSCSI block devices on worker nodes? : r/openshift
I can't figure out how to mount iSCSI directly on the nodes, so that they can be used with operators (e.g. Portworx).
Read more >Nomad - persistent volumes on premise (what do you use?)
Hi, I am building nomad cloud across bare-metals and I am still not sure what kind of storage I should use. My favorite...
Read more >1888894 – Unable to deploy pods with different iSCSI devices ...
Initially looking at it, the resources seem to be configured correctly. Assigning to storage for additional help in troubleshooting.
Read more >5.2. Deploying LINSTOR... | Piraeus
This section describes how you can deploy and configure a new LINSTOR cluster in Nomad. If you want to install LINSTOR directly on...
Read more >Docker interaction with Portworx
Name Description Example
fs Specifies a filesystem to be laid out: xfs|ext4 fs: “ext4”
ephemeral Creates the ephemeral volumes ephemeral: false
size Specifies a volume size...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Basic docs and examples started here: https://github.com/democratic-csi/democratic-csi/tree/master/docs/Nomad
No, zero ports are opened there.
Node Job Config