This commit is contained in:
Markus 2025-08-07 15:48:52 +02:00 committed by GitHub
commit 89dbf7cf1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -132,6 +132,11 @@ func (c *filesystemCollector) processStat(labels filesystemLabels) filesystemSta
}
stuckMountsMtx.Unlock()
// Remove options from labels because options will not be used from this point forward
// and keeping them can lead to errors when the same device is mounted to the same mountpoint
// twice, with different options (metrics would be recorded multiple times).
labels.options = ""
if err != nil {
labels.deviceError = err.Error()
c.logger.Debug("Error on statfs() system call", "rootfs", rootfsFilePath(labels.mountPoint), "err", err)