fuse/metrics: add mountpoint metrics for ossfs#1544
Conversation
0231f81 to
82002c5
Compare
82002c5 to
888b3fc
Compare
888b3fc to
00f09e8
Compare
| type MonitorState int | ||
|
|
||
| const ( | ||
| MonitorStateInitialized MonitorState = iota |
There was a problem hiding this comment.
I think we lack the necessary monitor state here. At least we also have a terminating monitor state.
There was a problem hiding this comment.
Monitor will be terminated only when the mount-proxy mounter get a SIGTERM, so I ignore the terminating state. When the ossfs exits, handleMountResult func will lock and set the state to MonitorStateInitialized and stop the regularly checkAndUpdateMountStatus overwriting the last exit reason.
There was a problem hiding this comment.
That means if user constantly create and mount new volumes on a node, we will have unbounded number of monitors?
e021e6b to
58ba8e7
Compare
| monitor.HandleMountSuccess(cmd) | ||
| // Start monitoring goroutine (ticker based only) | ||
| h.monitorManager.StartMonitoring(target) |
There was a problem hiding this comment.
Can we merge StartMonitoring into HandleMountSuccess? They seems always be called together.
There was a problem hiding this comment.
it works, and HandleMountSucess will be a function of monitor-manager, and HandleMountFailure is a function of monitor (or else find it in the sync.map everytime), it seems a little strange...
c81dac6 to
4a62007
Compare
4a62007 to
7b8b132
Compare
7b8b132 to
34319bd
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AlbeeSo, mowangdk The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Add mountpoint status metrics for ossfs:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: