mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-17 20:00:23 +00:00
util: call WriteCephConfig() in cephcsi.go
This commit calls WriteCephConfig() in cephcsi.go to create ceph.conf and keyring if it is not mounted to be used by all cli calls and conn cmds. Before this change, rbd-controller/omap-generator did not create ceph.conf on startup. Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
parent
8c8f34cf7a
commit
0a7a7f4866
@ -210,6 +210,10 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
if err = util.WriteCephConfig(); err != nil {
|
||||
log.FatalLogMsg("failed to write ceph configuration file (%v)", err)
|
||||
}
|
||||
|
||||
log.DefaultLog("Starting driver type: %v with name: %v", conf.Vtype, dname)
|
||||
switch conf.Vtype {
|
||||
case rbdType:
|
||||
|
@ -97,10 +97,6 @@ func (fs *Driver) Run(conf *util.Config) {
|
||||
log.FatalLogMsg("cephfs: failed to load ceph mounters: %v", err)
|
||||
}
|
||||
|
||||
if err = util.WriteCephConfig(); err != nil {
|
||||
log.FatalLogMsg("failed to write ceph configuration file: %v", err)
|
||||
}
|
||||
|
||||
// Use passed in instance ID, if provided for omap suffix naming
|
||||
if conf.InstanceID != "" {
|
||||
CSIInstanceID = conf.InstanceID
|
||||
|
@ -106,11 +106,6 @@ func (r *Driver) Run(conf *util.Config) {
|
||||
var err error
|
||||
var topology map[string]string
|
||||
|
||||
// Create ceph.conf for use with CLI commands
|
||||
if err = util.WriteCephConfig(); err != nil {
|
||||
log.FatalLogMsg("failed to write ceph configuration file (%v)", err)
|
||||
}
|
||||
|
||||
// Use passed in instance ID, if provided for omap suffix naming
|
||||
if conf.InstanceID != "" {
|
||||
CSIInstanceID = conf.InstanceID
|
||||
|
Loading…
Reference in New Issue
Block a user