Commit Graph

8 Commits

Author SHA1 Message Date
haruband
41bbaf9cfb
Fix multiple connections problems to one same nqn in a single node (#23)
* fix: make multiple connections to one same nqn possible in a single node

Multiple connections to one same nqn in a single node return -EALREADY error.
So, we should use a hostnqn to make every connections seperate. It is appropriate
to use a target path from a volume request as a hostnqn.

* fix: make ro and rw mounts for one same nqn possible in a single node

ReadOnly and ReadWrite mounts for one same nqn in a single node return -EBUSY error.
So, we should remove readonly and readwrite options when mounting a block device in a
csi driver. A cri runtime makes a mount as readonly inside containers if needed.

* fix: add fallback supports for no hostnqn sysfs file supports

Directories per each nqn will be created in /run/nvmf and files per each hostnqn
will be created in /run/nvmf/{nqn}. If linux kernel has no hostnqn sysfs file
supports, we will disconnect all connections for a nqn at once when a directory for
the nqn is empty.

* refactor: rename sysfs_nqn_path to sysfs_subsysnqn_path

* refactor: use filepath.Join instead of strings.Join

* fix: add explicitly UnsupportedHostnqnError for fallback supports

If linux kernel has no hostnqn sysfs file supports, return UnsupportedHostnqnError
and switch to fallback mode which will disconnect all connections at once when
a last controller in a nqn is disconnected.

* fix: return directly after fallback mode

* fix: mount the host's /run/nvmf directory to csi-node-driver
2023-05-04 11:20:38 +08:00
Meinhard Zhou
0bf764e9e2
Merge pull request #20 from MeinhardZhou/chore/components
Example: update componments to the latest version.
2023-03-30 17:51:08 +08:00
Meinhard Zhou
bfea0e8ade chore: update componments to latest version.
Signed-off-by: Meinhard Zhou <zhouenhua@bytedance.com>
2023-02-17 11:08:06 +08:00
Meinhard Zhou
e122809913 fix: add volumeattachments/status to rbac role's rule
Signed-off-by: Meinhard Zhou <zhouenhua@bytedance.com>
2023-02-17 11:05:31 +08:00
zhangdi
305dddba10 Fix some problems
1.fix path error in deploy/kubernetes/csi-nvmf-node.yaml
2.delete glog from the code
3.check vol uuid param before attach nvmf volume
2022-10-21 21:17:34 +08:00
Meinhard Zhou
411117889a fix: make example available
1. fix path error in pkg/nvmf/fabrics.go
2. add nvmf kernel target setup guide
3. update example and deploy yaml

Signed-off-by: Meinhard Zhou <zhouenhua@bytedance.com>
2022-08-19 18:04:40 +08:00
zhouenhua
2792dd2391 chorei&docs: optim Makefile and README
1. add container image build in Makefile
2. reorganized test guide
3. renamed csi-driver yaml.

Signed-off-by: zhouenhua <zhouenhua@bytedance.com>
2021-11-12 17:29:39 +08:00
zhouenhua
6a6ac61e01 init csi-driver-nvmf
Signed-off-by: zhouenhua <zhouenhua@bytedance.com>
2021-09-10 11:50:07 +08:00