-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature-issue-651-immediate-volume-binding…
…-mode
- Loading branch information
Showing
16 changed files
with
1,189 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Proposal: Support option to change WBT settings | ||
|
||
Last updated: 07.12.2021 | ||
|
||
|
||
## Abstract | ||
|
||
CSI should have an opportunity to automate managing of WBT (writeback throttling) value for specific SCs. | ||
|
||
## Background | ||
WBT feature was introduced in 4.10 kernel and have a [bug in some versions](https://access.redhat.com/solutions/4904681). | ||
Storage Systems, which use Baremetal CSI, may have performance issues due to incorrect WBT settings. | ||
Recommended workaround in disabling this feature. | ||
So it is specific for each device (sdb, sdc, ...), CSI should have an opportunity to control it on Volume or Pod creation stage. | ||
|
||
## Proposal | ||
|
||
#### Operator part | ||
|
||
Add ConfigMap to manage WBT settings in csi-baremetal-deployment helm chart. | ||
CSI Node will check it every 60 seconds and update existing one. | ||
|
||
``` | ||
data: | ||
config.yaml: |- | ||
enable: true | ||
# Value to set (uint32), 0 means disabling | ||
wbt_lat_usec_value: 0 | ||
acceptable_volume_options: | ||
# Block volumes don't take any impact from WBT | ||
modes: | ||
- FS | ||
# It is risky to change WBT settings for LVG Volumes | ||
storage_types: | ||
- HDD | ||
- SSD | ||
- NVME | ||
# The list of acceptable kernel versions | ||
# Is some nodes are not in, user should add values manually via editting CM | ||
acceptable_kernels.yaml: |- | ||
node_kernel_versions: | ||
- 4.18.0-193.65.2.el8_2.x86_64 | ||
``` | ||
|
||
#### Node Part | ||
|
||
- Node Stage -> | ||
1. Check WBT configuration | ||
2. Scan current value (`cat /sys/block/<drive>/queue/wbt_lat_usec`) | ||
3. Set passed one, if it's not equal (`echo <value> > /sys/block/<drive>/queue/wbt_lat_usec`) | ||
4. Add `wbt-changed=yes` annotation on Volume | ||
5. Send `WBTValueSetFailed` Event if error | ||
|
||
- Node UnStage -> | ||
1. Check `wbt-changed=yes` annotation on Volume | ||
2. Restore default (`echo "-1" > /sys/block/<drive>/queue/wbt_lat_usec`) (It was performed even if unmount/removeDir errors) | ||
3. Delete annotation | ||
4. Send `WBTValueRestoreFailed` Event if error | ||
|
||
## Rationale | ||
|
||
We could trigger WBT disabling via PVC annotation as for fake-attach feature. | ||
|
||
## Compatibility | ||
|
||
WBT is supported only for 4.10 kernel version and above. Link - https://cateee.net/lkddb/web-lkddb/BLK_WBT.html | ||
|
||
## Open issues (if applicable) | ||
|
||
ID | Name | Descriptions | Status | Comments | ||
---| -----| -------------| ------ | -------- | ||
ISSUE-1 | Should we enable WBT disabling by default for specific kernel version? | We could describe the kernel version map, where it is necessary | | The kernel version map is not clarified | ||
ISSUE-2 | Is it correct to switch WBT settings on Stage/UnStage? | Other candidates - CreateVolume/DeleteVolume, Publish/UnPublish | RESOLVED | In Create/DeleteVolume case settings won't be persisted on node reboot. When volume is shared across the pods you will have to manipulate WBT multiple times on PublishVolume |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
Copyright © 2020 Dell Inc. or its subsidiaries. All Rights Reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package linuxutils | ||
|
||
import ( | ||
"github.com/stretchr/testify/mock" | ||
) | ||
|
||
// MockWrapWbt is a mock implementation of WrapWbt | ||
type MockWrapWbt struct { | ||
mock.Mock | ||
} | ||
|
||
// SetValue is a mock implementations | ||
func (m *MockWrapWbt) SetValue(device string, value uint32) error { | ||
args := m.Mock.Called(device, value) | ||
return args.Error(0) | ||
} | ||
|
||
// RestoreDefault is a mock implementations | ||
func (m *MockWrapWbt) RestoreDefault(device string) error { | ||
args := m.Mock.Called(device) | ||
return args.Error(0) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.