summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhus Lu <phus.lu@citrix.com>2015-05-19 19:21:06 +0800
committerPhus Lu <phus.lu@citrix.com>2015-05-19 19:29:00 +0800
commitb2204b0f93db38ea7f8eaa658d1bab4c49e78d79 (patch)
tree8eaf1ae94b0e458f36f634206183e2556e4f0b05
parent2fb5afbd442e35a6e0ba3bd57a04e0bd58c7c213 (diff)
downloadvyos-xe-guest-utilities-b2204b0f93db38ea7f8eaa658d1bab4c49e78d79.tar.gz
vyos-xe-guest-utilities-b2204b0f93db38ea7f8eaa658d1bab4c49e78d79.zip
CP-11399: Ignore blkid errors
Signed-off-by: Phus Lu <phus.lu@citrix.com>
-rw-r--r--guestmetric/guestmetric_linux.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/guestmetric/guestmetric_linux.go b/guestmetric/guestmetric_linux.go
index 3970da4..19baeb6 100644
--- a/guestmetric/guestmetric_linux.go
+++ b/guestmetric/guestmetric_linux.go
@@ -100,7 +100,7 @@ func EnumNetworkAddresses(iface string) (GuestMetric, error) {
v4re = IFCONFIG_IPV4_ADDR_RE
v6re = IFCONFIG_IPV6_ADDR_RE
} else {
- return nil, fmt.Errorf("Cannot found ip/ifconfig command")
+ return nil, fmt.Errorf("Cannot find ip/ifconfig command")
}
m := v4re.FindAllStringSubmatch(out, -1)
@@ -204,7 +204,8 @@ func (c *Collector) CollectDisk() (GuestMetric, error) {
name := path
blkid, err := runCmd("blkid", "-s", "UUID", path)
if err != nil {
- return nil, err
+ // ignore blkid errors
+ blkid = ""
}
if strings.Contains(blkid, "=") {
parts := strings.SplitN(strings.TrimSpace(blkid), "=", 2)