cloudviz / agentless-system-crawler

A tool to crawl systems like crawlers for the web
Apache License 2.0
116 stars 44 forks source link

Failure to make os feature for specified os #353

Open tatsuhirochiba opened 6 years ago

tatsuhirochiba commented 6 years ago

Description

Crawler can not make os feature for specified os image, that is because os_utils.py expects to get os name and os version simultaneously. Crawler retrieves os related info from distribution dependent file (such as /etc/lsb-release and /etc/os-release), but distribution dependent file does not often contain mandatory info that we expect. Especially in debian testing & unstable version (i.e. debian/buster/sid), os version info is missing.

How to Reproduce

We can reproduce it by using tomcat:9.0 and debian:latest. tomcat:9.0 builds on top of debian unstable release, and debian:latest builds on top of debian stable release.

root@19161a41c6d0:/usr/local/tomcat# cat /etc/os-release PRETTY_NAME="Debian GNU/Linux buster/sid" NAME="Debian GNU/Linux" ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"


* debian:latest (`VERSION_ID` exists)

root@host:~# docker run -it debian:latest

root@a52168c9ac1a:/# cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 9 (stretch)" NAME="Debian GNU/Linux" VERSION_ID="9" VERSION="9 (stretch)" ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"


## Log Output
<!-- Include or upload the contents of the crawler-*.log files that show the issue -->

## Debugging Commands Output
<!-- Include the output of the following commands to help us debug your issue -->
**Output of `docker version`:**

(paste your output here)


**Output of `docker info`:**

(paste your output here)


**Output of `python --version`:**

(paste your output here)


**Output of `pip freeze`:**

(paste your output here)