From f4b38228ae7f2fae6313683008c106e4dddbc8da Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Thu, 5 Sep 2019 12:13:53 +0530 Subject: [PATCH] Remove volumemounter flag from cephfs Signed-off-by: Madhu Rajanna --- cmd/cephcsi.go | 1 - docs/deploy-cephfs.md | 37 +++++++++++++++---------------- examples/cephfs/storageclass.yaml | 4 +--- pkg/cephfs/driver.go | 6 ----- pkg/util/util.go | 1 - 5 files changed, 19 insertions(+), 30 deletions(-) diff --git a/cmd/cephcsi.go b/cmd/cephcsi.go index c2c25a89f..f8f37d28e 100644 --- a/cmd/cephcsi.go +++ b/cmd/cephcsi.go @@ -62,7 +62,6 @@ func init() { flag.BoolVar(&conf.Containerized, "containerized", true, "whether run as containerized") // cephfs related flags - flag.StringVar(&conf.VolumeMounter, "volumemounter", "", "default volume mounter (possible options are 'kernel', 'fuse')") flag.StringVar(&conf.MountCacheDir, "mountcachedir", "", "mount info cache save dir") // liveness/grpc metrics related flags diff --git a/docs/deploy-cephfs.md b/docs/deploy-cephfs.md index b5825ee02..2257cfa81 100644 --- a/docs/deploy-cephfs.md +++ b/docs/deploy-cephfs.md @@ -43,24 +43,23 @@ that should be resolved in v14.2.3. **Available command line arguments:** -| Option | Default value | Description | -| --------------------- | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `--endpoint` | `unix://tmp/csi.sock` | CSI endpoint, must be a UNIX socket | -| `--drivername` | `cephfs.csi.ceph.com` | Name of the driver (Kubernetes: `provisioner` field in StorageClass must correspond to this value) | -| `--nodeid` | _empty_ | This node's ID | -| `--type` | _empty_ | Driver type `[rbd | cephfs]` If the driver type is set to `rbd` it will act as a `rbd plugin` or if it's set to `cephfs` will act as a `cephfs plugin` | -| `--volumemounter` | _empty_ | Default volume mounter. Available options are `kernel` and `fuse`. This is the mount method used if volume parameters don't specify otherwise. If left unspecified, the driver will first probe for `ceph-fuse` in system's path and will choose Ceph kernel client if probing failed. | -| `--mountcachedir` | _empty_ | Volume mount cache info save dir. If left unspecified, the dirver will not record mount info, or it will save mount info and when driver restart it will remount volume it cached. | -| `--instanceid` | "default" | Unique ID distinguishing this instance of Ceph CSI among other instances, when sharing Ceph clusters across CSI instances for provisioning | -| `--pluginpath` | "/var/lib/kubelet/plugins/" | The location of cephcsi plugin on host | -| `--metadatastorage` | _empty_ | Points to where older (1.0.0 or older plugin versions) metadata about provisioned volumes are kept, as file or in as k8s configmap (`node` or `k8s_configmap` respectively) | -| `--pidlimit` | _0_ | Configure the PID limit in cgroups. The container runtime can restrict the number of processes/tasks which can cause problems while provisioning (or deleting) a large number of volumes. A value of `-1` configures the limit to the maximum, `0` does not configure limits at all. | -| `--metricsport` | `8080` | TCP port for /grpc metrics requests | -| `--metricspath` | `/metrics` | Path of prometheus endpoint where metrics will be available | -| `--enablegrpcmetrics` | `false` | Enable grpc metrics collection and start prometheus server | -| `--polltime` | `60s` | Time interval in between each poll | -| `--timeout` | `3s` | Probe timeout in seconds | -| `--histogramoption` | `0.5,2,6` | Histogram option for grpc metrics, should be comma separated value (ex:= "0.5,2,6" where start=0.5 factor=2, count=6) | +| Option | Default value | Description | +| --------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `--endpoint` | `unix://tmp/csi.sock` | CSI endpoint, must be a UNIX socket | +| `--drivername` | `cephfs.csi.ceph.com` | Name of the driver (Kubernetes: `provisioner` field in StorageClass must correspond to this value) | +| `--nodeid` | _empty_ | This node's ID | +| `--type` | _empty_ | Driver type `[rbd | cephfs]` If the driver type is set to `rbd` it will act as a `rbd plugin` or if it's set to `cephfs` will act as a `cephfs plugin` | +| `--mountcachedir` | _empty_ | Volume mount cache info save dir. If left unspecified, the dirver will not record mount info, or it will save mount info and when driver restart it will remount volume it cached. | +| `--instanceid` | "default" | Unique ID distinguishing this instance of Ceph CSI among other instances, when sharing Ceph clusters across CSI instances for provisioning | +| `--pluginpath` | "/var/lib/kubelet/plugins/" | The location of cephcsi plugin on host | +| `--metadatastorage` | _empty_ | Points to where older (1.0.0 or older plugin versions) metadata about provisioned volumes are kept, as file or in as k8s configmap (`node` or `k8s_configmap` respectively) | +| `--pidlimit` | _0_ | Configure the PID limit in cgroups. The container runtime can restrict the number of processes/tasks which can cause problems while provisioning (or deleting) a large number of volumes. A value of `-1` configures the limit to the maximum, `0` does not configure limits at all. | +| `--metricsport` | `8080` | TCP port for /grpc metrics requests | +| `--metricspath` | `/metrics` | Path of prometheus endpoint where metrics will be available | +| `--enablegrpcmetrics` | `false` | Enable grpc metrics collection and start prometheus server | +| `--polltime` | `60s` | Time interval in between each poll | +| `--timeout` | `3s` | Probe timeout in seconds | +| `--histogramoption` | `0.5,2,6` | Histogram option for grpc metrics, should be comma separated value (ex:= "0.5,2,6" where start=0.5 factor=2, count=6) | **Available environmental variables:** @@ -77,7 +76,7 @@ is used to define in which namespace you want the configmaps to be stored | --------------------------------------------------------------------------------------------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `clusterID` | yes | String representing a Ceph cluster, must be unique across all Ceph clusters in use for provisioning, cannot be greater than 36 bytes in length, and should remain immutable for the lifetime of the Ceph cluster in use | | `fsName` | yes | CephFS filesystem name into which the volume shall be created | -| `mounter` | no | Mount method to be used for this volume. Available options are `kernel` for Ceph kernel client and `fuse` for Ceph FUSE driver. Defaults to "default mounter", see command line arguments. | +| `mounter` | no | Mount method to be used for this volume. Available options are `kernel` for Ceph kernel client and `fuse` for Ceph FUSE driver. Defaults to "default mounter". | | `pool` | no | Ceph pool into which volume data shall be stored | | `csi.storage.k8s.io/provisioner-secret-name`, `csi.storage.k8s.io/node-stage-secret-name` | for Kubernetes | Name of the Kubernetes Secret object containing Ceph client credentials. Both parameters should have the same value | | `csi.storage.k8s.io/provisioner-secret-namespace`, `csi.storage.k8s.io/node-stage-secret-namespace` | for Kubernetes | Namespaces of the above Secret objects | diff --git a/examples/cephfs/storageclass.yaml b/examples/cephfs/storageclass.yaml index 2db52a0a6..edbfdbe78 100644 --- a/examples/cephfs/storageclass.yaml +++ b/examples/cephfs/storageclass.yaml @@ -29,9 +29,7 @@ parameters: # (optional) The driver can use either ceph-fuse (fuse) or # ceph kernelclient (kernel). # If omitted, default volume mounter will be used - this is - # determined by probing for ceph-fuse - # or by setting the default mounter explicitly via - # --volumemounter command-line argument. + # determined by probing for ceph-fuse and mount.ceph # mounter: kernel reclaimPolicy: Delete mountOptions: diff --git a/pkg/cephfs/driver.go b/pkg/cephfs/driver.go index 6e2ece762..ec29c3c58 100644 --- a/pkg/cephfs/driver.go +++ b/pkg/cephfs/driver.go @@ -97,12 +97,6 @@ func (fs *Driver) Run(conf *util.Config, cachePersister util.CachePersister) { klog.Fatalf("cephfs: failed to load ceph mounters: %v", err) } - if conf.VolumeMounter != "" { - if err := validateMounter(conf.VolumeMounter); err != nil { - klog.Fatalln(err) - } - } - if err := util.WriteCephConfig(); err != nil { klog.Fatalf("failed to write ceph configuration file: %v", err) } diff --git a/pkg/util/util.go b/pkg/util/util.go index 54e6cdd92..08dc6e396 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -63,7 +63,6 @@ type Config struct { PluginPath string // location of cephcsi plugin // cephfs related flags - VolumeMounter string // default volume mounter (possible options are 'kernel', 'fuse') MountCacheDir string // mount info cache save dir // metrics related flags