Open zonggen opened 4 years ago
Currently in main.rs
the collected ignition platform id
will be printed to the console, which will be updated later to be bundled with other data and sent to the remote endpoint.
Also, this PR will be updated to resolve https://github.com/coreos/fedora-coreos-pinger/issues/30#issue-494138139
UPDATE:
os-release.rs
under identity to extract OS version from /etc/os-release
Note: Most portion of code is the same as platform.rs
so in the future, towards the end of this PR should de-duplicate this part of code into a new utils
helper module.
STATUS:
Currently Travis CI is failing since it is using Rust docker image which is based on Debian and it does not ship with lsmem
, and lscpu
does not contain an --json
option.
To test with more production-like environment, i.e. FCOS, it might be better to switch to UBI (https://www.redhat.com/en/blog/introducing-red-hat-universal-base-image). Will be updating with changes to see if it works.
EDIT:
.travis.tml
to use build a container using Dockerfile
and test the code inside the UBI containerSTATUS:
STATUS:
send_data()
function is not doing anything other than printing the collected data in Json format. This needs to be updated after we have an actual endpoint.Overall, ready for review!
STATUS:
cc @lucab @bgilbert
Is this something we want to continue pursuing?
Maybe not; xref https://github.com/coreos/fedora-coreos-tracker/issues/770.
Source of truth for each part of data collected:
/proc/cmdline
rpm-ostree status --json
/.coreos-aleph-version.json
/run/metadata/afterburn
lsblk --fs --json
lscpu --json
lsmem --json
nmcli device show
pgrep podman
pgrep conmon | wc -l
pgrep dockerd
pgrep containerd-shim | wc -l
pgrep crio
pgrep crictl | wc -l
pgrep systemd-nspawn
Signed-off-by: Allen Bai, abai@redhat.com