train
train copied to clipboard
UUID not detected for some platforms
I've noticed this warning today while executing inspec version 2.2.61
on the following targets:
$ be inspec detect -t docker://4a1ddd19127e
== Platform Details
Name: ubuntu
Families: debian, linux, unix, os
Release: 14.04
Arch: x86_64
$ inspec exec ~/git/mycompliance-profile/mylinux.tar.gz -t docker://4a1ddd19127e
[2018-08-10T15:23:33+01:00] WARN: Cannot find a UUID for your node.
...
$ inspec detect -t ssh://[email protected]
== Platform Details
Name: centos
Families: redhat, linux, unix, os
Release: 6.8
Arch: x86_64
$ inspec exec ~/git/mycompliance-profile/mylinux.tar.gz -t ssh://[email protected]
[2018-08-10T15:22:18+01:00] WARN: Cannot find a UUID for your node.
...
I'm wondering if we should think about writing a uuid to ./inspec
if one cannot be found.
We probably need to write this in a global directory. Otherwise we end up generating different ids for the same server
For docker container, we should also consider using the container id as an identifier:
[root@7a9c9f3f0915 /]# cat /proc/1/cgroup
13:name=systemd:/docker/7a9c9f3f091585e0374344a52e25df43961373a192663e320f6a5e46646a7317
12:pids:/docker/7a9c9f3f091585e0374344a52e25df43961373a192663e320f6a5e46646a7317
11:hugetlb:/docker/7a9c9f3f091585e0374344a52e25df43961373a192663e320f6a5e46646a7317
10:net_prio:/docker/7a9c9f3f091585e0374344a52e25df43961373a192663e320f6a5e46646a7317
9:perf_event:/docker/7a9c9f3f091585e0374344a52e25df43961373a192663e320f6a5e46646a7317
8:net_cls:/docker/7a9c9f3f091585e0374344a52e25df43961373a192663e320f6a5e46646a7317
7:freezer:/docker/7a9c9f3f091585e0374344a52e25df43961373a192663e320f6a5e46646a7317
6:devices:/docker/7a9c9f3f091585e0374344a52e25df43961373a192663e320f6a5e46646a7317
5:memory:/docker/7a9c9f3f091585e0374344a52e25df43961373a192663e320f6a5e46646a7317
4:blkio:/docker/7a9c9f3f091585e0374344a52e25df43961373a192663e320f6a5e46646a7317
3:cpuacct:/docker/7a9c9f3f091585e0374344a52e25df43961373a192663e320f6a5e46646a7317
2:cpu:/docker/7a9c9f3f091585e0374344a52e25df43961373a192663e320f6a5e46646a7317
1:cpuset:/docker/7a9c9f3f091585e0374344a52e25df43961373a192663e320f6a5e46646a7317
we could add this to the docker transport as a unique id pretty easy
wondering if it's the same issue related to #341
Was there a solution found for this?
I am running GitLab CI and encountering this issue. I am running it locally against the container itself.
update: only way found to make it atleast not pass a bad UUID failure is to do:
inspec exec profile --reporter=cli json:destfolder/file.json
for those that have the same issue as i did