Skip to content

Commit

Permalink
Address incorrect table metric value for local mounts (#14755)
Browse files Browse the repository at this point in the history
* Address incorrect table metric value for local mounts

 - Reported within issue #14750 as a panic, it was identified that
   we were using the wrong value for local mounts within the table metrics.

* Add changelog
  • Loading branch information
stevendpclark committed Mar 30, 2022
1 parent 06372c4 commit 3ee872e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelog/14755.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
core/metrics: Fix incorrect table size metric for local mounts
```
2 changes: 1 addition & 1 deletion vault/mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ func (c *Core) loadMounts(ctx context.Context) error {
return err
}
if localMountTable != nil && len(localMountTable.Entries) > 0 {
c.tableMetrics(len(localMountTable.Entries), true, false, raw.Value)
c.tableMetrics(len(localMountTable.Entries), true, false, rawLocal.Value)
c.mounts.Entries = append(c.mounts.Entries, localMountTable.Entries...)
}
}
Expand Down

0 comments on commit 3ee872e

Please sign in to comment.