mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
util: read ceph.conf by calling conn.ReadConfigFile(CephConfigPath)
The configurations in cpeh.conf is not picked up by rados connection
automatically, hence we need to call conn.ReadConfigFile before calling
Connect().
Signed-off-by: Rakshith R <rar@redhat.com>
(cherry picked from commit e99dd3dea4
)
This commit is contained in:
parent
075d1bfcee
commit
f77e1a9e27
@ -145,6 +145,10 @@ func (cp *ConnPool) Get(monitors, user, keyfile string) (*rados.Conn, error) {
|
||||
return nil, fmt.Errorf("parsing cmdline args (%v) failed: %w", args, err)
|
||||
}
|
||||
|
||||
if err = conn.ReadConfigFile(CephConfigPath); err != nil {
|
||||
return nil, fmt.Errorf("failed to read config file %q: %w", CephConfigPath, err)
|
||||
}
|
||||
|
||||
err = conn.Connect()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("connecting failed: %w", err)
|
||||
|
Loading…
Reference in New Issue
Block a user