mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-01-30 16:49:29 +00:00
cephfs: upgrading mount syntax
Getting FsID instead of ClusterID as parameter Signed-off-by: mageekchiu <qiukang@mail.ustc.edu.cn>
This commit is contained in:
parent
21d1d640e2
commit
42b818b59e
@ -74,7 +74,7 @@ func (m *kernelMounter) mountKernel(
|
|||||||
|
|
||||||
args := []string{
|
args := []string{
|
||||||
"-t", "ceph",
|
"-t", "ceph",
|
||||||
fmt.Sprintf("%s@%s.%s=%s", cr.ID, volOptions.ClusterID, volOptions.FsName, volOptions.RootPath),
|
fmt.Sprintf("%s@%s.%s=%s", cr.ID, volOptions.FsID, volOptions.FsName, volOptions.RootPath),
|
||||||
mountPoint,
|
mountPoint,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,6 +46,7 @@ type VolumeOptions struct {
|
|||||||
RequestName string
|
RequestName string
|
||||||
NamePrefix string
|
NamePrefix string
|
||||||
ClusterID string
|
ClusterID string
|
||||||
|
FsID string
|
||||||
MetadataPool string
|
MetadataPool string
|
||||||
// ReservedID represents the ID reserved for a subvolume
|
// ReservedID represents the ID reserved for a subvolume
|
||||||
ReservedID string
|
ReservedID string
|
||||||
@ -318,6 +319,11 @@ func NewVolumeOptions(
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
opts.FsID, err = opts.conn.GetFSID()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
opts.MetadataPool, err = fs.GetMetadataPool(ctx, opts.FsName)
|
opts.MetadataPool, err = fs.GetMetadataPool(ctx, opts.FsName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -442,6 +448,11 @@ func NewVolumeOptionsFromVolID(
|
|||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
volOptions.FsID, err = volOptions.conn.GetFSID()
|
||||||
|
if err != nil {
|
||||||
|
return nil, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
volOptions.MetadataPool, err = fs.GetMetadataPool(ctx, volOptions.FsName)
|
volOptions.MetadataPool, err = fs.GetMetadataPool(ctx, volOptions.FsName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
@ -826,6 +837,11 @@ func NewSnapshotOptionsFromID(
|
|||||||
return &volOptions, nil, &sid, err
|
return &volOptions, nil, &sid, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
volOptions.FsID, err = volOptions.conn.GetFSID()
|
||||||
|
if err != nil {
|
||||||
|
return &volOptions, nil, &sid, err
|
||||||
|
}
|
||||||
|
|
||||||
volOptions.MetadataPool, err = fs.GetMetadataPool(ctx, volOptions.FsName)
|
volOptions.MetadataPool, err = fs.GetMetadataPool(ctx, volOptions.FsName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return &volOptions, nil, &sid, err
|
return &volOptions, nil, &sid, err
|
||||||
|
Loading…
Reference in New Issue
Block a user