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>
(cherry picked from commit 916c97b4a8)
This commit is contained in:
Madhu Rajanna 2021-07-12 12:41:00 +05:30 committed by mergify[bot]
parent 33509ca90a
commit a7a5a527c2

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
} }