Commit Graph

5 Commits

Author SHA1 Message Date
Niels de Vos
2b9c81b87d Add helper functions for Block volume Capacity detection
Similar to how NewMetricsStatFS() works, the new NewMetricsBlock()
provides the GetMetrics() interface for Block volumes.

Additional metrics for Block volumes are difficult to gather. There is
no guarantee that there is a filesystem on the volume, which makes most
of the volume metrics useless.

Advanced storage might be able to detect the actual consumption (when
thin-provisioned) vs the capacity. However, this is out of the scope for
a standard helper function and requires intimate knowledge of the used
storage system.
2021-05-20 16:37:12 +02:00
Kubernetes Prow Robot
0e3b593ded
Merge pull request #79851 from jparklab/master
Fix nil pointer dereference error in volume_stat_calculator
2019-07-25 14:33:58 -07:00
Humble Chirammal
3ccaeef758 Remove unwanted string converstion in metrics errors
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2019-07-19 11:29:47 +05:30
Ji-Young Park
528521cfae Return MetricsError with ErrCodeNotSupported code
GetMetrics function expects MetricsError error
with ErrCodeNotSupported code when driver for the volume
does not support metrics
Updated csi_metrics to return error when underlying csi
driver does not have GET_VOLUME_STATS capability
2019-07-06 10:49:06 -04:00
Angus Salkeld
a1b2fcb10f Disambiguate unsupported metrics from metrics errors 2016-09-15 10:05:30 +10:00