Wrong shardID in write_cache metrics #948

Closed
opened 2024-01-31 15:05:20 +00:00 by anikeev-yadro · 3 comments

Expected Behavior

ShardID in write_cache metrics should be actual.

Current Behavior

Wrong shardID in write_cache metrics

Steps to Reproduce (for bugs)

  1. Load objects to system
  2. Get shards list
root@acidrock-node3:~# sudo frostfs-cli --endpoint 127.0.0.1:8091 -w /etc/frostfs/storage/wallet.json --config /tmp/storage.yaml control shards list |grep Shard
Shard 2b2YD4bD9PRxFxyzHAhts9:
Shard 36GWtTpmrysnEbVg6W9DeY:
Shard 57tq8ASxdQfz7U2mbPiGSS:
Shard 5ucn5La3mgb5X56CRdD2vi:
Shard 7Bp81xgzjXjb9aZaye1NaY:
Shard 9iEZkF2baYX3vYXhZy8RAn:
Shard ALFPBFPL5DJGH3CdawtEJ6:
Shard CkTWM7dZHX8VJ27zytDZ7s:
Shard DKWL6gS9Rud2weL677pE7B:
Shard Jm2CDQFxLEx5Crx5dLgVLQ:
Shard SF3GFXQuiSFjhLby2jw3x5:
Shard WBqmYHpikU885KR7bTYWmx:
  1. Get write_cache metrics
service@acidrock-node3:~$ curl -s localhost:6672 | grep frostfs_node_writecache_actual_objects_total
# HELP frostfs_node_writecache_actual_objects_total Actual objects count in writecache
# TYPE frostfs_node_writecache_actual_objects_total gauge
frostfs_node_writecache_actual_objects_total{shard_id="8iGfU7isckfx955JymebgF",storage="db"} 0
frostfs_node_writecache_actual_objects_total{shard_id="8iGfU7isckfx955JymebgF",storage="fstree"} 0
frostfs_node_writecache_actual_objects_total{shard_id="9keJuCxVGeT6RRKhL64tPf",storage="db"} 0
frostfs_node_writecache_actual_objects_total{shard_id="9keJuCxVGeT6RRKhL64tPf",storage="fstree"} 0
frostfs_node_writecache_actual_objects_total{shard_id="AoUGTA2St7hnSgsWR2piDb",storage="db"} 0
frostfs_node_writecache_actual_objects_total{shard_id="AoUGTA2St7hnSgsWR2piDb",storage="fstree"} 0
frostfs_node_writecache_actual_objects_total{shard_id="CbRYuBY6fQQBfCz8nXa3P8",storage="db"} 0
frostfs_node_writecache_actual_objects_total{shard_id="CbRYuBY6fQQBfCz8nXa3P8",storage="fstree"} 0
frostfs_node_writecache_actual_objects_total{shard_id="FDg785WYwBoW8cVEUMz8dh",storage="db"} 0
frostfs_node_writecache_actual_objects_total{shard_id="FDg785WYwBoW8cVEUMz8dh",storage="fstree"} 0
frostfs_node_writecache_actual_objects_total{shard_id="MNdpKFc27B19QMJ5tNek2t",storage="db"} 0
frostfs_node_writecache_actual_objects_total{shard_id="MNdpKFc27B19QMJ5tNek2t",storage="fstree"} 0
frostfs_node_writecache_actual_objects_total{shard_id="NFPPgeEwfRMFwzfJLHF92u",storage="db"} 0
frostfs_node_writecache_actual_objects_total{shard_id="NFPPgeEwfRMFwzfJLHF92u",storage="fstree"} 0
frostfs_node_writecache_actual_objects_total{shard_id="RgBH9fQVGCiHba2ayrFVfh",storage="db"} 0
frostfs_node_writecache_actual_objects_total{shard_id="RgBH9fQVGCiHba2ayrFVfh",storage="fstree"} 0
frostfs_node_writecache_actual_objects_total{shard_id="S92ymKDcqHyjv1EB9UT7Pq",storage="db"} 0
frostfs_node_writecache_actual_objects_total{shard_id="S92ymKDcqHyjv1EB9UT7Pq",storage="fstree"} 1
frostfs_node_writecache_actual_objects_total{shard_id="VFZStpQoxrrk4BmeCX3bo5",storage="db"} 0
frostfs_node_writecache_actual_objects_total{shard_id="VFZStpQoxrrk4BmeCX3bo5",storage="fstree"} 0
frostfs_node_writecache_actual_objects_total{shard_id="WJ2bwYKp1fE3ni4SVNMUkn",storage="db"} 0
frostfs_node_writecache_actual_objects_total{shard_id="WJ2bwYKp1fE3ni4SVNMUkn",storage="fstree"} 1
frostfs_node_writecache_actual_objects_total{shard_id="WpciPW28k4dzDBYMwehDgg",storage="db"} 0
frostfs_node_writecache_actual_objects_total{shard_id="WpciPW28k4dzDBYMwehDgg",storage="fstree"} 0
  1. See that metrics have not actual shard IDs

Regression

No

Version

FrostFS Storage node
Version: v0.37.0-rc.1-236-g675eec91
GoVersion: go1.20.1

Your Environment

Virtual
4 nodes

## Expected Behavior ShardID in write_cache metrics should be actual. ## Current Behavior Wrong shardID in write_cache metrics ## Steps to Reproduce (for bugs) 1. Load objects to system 2. Get shards list ``` root@acidrock-node3:~# sudo frostfs-cli --endpoint 127.0.0.1:8091 -w /etc/frostfs/storage/wallet.json --config /tmp/storage.yaml control shards list |grep Shard Shard 2b2YD4bD9PRxFxyzHAhts9: Shard 36GWtTpmrysnEbVg6W9DeY: Shard 57tq8ASxdQfz7U2mbPiGSS: Shard 5ucn5La3mgb5X56CRdD2vi: Shard 7Bp81xgzjXjb9aZaye1NaY: Shard 9iEZkF2baYX3vYXhZy8RAn: Shard ALFPBFPL5DJGH3CdawtEJ6: Shard CkTWM7dZHX8VJ27zytDZ7s: Shard DKWL6gS9Rud2weL677pE7B: Shard Jm2CDQFxLEx5Crx5dLgVLQ: Shard SF3GFXQuiSFjhLby2jw3x5: Shard WBqmYHpikU885KR7bTYWmx: ``` 3. Get write_cache metrics ``` service@acidrock-node3:~$ curl -s localhost:6672 | grep frostfs_node_writecache_actual_objects_total # HELP frostfs_node_writecache_actual_objects_total Actual objects count in writecache # TYPE frostfs_node_writecache_actual_objects_total gauge frostfs_node_writecache_actual_objects_total{shard_id="8iGfU7isckfx955JymebgF",storage="db"} 0 frostfs_node_writecache_actual_objects_total{shard_id="8iGfU7isckfx955JymebgF",storage="fstree"} 0 frostfs_node_writecache_actual_objects_total{shard_id="9keJuCxVGeT6RRKhL64tPf",storage="db"} 0 frostfs_node_writecache_actual_objects_total{shard_id="9keJuCxVGeT6RRKhL64tPf",storage="fstree"} 0 frostfs_node_writecache_actual_objects_total{shard_id="AoUGTA2St7hnSgsWR2piDb",storage="db"} 0 frostfs_node_writecache_actual_objects_total{shard_id="AoUGTA2St7hnSgsWR2piDb",storage="fstree"} 0 frostfs_node_writecache_actual_objects_total{shard_id="CbRYuBY6fQQBfCz8nXa3P8",storage="db"} 0 frostfs_node_writecache_actual_objects_total{shard_id="CbRYuBY6fQQBfCz8nXa3P8",storage="fstree"} 0 frostfs_node_writecache_actual_objects_total{shard_id="FDg785WYwBoW8cVEUMz8dh",storage="db"} 0 frostfs_node_writecache_actual_objects_total{shard_id="FDg785WYwBoW8cVEUMz8dh",storage="fstree"} 0 frostfs_node_writecache_actual_objects_total{shard_id="MNdpKFc27B19QMJ5tNek2t",storage="db"} 0 frostfs_node_writecache_actual_objects_total{shard_id="MNdpKFc27B19QMJ5tNek2t",storage="fstree"} 0 frostfs_node_writecache_actual_objects_total{shard_id="NFPPgeEwfRMFwzfJLHF92u",storage="db"} 0 frostfs_node_writecache_actual_objects_total{shard_id="NFPPgeEwfRMFwzfJLHF92u",storage="fstree"} 0 frostfs_node_writecache_actual_objects_total{shard_id="RgBH9fQVGCiHba2ayrFVfh",storage="db"} 0 frostfs_node_writecache_actual_objects_total{shard_id="RgBH9fQVGCiHba2ayrFVfh",storage="fstree"} 0 frostfs_node_writecache_actual_objects_total{shard_id="S92ymKDcqHyjv1EB9UT7Pq",storage="db"} 0 frostfs_node_writecache_actual_objects_total{shard_id="S92ymKDcqHyjv1EB9UT7Pq",storage="fstree"} 1 frostfs_node_writecache_actual_objects_total{shard_id="VFZStpQoxrrk4BmeCX3bo5",storage="db"} 0 frostfs_node_writecache_actual_objects_total{shard_id="VFZStpQoxrrk4BmeCX3bo5",storage="fstree"} 0 frostfs_node_writecache_actual_objects_total{shard_id="WJ2bwYKp1fE3ni4SVNMUkn",storage="db"} 0 frostfs_node_writecache_actual_objects_total{shard_id="WJ2bwYKp1fE3ni4SVNMUkn",storage="fstree"} 1 frostfs_node_writecache_actual_objects_total{shard_id="WpciPW28k4dzDBYMwehDgg",storage="db"} 0 frostfs_node_writecache_actual_objects_total{shard_id="WpciPW28k4dzDBYMwehDgg",storage="fstree"} 0 ``` 4. See that metrics have not actual shard IDs ## Regression No ## Version ``` FrostFS Storage node Version: v0.37.0-rc.1-236-g675eec91 GoVersion: go1.20.1 ``` ## Your Environment Virtual 4 nodes
anikeev-yadro added the
bug
triage
labels 2024-01-31 15:05:20 +00:00

Suggest to add path of the write_cache to metric labels. It will be more informative.
As example

# HELP frostfs_node_fstree_mode FSTree mode value
# TYPE frostfs_node_fstree_mode gauge
frostfs_node_fstree_mode{mode="READ_WRITE",path="/srv/frostfs/data0",shard_id="DKWL6gS9Rud2weL677pE7B"} 1
frostfs_node_fstree_mode{mode="READ_WRITE",path="/srv/frostfs/data1",shard_id="36GWtTpmrysnEbVg6W9DeY"} 1
frostfs_node_fstree_mode{mode="READ_WRITE",path="/srv/frostfs/data10",shard_id="WBqmYHpikU885KR7bTYWmx"} 1
Suggest to add path of the write_cache to metric labels. It will be more informative. As example ``` # HELP frostfs_node_fstree_mode FSTree mode value # TYPE frostfs_node_fstree_mode gauge frostfs_node_fstree_mode{mode="READ_WRITE",path="/srv/frostfs/data0",shard_id="DKWL6gS9Rud2weL677pE7B"} 1 frostfs_node_fstree_mode{mode="READ_WRITE",path="/srv/frostfs/data1",shard_id="36GWtTpmrysnEbVg6W9DeY"} 1 frostfs_node_fstree_mode{mode="READ_WRITE",path="/srv/frostfs/data10",shard_id="WBqmYHpikU885KR7bTYWmx"} 1 ```
fyrchik added the
frostfs-node
label 2024-01-31 17:14:54 +00:00
fyrchik added this to the v0.38.0 milestone 2024-01-31 17:14:56 +00:00
fyrchik removed the
triage
label 2024-01-31 17:15:01 +00:00

If easier, lets add path in a separate task, it is not a bug.

If easier, lets add path in a separate task, it is not a bug.

If easier, lets add path in a separate task, it is not a bug.

#966

> If easier, lets add path in a separate task, it is not a bug. https://git.frostfs.info/TrueCloudLab/frostfs-node/issues/966
acid-ant was assigned by fyrchik 2024-02-12 06:26:04 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 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#948
There is no content yet.