mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-01-17 18:29:30 +00:00
rbd: use os.Remove to remove directory
using os.RemoveAll will remove everything
in the director after the Umount we should
be using os.Remove only to remove the empty
directory
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 39cc628adf
)
This commit is contained in:
parent
f3103c76d1
commit
40269843a8
@ -22,8 +22,8 @@ curl -X GET http://10.109.65.142:8080/metrics 2>/dev/null | grep csi
|
|||||||
csi_liveness 1
|
csi_liveness 1
|
||||||
```
|
```
|
||||||
|
|
||||||
Promethues can be deployed through the promethues operator described [here](https://coreos.com/operators/prometheus/docs/latest/user-guides/getting-started.html).
|
Prometheus can be deployed through the prometheus operator described [here](https://coreos.com/operators/prometheus/docs/latest/user-guides/getting-started.html).
|
||||||
The [service-monitor](../deploy/service-monitor.yaml) will tell promethues how
|
The [service-monitor](../deploy/service-monitor.yaml) will tell prometheus how
|
||||||
to pull metrics out of CSI.
|
to pull metrics out of CSI.
|
||||||
|
|
||||||
Each CSI pod has a service to expose the endpoint to prometheus. By default, rbd
|
Each CSI pod has a service to expose the endpoint to prometheus. By default, rbd
|
||||||
|
@ -125,7 +125,7 @@ parameters:
|
|||||||
# "file": Enable file encryption on the mounted filesystem
|
# "file": Enable file encryption on the mounted filesystem
|
||||||
# "block": Encrypt RBD block device
|
# "block": Encrypt RBD block device
|
||||||
# When unspecified assume type "block". "file" and "block" are
|
# When unspecified assume type "block". "file" and "block" are
|
||||||
# mutally exclusive.
|
# mutually exclusive.
|
||||||
# encryptionType: "block"
|
# encryptionType: "block"
|
||||||
|
|
||||||
# (optional) Use external key management system for encryption passphrases by
|
# (optional) Use external key management system for encryption passphrases by
|
||||||
|
@ -37,7 +37,7 @@ type checker struct {
|
|||||||
// timeout contains the delay (interval + timeout)
|
// timeout contains the delay (interval + timeout)
|
||||||
timeout time.Duration
|
timeout time.Duration
|
||||||
|
|
||||||
// mutex protects against concurrent access to healty, err and
|
// mutex protects against concurrent access to healthy, err and
|
||||||
// lastUpdate
|
// lastUpdate
|
||||||
mutex *sync.RWMutex
|
mutex *sync.RWMutex
|
||||||
|
|
||||||
|
@ -937,7 +937,7 @@ func (ns *NodeServer) NodeUnpublishVolume(
|
|||||||
return nil, status.Error(codes.NotFound, err.Error())
|
return nil, status.Error(codes.NotFound, err.Error())
|
||||||
}
|
}
|
||||||
if !isMnt {
|
if !isMnt {
|
||||||
if err = os.RemoveAll(targetPath); err != nil {
|
if err = os.Remove(targetPath); err != nil {
|
||||||
return nil, status.Error(codes.Internal, err.Error())
|
return nil, status.Error(codes.Internal, err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -948,7 +948,7 @@ func (ns *NodeServer) NodeUnpublishVolume(
|
|||||||
return nil, status.Error(codes.Internal, err.Error())
|
return nil, status.Error(codes.Internal, err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = os.RemoveAll(targetPath); err != nil {
|
if err = os.Remove(targetPath); err != nil {
|
||||||
return nil, status.Error(codes.Internal, err.Error())
|
return nil, status.Error(codes.Internal, err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ func Test_getCrushLocationMap(t *testing.T) {
|
|||||||
want: map[string]string{"zone": "zone1"},
|
want: map[string]string{"zone": "zone1"},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "multuple matching crushlocation and node labels",
|
name: "multiple matching crushlocation and node labels",
|
||||||
args: input{
|
args: input{
|
||||||
crushLocationLabels: "topology.io/zone,topology.io/rack",
|
crushLocationLabels: "topology.io/zone,topology.io/rack",
|
||||||
nodeLabels: map[string]string{
|
nodeLabels: map[string]string{
|
||||||
|
Loading…
Reference in New Issue
Block a user