gohai icon indicating copy to clipboard operation
gohai copied to clipboard

Trying to run on an android.

Open yonderblue opened this issue 6 years ago • 0 comments

Looks like right here the return var is used even when err != nil in which case the map is nil. https://github.com/DataDog/gohai/blob/60e13eaed98afa238ad6dfc98224c04fbb7b19b1/platform/platform_common.go#L35

Cross compiling like GOOS=android GOARCH=arm GOARM=7 CGO_ENABLED=1 invoke agent.build --puppy.

...

2018-06-01 01:25:49 UTC | INFO | (processes.go:16 in getProcesses) | Error fetching info for pid 29644: user: LookupId not implemented on android
seelog internal error: mkdir /var: read-only file system
2018-06-01 01:25:49 UTC | ERROR | (gohai.go:40 in getGohaiInfo) | Failed to retrieve filesystem metadata: df failed to collect filesystem data: exit status 1
seelog internal error: mkdir /var: read-only file system
2018-06-01 01:25:49 UTC | INFO | (runner.go:149 in Stop) | Runner is shutting down...
seelog internal error: mkdir /var: read-only file system
2018-06-01 01:25:49 UTC | INFO | (domain_forwarder.go:174 in Stop) | domainForwarder stopped
seelog internal error: mkdir /var: read-only file system
2018-06-01 01:25:49 UTC | INFO | (start.go:322 in StopAgent) | See ya!
seelog internal error: mkdir /var: read-only file system
panic: assignment to entry in nil map

goroutine 1 [running]:
github.com/DataDog/datadog-agent/vendor/github.com/DataDog/gohai/platform.getPlatformInfo(0xbc454e80, 0x0, 0x0)
	/go/src/github.com/DataDog/datadog-agent/vendor/github.com/DataDog/gohai/platform/platform_common.go:35 +0xd4
github.com/DataDog/datadog-agent/vendor/github.com/DataDog/gohai/platform.(*Platform).Collect(0xbc505be4, 0xab58e050, 0xbc454e80, 0x0, 0x0)
	/go/src/github.com/DataDog/datadog-agent/vendor/github.com/DataDog/gohai/platform/platform_common.go:20 +0x14
github.com/DataDog/datadog-agent/pkg/metadata/gohai.getGohaiInfo(0xab9507f1)
	/go/src/github.com/DataDog/datadog-agent/pkg/metadata/gohai/gohai.go:57 +0x1e4

...

yonderblue avatar Jun 01 '18 01:06 yonderblue