rbd: copy creds when copying the connection

rbd flatten functions is a CLI call and it expects
the creds as the input and copying of creds is
required when we generate the temp clone image.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2021-07-12 12:41:00 +05:30 committed by mergify[bot]
parent 08728b631b
commit 916c97b4a8

View File

@ -81,6 +81,7 @@ func (cc *ClusterConnection) Copy() *ClusterConnection {
c := ClusterConnection{} c := ClusterConnection{}
c.discardOnZeroedWriteSameDisabled = cc.discardOnZeroedWriteSameDisabled c.discardOnZeroedWriteSameDisabled = cc.discardOnZeroedWriteSameDisabled
c.conn = connPool.Copy(cc.conn) c.conn = connPool.Copy(cc.conn)
c.Creds = cc.Creds
return &c return &c
} }