mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-05-22 07:16:41 +00:00
rbd: do not resize read-only volumes while staging
Volumes that were requested with a read-only capability should not be resized. Reported-by: Alex Kalenyuk <akalenyu@redhat.com> Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
parent
ea7be34396
commit
31da09863e
@ -474,6 +474,8 @@ func (ns *NodeServer) stageTransaction(
|
||||
}
|
||||
}
|
||||
|
||||
// if the volume is read-only, no resize should be done
|
||||
if !volOptions.readOnly {
|
||||
// As we are supporting the restore of a volume to a bigger size and
|
||||
// creating bigger size clone from a volume, we need to check filesystem
|
||||
// resize is required, if required resize filesystem.
|
||||
@ -482,6 +484,7 @@ func (ns *NodeServer) stageTransaction(
|
||||
if err != nil {
|
||||
return transaction, err
|
||||
}
|
||||
}
|
||||
|
||||
return transaction, err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user