blobstor: fix mode metric #1060

Merged
fyrchik merged 1 commits from elebedeva/frostfs-node:fix/blobstore-mode-metric into master 2024-03-29 20:44:48 +00:00
Collaborator

Close #1055

It used to always show CLOSED after setting shard mode to read-only regardless of actual mode.
Now metric represents actual blobstor mode of operations.

blobstor mode right after node is up:
blobstore1

blobstor mode after executing frostfs-cli control shards set-mode --mode read-only --all --endpoint s01.frostfs.devenv:8081 --wallet ./../frostfs-dev-env/services/storage/wallet01.json:
blobstore2
blobstore3
blobstore4
blobstore5

move shards back to read-write mode:
blobstore6

Signed-off-by: Ekaterina Lebedeva ekaterina.lebedeva@yadro.com

Close #1055 It used to always show CLOSED after setting shard mode to read-only regardless of actual mode. Now metric represents actual blobstor mode of operations. blobstor mode right after node is up: ![blobstore1](/attachments/7ae7d7fa-a4e3-435f-8ae7-a8b4575cb4c8) blobstor mode after executing `frostfs-cli control shards set-mode --mode read-only --all --endpoint s01.frostfs.devenv:8081 --wallet ./../frostfs-dev-env/services/storage/wallet01.json`: ![blobstore2](/attachments/b2548163-4c78-4b41-8425-698a2ab5ad2e) ![blobstore3](/attachments/890aa913-c6b0-4ca7-99a2-8f0edade7fd8) ![blobstore4](/attachments/b6e8b34f-7416-4f27-b670-6bf9a2f97d88) ![blobstore5](/attachments/4676d724-35be-40e0-b1da-d84f701f44ad) move shards back to `read-write` mode: ![blobstore6](/attachments/703104f1-6913-444f-8876-1fc6b444aa87) Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
elebedeva added 1 commit 2024-03-28 13:29:39 +00:00
DCO action / DCO (pull_request) Successful in 1m53s Details
Build / Build Components (1.21) (pull_request) Successful in 2m52s Details
Vulncheck / Vulncheck (pull_request) Successful in 3m26s Details
Build / Build Components (1.20) (pull_request) Successful in 4m26s Details
Tests and linters / Staticcheck (pull_request) Successful in 6m54s Details
Tests and linters / Lint (pull_request) Successful in 8m48s Details
Tests and linters / gopls check (pull_request) Successful in 8m31s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 12m13s Details
Tests and linters / Tests (1.21) (pull_request) Successful in 12m46s Details
Tests and linters / Tests with -race (pull_request) Successful in 13m26s Details
ef55443cf8
[#1055] blobstor: fix mode metric
It used to always show CLOSED after setting shard mode
to read-only regardless of actual mode.
Now metric represents actual blobstor mode of operations.

Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
elebedeva requested review from storage-core-committers 2024-03-28 13:29:59 +00:00
elebedeva requested review from storage-core-developers 2024-03-28 13:30:01 +00:00
fyrchik approved these changes 2024-03-28 14:40:31 +00:00
fyrchik reviewed 2024-03-28 14:40:47 +00:00
@ -31,5 +31,6 @@ func (b *BlobStor) SetMode(m mode.Mode) error {
}
b.mode = m
b.metrics.SetMode(m.ReadOnly())

Have you checked, are metrics always non-nil?

Have you checked, are `metrics` always non-nil?
dstepanov-yadro approved these changes 2024-03-29 06:22:52 +00:00
acid-ant approved these changes 2024-03-29 06:43:16 +00:00
fyrchik merged commit 0990a9b0bd into master 2024-03-29 20:44:48 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No Milestone
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#1060
There is no content yet.