mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 18:43:34 +00:00
util/conn_pool: open a connection with requested user
Use the Credentials.ID in combination with the keyfile to connect to the Ceph cluster. This makes it possible to use different users for different tasks on the cluster. Fixes: #904 Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
2cc59ca411
commit
c3cf6be6a7
@ -165,7 +165,7 @@ func createImage(ctx context.Context, pOpts *rbdVolume, cr *util.Credentials) er
|
||||
|
||||
func (rv *rbdVolume) getIoctx(cr *util.Credentials) (*rados.IOContext, error) {
|
||||
if rv.conn == nil {
|
||||
conn, err := connPool.Get(rv.Pool, rv.Monitors, cr.KeyFile)
|
||||
conn, err := connPool.Get(rv.Pool, rv.Monitors, cr.ID, cr.KeyFile)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "failed to get connection")
|
||||
}
|
||||
|
Reference in New Issue
Block a user