mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
Added forcecephkernelclient as startup parameter to force enabling ceph
Signed-off-by: Stefan Haas <shaas@suse.com>
This commit is contained in:
parent
50268d5947
commit
6a2717ce20
@ -63,6 +63,7 @@ func init() {
|
||||
|
||||
// cephfs related flags
|
||||
flag.StringVar(&conf.MountCacheDir, "mountcachedir", "", "mount info cache save dir")
|
||||
flag.BoolVar(&conf.ForceKernelCephFS, "forcecephkernelclient", false, "enable Ceph Kernel clients on kernel < 4.17 which support quotas")
|
||||
|
||||
// liveness/grpc metrics related flags
|
||||
flag.IntVar(&conf.MetricsPort, "metricsport", 8080, "TCP port for liveness/grpc metrics requests")
|
||||
|
@ -44,7 +44,7 @@ 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 |
|
||||
@ -60,6 +60,11 @@ that should be resolved in v14.2.3.
|
||||
| `--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) |
|
||||
| `--forcecephkernelclient` | `false` | Force enabling Ceph Kernel clients for mounting on kernels < 4.17 |
|
||||
|
||||
**NOTE:** The parameter `-forcecephkernelclient` enables the Kernel
|
||||
CephFS mounter on kernels < 4.17.
|
||||
**This is not recommended/supported if the kernel does not support quota.**
|
||||
|
||||
**Available environmental variables:**
|
||||
|
||||
|
@ -95,7 +95,7 @@ func (fs *Driver) Run(conf *util.Config, cachePersister util.CachePersister) {
|
||||
// Configuration
|
||||
PluginFolder = conf.PluginPath
|
||||
|
||||
if err := loadAvailableMounters(); err != nil {
|
||||
if err := loadAvailableMounters(conf); err != nil {
|
||||
klog.Fatalf("cephfs: failed to load ceph mounters: %v", err)
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ var (
|
||||
|
||||
// Load available ceph mounters installed on system into availableMounters
|
||||
// Called from driver.go's Run()
|
||||
func loadAvailableMounters() error {
|
||||
func loadAvailableMounters(conf *util.Config) error {
|
||||
// #nosec
|
||||
fuseMounterProbe := exec.Command("ceph-fuse", "--version")
|
||||
// #nosec
|
||||
@ -70,7 +70,8 @@ func loadAvailableMounters() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if majorVers > 4 || (majorVers >= 4 && minorVers >= 17) {
|
||||
|
||||
if conf.ForceKernelCephFS || majorVers > 4 || (majorVers >= 4 && minorVers >= 17) {
|
||||
klog.Infof("loaded mounter: %s", volumeMounterKernel)
|
||||
availableMounters = append(availableMounters, volumeMounterKernel)
|
||||
} else {
|
||||
|
@ -97,9 +97,13 @@ type Config struct {
|
||||
|
||||
IsControllerServer bool // if set to true start provisoner server
|
||||
IsNodeServer bool // if set to true start node server
|
||||
|
||||
// rbd related flag
|
||||
Containerized bool // whether run as containerized
|
||||
|
||||
// cephfs related flags
|
||||
ForceKernelCephFS bool // force to use the ceph kernel client even if the kernel is < 4.17
|
||||
|
||||
}
|
||||
|
||||
// CreatePersistanceStorage creates storage path and initializes new cache
|
||||
|
Loading…
Reference in New Issue
Block a user