Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netdata does not detect pkg-config under automated install #6405

Closed
rtkjliviero opened this issue Jul 8, 2019 · 18 comments
Closed

Netdata does not detect pkg-config under automated install #6405

rtkjliviero opened this issue Jul 8, 2019 · 18 comments
Assignees
Labels
area/packaging Packaging and operating systems support bug
Milestone

Comments

@rtkjliviero
Copy link

Bug report summary

netdata fails to install in an automated context - using chef in this case. However, if the same command is run by hand, installation is successful. Below is a snippet of the output from the failure case:

    [execute] System            : Linux
              Operating System  : GNU/Linux
              Machine           : x86_64
              BASH major version:
               --- Downloading script to detect required packages... ---
              [/tmp/netdata-kickstart-glnd2m]# curl -sSL --connect-timeout 10 --retry 3 https://raw.githubusercontent.com/netdata/netdata-demo-site/master/install-required-packages.sh
               OK

               --- Running downloaded script to detect required packages... ---
              [/tmp/netdata-kickstart-glnd2m]# /bin/bash /tmp/netdata-kickstart-glnd2m/install-required-packages.sh --dont-wait --non-interactive netdata
              Loading /etc/os-release ...

              /etc/os-release information:
              NAME            : Ubuntu
              VERSION         : 16.04.6 LTS (Xenial Xerus)
              ID              : ubuntu
              ID_LIKE         : debian
              VERSION_ID      : 16.04

              We detected these:
              Distribution    : ubuntu
              Version         : 16.04
              Codename        : 16.04.6 LTS (Xenial Xerus)
              Package Manager : install_apt_get
              Packages Tree   : debian
              Detection Method: /etc/os-release
              Default Python v: 2

               > Checking if package 'autoconf-archive' is installed...
               > Checking if package 'zlib1g-dev' is installed...
               > Checking if package 'uuid-dev' is installed...
               > Checking if package 'libmnl-dev' is installed...
               > Checking if package 'libuv1-dev' is installed...
               > Checking if package 'liblz4-dev' is installed...
               > Checking if package 'libssl-dev' is installed...
               > Checking if package 'libjudy-dev' is installed...

              All required packages are already installed. Now proceed to the next step.

               OK

              [/tmp/netdata-kickstart-glnd2m]# curl -sSL --connect-timeout 10 --retry 3 https://api.github.com/repos/netdata/netdata/releases/latest
               OK

              [/tmp/netdata-kickstart-glnd2m]# curl -sSL --connect-timeout 10 --retry 3 https://github.com/netdata/netdata/releases/download/v1.15.0/sha256sums.txt
               OK

              [/tmp/netdata-kickstart-glnd2m]# curl -sSL --connect-timeout 10 --retry 3 https://github.com/netdata/netdata/releases/download/v1.15.0/netdata-v1.15.0.tar.gz
               OK

              [/tmp/netdata-kickstart-glnd2m]# tar -xf netdata-latest.tar.gz
               OK

               --- Installing netdata... ---
              [/tmp/netdata-kickstart-glnd2m/netdata-v1.15.0]# ./netdata-installer.sh --dont-wait

                ^
                |.-.   .-.   .-.   .-.   .  netdata
                |   '-'   '-'   '-'   '-'   real-time performance monitoring, done right!
                +----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+--->


                You are about to build and install netdata to your system.

                It will be installed at these locations:

                 - the daemon     at /usr/sbin/netdata
                 - config files   in /etc/netdata
                 - web files      in /usr/share/netdata
                 - plugins        in /usr/libexec/netdata
                 - cache files    in /var/cache/netdata
                 - db files       in /var/lib/netdata
                 - log files      in /var/log/netdata
                 - pid file       at /var/run/netdata.pid
                 - logrotate file at /etc/logrotate.d/netdata

                This installer allows you to change the installation path.
                Press Control-C and run the same command with --help for help.


               --- Run autotools to configure the build environment ---
              [/tmp/netdata-kickstart-glnd2m/netdata-v1.15.0]# autoreconf -ivf
              autoreconf: Entering directory `.'
              autoreconf: configure.ac: not using Gettext
              autoreconf: running: aclocal --force -I build/m4
              autoreconf: configure.ac: tracing
              autoreconf: configure.ac: not using Libtool
              autoreconf: running: /usr/bin/autoconf --force
              configure.ac:219: error: possibly undefined macro: AC_MSG_ERROR
                    If this token and others are legitimate, please use m4_pattern_allow.
                    See the Autoconf documentation.
              configure.ac:231: error: possibly undefined macro: AC_CHECK_LIB
              configure.ac:420: error: possibly undefined macro: AC_CHECK_HEADER
              autoreconf: /usr/bin/autoconf failed with exit status: 1
               FAILED
<snip>

And the corresponding snippet from the successful case:

System            : Linux
Operating System  : GNU/Linux
Machine           : x86_64
BASH major version:
 --- Downloading script to detect required packages... ---
[/tmp/netdata-kickstart-eXAMOt]$ curl -sSL --connect-timeout 10 --retry 3 https://raw.githubusercontent.com/netdata/netdata-demo-site/master/install-required-packages.sh
 OK

 --- Running downloaded script to detect required packages... ---
[/tmp/netdata-kickstart-eXAMOt]$ sudo /bin/bash /tmp/netdata-kickstart-eXAMOt/install-required-packages.sh --dont-wait --non-interactive netdata
Loading /etc/os-release ...

/etc/os-release information:
NAME            : Ubuntu
VERSION         : 16.04.6 LTS (Xenial Xerus)
ID              : ubuntu
ID_LIKE         : debian
VERSION_ID      : 16.04

We detected these:
Distribution    : ubuntu
Version         : 16.04
Codename        : 16.04.6 LTS (Xenial Xerus)
Package Manager : install_apt_get
Packages Tree   : debian
Detection Method: /etc/os-release
Default Python v: 2

 > Checking if package 'autoconf-archive' is installed...
 > Checking if package 'pkg-config' is installed...
 > Checking if package 'zlib1g-dev' is installed...
 > Checking if package 'uuid-dev' is installed...
 > Checking if package 'libmnl-dev' is installed...
 > Checking if package 'libuv1-dev' is installed...
 > Checking if package 'liblz4-dev' is installed...
 > Checking if package 'libssl-dev' is installed...
 > Checking if package 'libjudy-dev' is installed...

The following command will be run:

 >> IMPORTANT <<
    Please make sure your system is up to date
    by running:   apt-get update

Running in non-interactive mode
apt-get -yq install pkg-config


Running in non-interactive mode
Adding package pkg-config
apt-get -yq install pkg-config
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
  pkg-config
0 upgraded, 1 newly installed, 0 to remove and 40 not upgraded.
Need to get 45.0 kB of archives.
After this operation, 177 kB of additional disk space will be used.
Get:1 http://us-west-2.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 pkg-config amd64 0.29.1-0ubuntu1 [45.0 kB]
Fetched 45.0 kB in 0s (3909 kB/s)
Selecting previously unselected package pkg-config.
(Reading database ... 106974 files and directories currently installed.)
Preparing to unpack .../pkg-config_0.29.1-0ubuntu1_amd64.deb ...
Unpacking pkg-config (0.29.1-0ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up pkg-config (0.29.1-0ubuntu1) ...

All Done! - Now proceed to the next step.

 OK

[/tmp/netdata-kickstart-eXAMOt]$ curl -sSL --connect-timeout 10 --retry 3 https://api.github.com/repos/netdata/netdata/releases/latest
 OK

[/tmp/netdata-kickstart-eXAMOt]$ curl -sSL --connect-timeout 10 --retry 3 https://github.com/netdata/netdata/releases/download/v1.15.0/sha256sums.txt
 OK

[/tmp/netdata-kickstart-eXAMOt]$ curl -sSL --connect-timeout 10 --retry 3 https://github.com/netdata/netdata/releases/download/v1.15.0/netdata-v1.15.0.tar.gz
 OK

[/tmp/netdata-kickstart-eXAMOt]$ tar -xf netdata-latest.tar.gz
 OK

 --- Installing netdata... ---
[/tmp/netdata-kickstart-eXAMOt/netdata-v1.15.0]$ sudo ./netdata-installer.sh --dont-wait

  ^
  |.-.   .-.   .-.   .-.   .  netdata
  |   '-'   '-'   '-'   '-'   real-time performance monitoring, done right!
  +----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+--->


  You are about to build and install netdata to your system.

  It will be installed at these locations:

   - the daemon     at /usr/sbin/netdata
   - config files   in /etc/netdata
   - web files      in /usr/share/netdata
   - plugins        in /usr/libexec/netdata
   - cache files    in /var/cache/netdata
   - db files       in /var/lib/netdata
   - log files      in /var/log/netdata
   - pid file       at /var/run/netdata.pid
   - logrotate file at /etc/logrotate.d/netdata

  This installer allows you to change the installation path.
  Press Control-C and run the same command with --help for help.


 --- Run autotools to configure the build environment ---
[/tmp/netdata-kickstart-eXAMOt/netdata-v1.15.0]# autoreconf -ivf
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I build/m4
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
autoreconf: Leaving directory `.'
 OK
<snip>

Note that in the failure case, the line "Checking if 'pkg-config' is installed..." is not present; in the succesfull case, it is. The chef run can be made to succeed by pre-installing pkg-config
In both cases, the command is bash <(curl -Ss https://my-netdata.io/kickstart.sh) --dont-wait --stable-channel --no-updates

OS / Environment

Ubuntu 16.04.6 LTS (Xenial Xerus)

Netdata version (ouput of netdata -V)

netdata v1.15.0 (presumably latest stable - using kickstart install script)

Component Name

Unsure - dependency detector?

Steps To Reproduce
  • Success: run bash <(curl -Ss https://my-netdata.io/kickstart.sh) --dont-wait --stable-channel --no-updates by hand
  • Failure: add the following to a chef recipe, and run chef-client against a host:
# netdata setup
bash 'install_netdata' do
  code <<-EOH
    apt-get update
    bash <(curl -Ss https://my-netdata.io/kickstart.sh) --dont-wait --stable-channel --no-updates
    EOH
end
Expected behavior

netdata should install successfully in an automated context.

@rtkjliviero rtkjliviero added bug needs triage Issues which need to be manually labelled labels Jul 8, 2019
@paulkatsoulakis paulkatsoulakis added the area/packaging Packaging and operating systems support label Jul 8, 2019
@paulkatsoulakis paulkatsoulakis added this to the v1.17-rc1 milestone Jul 8, 2019
@paulkatsoulakis
Copy link
Contributor

paulkatsoulakis commented Jul 8, 2019

Hello @rtkjliviero, thank you for your report! Sorry to hear you bumped into problems.

Chef runs the commands as what user? Is the user's environment correct and has access to the required dependent libraries? I am not sure i can think of anything that would lead to the script to fail on a remote execution at autoreconf -ivf. I 'll see if i can get a reproduce in the meantime, still analysing your input

@rtkjliviero
Copy link
Author

Thanks for the quick response! I just ran a quick test to be sure, and chef runs the commands as root. It should have access to everything.

Note that in both the successful and unsuccessful cases, pkg-config is not installed prior to running the kickstart script.

@paulkatsoulakis
Copy link
Contributor

Thanks for the quick response! I just ran a quick test to be sure, and chef runs the commands as root. It should have access to everything.

Note that in both the successful and unsuccessful cases, pkg-config is not installed prior to running the kickstart script.

yep, we are installing pkg-config as required. It is very peculiar.

@paulkatsoulakis
Copy link
Contributor

Can you confirm whether you are running on the exact same host setup with the exact same packages both cases?

@paulkatsoulakis
Copy link
Contributor

@rtkjliviero There must be something different on the core packages like gcc, pkg config or auto-conf between those two hosts. Could you provide more details on the packages installed before running the script on both cases? Is that feasible? Because now that you already run the script once, packages should be already installed

@paulkatsoulakis
Copy link
Contributor

Also, could try executing this command and upload the complete output here?

bash -x <(curl -Ss https://raw.githubusercontent.com/netdata/netdata-demo-site/master/install-required-packages.sh) --non-interactive --dont-wait netdata

Note: Dont forget to remove any sensitive information you might notice on the output, if any

@paulkatsoulakis
Copy link
Contributor

bump @rtkjliviero, any luck ?

@rtkjliviero
Copy link
Author

Thanks for checking in @paulkatsoulakis!

Can you confirm whether you are running on the exact same host setup with the exact same packages both cases?

Definitely. I have:

  1. run the install command by hand on a freshly deployed host (success), then
  2. destroyed the host and re-deployed with the same configuration, then,
  3. run the install command via chef (failure)
    ...as well as doing it in the reverse order.

There must be something different on the core packages like gcc, pkg config or auto-conf between those two hosts. Could you provide more details on the packages installed before running the script on both cases? Is that feasible? Because now that you already run the script once, packages should be already installed

I have run the commands on the same host as well (one example given above), so there should be no difference between the packages. That said, I can still collect the information just to double-check. Do you want information on a subset, or a full inventory (e.g. dpkg -l)?

Also, could try executing this command and upload the complete output here?

At the moment I can't, but I can do that tomorrow!

@paulkatsoulakis
Copy link
Contributor

At the moment I can't, but I can do that tomorrow!

Cool, yes please do @rtkjliviero because i am very curious to see what is happening with Chef and i can't have a playground for Chef at the moment

@paulkatsoulakis
Copy link
Contributor

Hello @rtkjliviero, got anything?

@paulkatsoulakis paulkatsoulakis removed the needs triage Issues which need to be manually labelled label Jul 11, 2019
@rtkjliviero
Copy link
Author

That commands completes successfully under chef:

Recipe: netdat_test::default
  * bash[install_netdata] action run[2019-07-11T14:05:57+00:00] INFO: Processing bash[install_netdata] action run (netdata_test::default line 24)

    [execute] Hit:1 http://us-west-2.ec2.archive.ubuntu.com/ubuntu xenial InRelease
              Get:2 http://us-west-2.ec2.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
              Get:3 http://us-west-2.ec2.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
              Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
              Fetched 325 kB in 0s (389 kB/s)
              Reading package lists...
              + export PATH=/home/jliviero/bin:/home/jliviero/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/chef/embedded/bin:/opt/chef/embedded/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
              + PATH=/home/jliviero/bin:/home/jliviero/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/chef/embedded/bin:/opt/chef/embedded/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
              + export LC_ALL=C
              + LC_ALL=C
              + renice 19 12968
              + ME=/dev/fd/63
              + '[' 4 -lt 4 ']'
              + PACKAGES_NETDATA=0
              + PACKAGES_NETDATA_NODEJS=0
              + PACKAGES_NETDATA_PYTHON=0
              + PACKAGES_NETDATA_PYTHON3=0
              + PACKAGES_NETDATA_PYTHON_MYSQL=0
              + PACKAGES_NETDATA_PYTHON_POSTGRES=0
              + PACKAGES_NETDATA_PYTHON_MONGO=0
              + PACKAGES_DEBUG=0
              + PACKAGES_IPRANGE=0
              + PACKAGES_FIREHOL=0
              + PACKAGES_FIREQOS=0
              + PACKAGES_UPDATE_IPSETS=0
              + PACKAGES_NETDATA_DEMO_SITE=0
              + PACKAGES_NETDATA_SENSORS=0
              + PACKAGES_NETDATA_DATABASE=0
              ++ which lsb_release
              + lsb_release=/usr/bin/lsb_release
              ++ which apk
              ++ command -v apk
              + apk=
              ++ which apt-get
              + apt_get=/usr/bin/apt-get
              ++ which dnf
              ++ command -v dnf
              + dnf=
              ++ which emerge
              ++ command -v emerge
              + emerge=
              ++ which equo
              ++ command -v equo
              + equo=
              ++ which pacman
              ++ command -v pacman
              + pacman=
              ++ which yum
              ++ command -v yum
              + yum=
              ++ which zypper
              ++ command -v zypper
              + zypper=
              + distribution=
              + version=
              + codename=
              + package_installer=
              + tree=
              + detection=
              + NAME=
              + ID=
              + ID_LIKE=
              + VERSION=
              + VERSION_ID=
              + pkg_find=(['fedora']="findutils" ['default']="WARNING|")
              + declare -A pkg_find
              + pkg_distro_sdk=(['alpine']="alpine-sdk" ['default']="NOTREQUIRED")
              + declare -A pkg_distro_sdk
              + pkg_autoconf=(['gentoo']="sys-devel/autoconf" ['default']="autoconf")
              + declare -A pkg_autoconf
              + pkg_autoconf_archive=(['gentoo']="sys-devel/autoconf-archive" ['alpine']="WARNING|" ['default']="autoconf-archive" ['centos-6']="WARNING|" ['rhel-6']="WARNING|" ['rhel-7']="WARNING|")
              + declare -A pkg_autoconf_archive
              + pkg_autogen=(['gentoo']="sys-devel/autogen" ['alpine']="WARNING|" ['default']="autogen" ['centos-6']="WARNING|" ['rhel-6']="WARNING|" ['ubuntu-18']="WARNING|")
              + declare -A pkg_autogen
              + pkg_automake=(['gentoo']="sys-devel/automake" ['default']="automake")
              + declare -A pkg_automake
              + pkg_bridge_utils=(['gentoo']="net-misc/bridge-utils" ['default']="bridge-utils")
              + declare -A pkg_bridge_utils
              + pkg_chrony=(['default']="chrony")
              + declare -A pkg_chrony
              + pkg_curl=(['gentoo']="net-misc/curl" ['sabayon']="net-misc/curl" ['default']="curl")
              + declare -A pkg_curl
              + pkg_gzip=(['default']="gzip")
              + declare -A pkg_gzip
              + pkg_tar=(['default']="tar")
              + declare -A pkg_tar
              + pkg_git=(['gentoo']="dev-vcs/git" ['default']="git")
              + declare -A pkg_git
              + pkg_gcc=(['gentoo']="sys-devel/gcc" ['default']="gcc")
              + declare -A pkg_gcc
              + pkg_gdb=(['gentoo']="sys-devel/gdb" ['default']="gdb")
              + declare -A pkg_gdb
              + pkg_iotop=(['default']="iotop")
              + declare -A pkg_iotop
              + pkg_iproute2=(['alpine']="iproute2" ['debian']="iproute2" ['gentoo']="sys-apps/iproute2" ['sabayon']="sys-apps/iproute2" ['default']="iproute" ['ubuntu-12.04']="iproute")
              + declare -A pkg_iproute2
              + pkg_ipset=(['gentoo']="net-firewall/ipset" ['default']="ipset")
              + declare -A pkg_ipset
              + pkg_jq=(['gentoo']="app-misc/jq" ['default']="jq")
              + declare -A pkg_jq
              + pkg_iptables=(['gentoo']="net-firewall/iptables" ['default']="iptables")
              + declare -A pkg_iptables
              + pkg_libz_dev=(['alpine']="zlib-dev" ['arch']="zlib" ['centos']="zlib-devel" ['debian']="zlib1g-dev" ['gentoo']="sys-libs/zlib" ['sabayon']="sys-libs/zlib" ['rhel']="zlib-devel" ['suse']="zlib-devel" ['default']="")
              + declare -A pkg_libz_dev
              + pkg_libuuid_dev=(['alpine']="util-linux-dev" ['arch']="util-linux" ['centos']="libuuid-devel" ['debian']="uuid-dev" ['gentoo']="sys-apps/util-linux" ['sabayon']="sys-apps/util-linux" ['rhel']="libuuid-devel" ['suse']="libuuid-devel" ['default']="")
              + declare -A pkg_libuuid_dev
              + pkg_libmnl_dev=(['alpine']="libmnl-dev" ['arch']="libmnl" ['centos']="libmnl-devel" ['debian']="libmnl-dev" ['gentoo']="net-libs/libmnl" ['sabayon']="net-libs/libmnl" ['rhel']="libmnl-devel" ['suse']="libmnl-devel" ['default']="")
              + declare -A pkg_libmnl_dev
              + pkg_lm_sensors=(['alpine']="lm_sensors" ['arch']="lm_sensors" ['centos']="lm_sensors" ['debian']="lm-sensors" ['gentoo']="sys-apps/lm_sensors" ['sabayon']="sys-apps/lm_sensors" ['rhel']="lm_sensors" ['suse']="sensors" ['default']="lm_sensors")
              + declare -A pkg_lm_sensors
              + pkg_logwatch=(['default']="logwatch")
              + declare -A pkg_logwatch
              + pkg_lxc=(['default']="lxc")
              + declare -A pkg_lxc
              + pkg_mailutils=(['default']="mailutils")
              + declare -A pkg_mailutils
              + pkg_make=(['gentoo']="sys-devel/make" ['default']="make")
              + declare -A pkg_make
              + pkg_netcat=(['alpine']="netcat-openbsd" ['arch']="netcat" ['centos']="nmap-ncat" ['debian']="netcat" ['gentoo']="net-analyzer/netcat" ['sabayon']="net-analyzer/gnu-netcat" ['rhel']="nmap-ncat" ['suse']="netcat-openbsd" ['default']="netcat" ['centos-6']="nc" ['rhel-6']="nc")
              + declare -A pkg_netcat
              + pkg_nginx=(['gentoo']="www-servers/nginx" ['default']="nginx")
              + declare -A pkg_nginx
              + pkg_nodejs=(['gentoo']="net-libs/nodejs" ['default']="nodejs" ['rhel-6']="WARNING|To install nodejs check: https://nodejs.org/en/download/package-manager/" ['rhel-7']="WARNING|To install nodejs check: https://nodejs.org/en/download/package-manager/" ['centos-6']="WARNING|To install nodejs check: https://nodejs.org/en/download/package-manager/" ['debian-6']="WARNING|To install nodejs check: https://nodejs.org/en/download/package-manager/" ['debian-7']="WARNING|To install nodejs check: https://nodejs.org/en/download/package-manager/")
              + declare -A pkg_nodejs
              + pkg_postfix=(['default']="postfix")
              + declare -A pkg_postfix
              + pkg_pkg_config=(['alpine']="pkgconfig" ['arch']="pkgconfig" ['centos']="pkgconfig" ['debian']="pkg-config" ['gentoo']="dev-util/pkgconfig" ['sabayon']="virtual/pkgconfig" ['rhel']="pkgconfig" ['suse']="pkg-config" ['default']="pkg-config")
              + declare -A pkg_pkg_config
              + pkg_python=(['gentoo']="dev-lang/python" ['sabayon']="dev-lang/python:2.7" ['default']="python")
              + declare -A pkg_python
              + pkg_python_mysqldb=(['alpine']="py-mysqldb" ['arch']="mysql-python" ['centos']="MySQL-python" ['debian']="python-mysqldb" ['gentoo']="dev-python/mysqlclient" ['sabayon']="dev-python/mysqlclient" ['rhel']="MySQL-python" ['suse']="python-PyMySQL" ['default']="python-mysql" ['fedora-24']="python2-mysql")
              + declare -A pkg_python_mysqldb
              + pkg_python3_mysqldb=(['alpine']="WARNING|" ['arch']="WARNING|" ['centos']="WARNING|" ['debian']="python3-mysqldb" ['gentoo']="dev-python/mysqlclient" ['sabayon']="dev-python/mysqlclient" ['rhel']="WARNING|" ['suse']="WARNING|" ['default']="WARNING|" ['debian-6']="WARNING|" ['debian-7']="WARNING|" ['debian-8']="WARNING|" ['ubuntu-12.04']="WARNING|" ['ubuntu-12.10']="WARNING|" ['ubuntu-13.04']="WARNING|" ['ubuntu-13.10']="WARNING|" ['ubuntu-14.04']="WARNING|" ['ubuntu-14.10']="WARNING|" ['ubuntu-15.04']="WARNING|" ['ubuntu-15.10']="WARNING|")
              + declare -A pkg_python3_mysqldb
              + pkg_python_psycopg2=(['alpine']="py-psycopg2" ['arch']="python2-psycopg2" ['centos']="python-psycopg2" ['debian']="python-psycopg2" ['gentoo']="dev-python/psycopg" ['sabayon']="dev-python/psycopg:2" ['rhel']="python-psycopg2" ['suse']="python-psycopg2" ['default']="python-psycopg2")
              + declare -A pkg_python_psycopg2
              + pkg_python3_psycopg2=(['alpine']="py3-psycopg2" ['arch']="python-psycopg2" ['centos']="WARNING|" ['debian']="WARNING|" ['gentoo']="dev-python/psycopg" ['sabayon']="dev-python/psycopg:2" ['rhel']="WARNING|" ['suse']="WARNING|" ['default']="WARNING|")
              + declare -A pkg_python3_psycopg2
              + pkg_python_pip=(['alpine']="py-pip" ['gentoo']="dev-python/pip" ['sabayon']="dev-python/pip" ['default']="python-pip")
              + declare -A pkg_python_pip
              + pkg_python3_pip=(['alpine']="py3-pip" ['arch']="python-pip" ['centos']="WARNING|" ['gentoo']="dev-python/pip" ['sabayon']="dev-python/pip" ['rhel']="WARNING|" ['default']="python3-pip")
              + declare -A pkg_python3_pip
              + pkg_python_pymongo=(['alpine']="WARNING|" ['arch']="python2-pymongo" ['centos']="WARNING|" ['debian']="python-pymongo" ['gentoo']="dev-python/pymongo" ['suse']="python-pymongo" ['default']="python-pymongo")
              + declare -A pkg_python_pymongo
              + pkg_python3_pymongo=(['alpine']="WARNING|" ['arch']="python-pymongo" ['centos']="WARNING|" ['debian']="python3-pymongo" ['gentoo']="dev-python/pymongo" ['suse']="python3-pymongo" ['default']="python3-pymongo")
              + declare -A pkg_python3_pymongo
              + pkg_python_requests=(['alpine']="py-requests" ['arch']="python2-requests" ['centos']="python-requests" ['debian']="python-requests" ['gentoo']="dev-python/requests" ['sabayon']="dev-python/requests" ['rhel']="python-requests" ['suse']="python-requests" ['default']="python-requests" ['alpine-3.1.4']="WARNING|" ['alpine-3.2.3']="WARNING|")
              + declare -A pkg_python_requests
              + pkg_python3_requests=(['alpine']="py3-requests" ['arch']="python-requests" ['centos']="WARNING|" ['debian']="WARNING|" ['gentoo']="dev-python/requests" ['sabayon']="dev-python/requests" ['rhel']="WARNING|" ['suse']="WARNING|" ['default']="WARNING|")
              + declare -A pkg_python3_requests
              + pkg_lz4=(['alpine']="lz4-dev" ['debian']="liblz4-dev" ['ubuntu']="liblz4-dev" ['suse']="liblz4-devel" ['default']="lz4-devel")
              + declare -A pkg_lz4
              + pkg_libuv=(['alpine']="libuv-dev" ['debian']="libuv1-dev" ['ubuntu']="libuv1-dev" ['default']="libuv-devel")
              + declare -A pkg_libuv
              + pkg_openssl=(['alpine']="openssl-dev" ['debian']="libssl-dev" ['ubuntu']="libssl-dev" ['suse']="libopenssl-devel" ['default']="openssl-devel")
              + declare -A pkg_openssl
              + pkg_judy=(['alpine']="WARNING|" ['debian']="libjudy-dev" ['ubuntu']="libjudy-dev" ['suse']="judy-devel" ['default']="Judy-devel")
              + declare -A pkg_judy
              + pkg_python3=(['gentoo']="dev-lang/python" ['sabayon']="dev-lang/python:3.4" ['default']="python3" ['centos-6']="WARNING|")
              + declare -A pkg_python3
              + pkg_screen=(['gentoo']="app-misc/screen" ['sabayon']="app-misc/screen" ['default']="screen")
              + declare -A pkg_screen
              + pkg_sudo=(['default']="sudo")
              + declare -A pkg_sudo
              + pkg_sysstat=(['default']="sysstat")
              + declare -A pkg_sysstat
              + pkg_tcpdump=(['gentoo']="net-analyzer/tcpdump" ['default']="tcpdump")
              + declare -A pkg_tcpdump
              + pkg_traceroute=(['alpine']=" " ['gentoo']="net-analyzer/traceroute" ['default']="traceroute")
              + declare -A pkg_traceroute
              + pkg_valgrind=(['gentoo']="dev-util/valgrind" ['default']="valgrind")
              + declare -A pkg_valgrind
              + pkg_ulogd=(['centos']="WARNING|" ['rhel']="WARNING|" ['gentoo']="app-admin/ulogd" ['default']="ulogd2")
              + declare -A pkg_ulogd
              + pkg_unzip=(['gentoo']="app-arch/unzip" ['default']="unzip")
              + declare -A pkg_unzip
              + pkg_zip=(['gentoo']="app-arch/zip" ['default']="zip")
              + declare -A pkg_zip
              + DRYRUN=0
              + sudo=
              + '[' 0 -ne 0 ']'
              + PACMAN_DB_SYNCED=0
              + '[' -z --non-interactive ']'
              + DONT_WAIT=0
              + NON_INTERACTIVE=0
              + IGNORE_INSTALLED=0
              + '[' '!' -z --non-interactive ']'
              + case "${1}" in
              + NON_INTERACTIVE=1
              + shift
              + '[' '!' -z --dont-wait ']'
              + case "${1}" in
              + DONT_WAIT=1
              + shift
              + '[' '!' -z netdata ']'
              + case "${1}" in
              + PACKAGES_NETDATA=1
              + PACKAGES_NETDATA_PYTHON=1
              + PACKAGES_NETDATA_DATABASE=1
              + shift
              + '[' '!' -z '' ']'
              + command -v grep
              + '[' -z '' -o -z '' ']'
              + '[' -z '' ']'
              + autodetect_distribution
              + get_os_release
              + local x
              + '[' -f /etc/os-release ']'
              + echo 'Loading /etc/os-release ...'
              Loading /etc/os-release ...
              ++ cat /etc/os-release
              ++ grep -E '^(NAME|ID|ID_LIKE|VERSION|VERSION_ID)='
              + eval 'NAME="Ubuntu"
              VERSION="16.04.6 LTS (Xenial Xerus)"
              ID=ubuntu
              ID_LIKE=debian
              VERSION_ID="16.04"'
              ++ NAME=Ubuntu
              ++ VERSION='16.04.6 LTS (Xenial Xerus)'
              ++ ID=ubuntu
              ++ ID_LIKE=debian
              ++ VERSION_ID=16.04
              + for x in '"${ID}"' '${ID_LIKE}'
              + case "${x,,}" in
              + distribution=ubuntu
              + version=16.04
              + codename='16.04.6 LTS (Xenial Xerus)'
              + detection=/etc/os-release
              + break
              + '[' -z ubuntu ']'
              + '[' -z ubuntu ']'
              + return 0
              + '[' -z '' ']'
              + detect_package_manager_from_distribution ubuntu
              + case "${1,,}" in
              + package_installer=install_apt_get
              + tree=debian
              + '[' 0 -eq 0 -a -z /usr/bin/apt-get ']'
              ++ python --version
              + pv='Python 2.7.12'
              + [[ Python 2.7.12 =~ ^Python 2.* ]]
              + pv=2
              + '[' /etc/os-release = /etc/os-release ']'
              + cat

              /etc/os-release information:
              NAME            : Ubuntu
              VERSION         : 16.04.6 LTS (Xenial Xerus)
              ID              : ubuntu
              ID_LIKE         : debian
              VERSION_ID      : 16.04
              + cat
              ++ '[' 2 -eq 2 -a 0 -eq 1 ']'

              We detected these:
              Distribution    : ubuntu
              Version         : 16.04
              Codename        : 16.04.6 LTS (Xenial Xerus)
              Package Manager : install_apt_get
              Packages Tree   : debian
              Detection Method: /etc/os-release
              Default Python v: 2

              + PACKAGES_TO_INSTALL=($(packages | sort -u))
              ++ packages
              ++ sort -u
              ++ suitable_package distro-sdk
              ++ local package=distro_sdk p= v=16
              ++ eval 'p=${pkg_distro_sdk['\''ubuntu-16.04'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_distro_sdk['\''ubuntu-16'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_distro_sdk['\''ubuntu'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_distro_sdk['\''debian-16.04'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_distro_sdk['\''debian-16'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_distro_sdk['\''debian'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_distro_sdk['\''default'\'']}'
              +++ p=NOTREQUIRED
              ++ [[ NOTREQUIRED =~ ^(ERROR|WARNING|INFO)$ ]]
              ++ '[' NOTREQUIRED = NOTREQUIRED ']'
              ++ return 0
              ++ require_cmd git
              ++ '[' 0 -eq 1 ']'
              ++ local wanted found
              ++ for wanted in '"${@}"'
              +++ which git
              ++ found=/usr/bin/git
              ++ '[' -z /usr/bin/git ']'
              ++ '[' '!' -z /usr/bin/git -a -x /usr/bin/git ']'
              ++ return 0
              ++ require_cmd find
              ++ '[' 0 -eq 1 ']'
              ++ local wanted found
              ++ for wanted in '"${@}"'
              +++ which find
              ++ found=/usr/bin/find
              ++ '[' -z /usr/bin/find ']'
              ++ '[' '!' -z /usr/bin/find -a -x /usr/bin/find ']'
              ++ return 0
              ++ require_cmd gcc
              ++ '[' 0 -eq 1 ']'
              ++ local wanted found
              ++ for wanted in '"${@}"'
              +++ which gcc
              ++ found=/usr/bin/gcc
              ++ '[' -z /usr/bin/gcc ']'
              ++ '[' '!' -z /usr/bin/gcc -a -x /usr/bin/gcc ']'
              ++ return 0
              ++ require_cmd make
              ++ '[' 0 -eq 1 ']'
              ++ local wanted found
              ++ for wanted in '"${@}"'
              +++ which make
              ++ found=/usr/bin/make
              ++ '[' -z /usr/bin/make ']'
              ++ '[' '!' -z /usr/bin/make -a -x /usr/bin/make ']'
              ++ return 0
              ++ require_cmd autoconf
              ++ '[' 0 -eq 1 ']'
              ++ local wanted found
              ++ for wanted in '"${@}"'
              +++ which autoconf
              ++ found=
              ++ '[' -z '' ']'
              +++ command -v autoconf
              ++ found=
              ++ '[' '!' -z '' -a -x '' ']'
              ++ return 1
              ++ suitable_package autoconf
              ++ local package=autoconf p= v=16
              ++ eval 'p=${pkg_autoconf['\''ubuntu-16.04'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_autoconf['\''ubuntu-16'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_autoconf['\''ubuntu'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_autoconf['\''debian-16.04'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_autoconf['\''debian-16'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_autoconf['\''debian'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_autoconf['\''default'\'']}'
              +++ p=autoconf
              ++ [[ autoconf =~ ^(ERROR|WARNING|INFO)$ ]]
              ++ '[' autoconf = NOTREQUIRED ']'
              ++ '[' -z autoconf ']'
              ++ '[' 0 -eq 0 ']'
              ++ validate_installed_package autoconf
              ++ validate_install_apt_get autoconf
              ++ echo ' > Checking if package '\''autoconf'\'' is installed...'
               > Checking if package 'autoconf' is installed...
              +++ dpkg-query -W '--showformat=${Status}\n' autoconf
              ++ '[' 'unknown ok not-installed' = 'install ok installed' ']'
              ++ echo autoconf
              ++ return 0
              ++ suitable_package autoconf-archive
              ++ local package=autoconf_archive p= v=16
              ++ eval 'p=${pkg_autoconf_archive['\''ubuntu-16.04'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_autoconf_archive['\''ubuntu-16'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_autoconf_archive['\''ubuntu'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_autoconf_archive['\''debian-16.04'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_autoconf_archive['\''debian-16'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_autoconf_archive['\''debian'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_autoconf_archive['\''default'\'']}'
              +++ p=autoconf-archive
              ++ [[ autoconf-archive =~ ^(ERROR|WARNING|INFO)$ ]]
              ++ '[' autoconf-archive = NOTREQUIRED ']'
              ++ '[' -z autoconf-archive ']'
              ++ '[' 0 -eq 0 ']'
              ++ validate_installed_package autoconf-archive
              ++ validate_install_apt_get autoconf-archive
              ++ echo ' > Checking if package '\''autoconf-archive'\'' is installed...'
               > Checking if package 'autoconf-archive' is installed...
              +++ dpkg-query -W '--showformat=${Status}\n' autoconf-archive
              dpkg-query: no packages found matching autoconf-archive
              ++ '[' '' = 'install ok installed' ']'
              ++ echo autoconf-archive
              ++ return 0
              ++ require_cmd autogen
              ++ '[' 0 -eq 1 ']'
              ++ local wanted found
              ++ for wanted in '"${@}"'
              +++ which autogen
              ++ found=
              ++ '[' -z '' ']'
              +++ command -v autogen
              ++ found=
              ++ '[' '!' -z '' -a -x '' ']'
              ++ return 1
              ++ suitable_package autogen
              ++ local package=autogen p= v=16
              ++ eval 'p=${pkg_autogen['\''ubuntu-16.04'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_autogen['\''ubuntu-16'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_autogen['\''ubuntu'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_autogen['\''debian-16.04'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_autogen['\''debian-16'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_autogen['\''debian'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_autogen['\''default'\'']}'
              +++ p=autogen
              ++ [[ autogen =~ ^(ERROR|WARNING|INFO)$ ]]
              ++ '[' autogen = NOTREQUIRED ']'
              ++ '[' -z autogen ']'
              ++ '[' 0 -eq 0 ']'
              ++ validate_installed_package autogen
              ++ validate_install_apt_get autogen
              ++ echo ' > Checking if package '\''autogen'\'' is installed...'
               > Checking if package 'autogen' is installed...
              +++ dpkg-query -W '--showformat=${Status}\n' autogen
              ++ '[' 'unknown ok not-installed' = 'install ok installed' ']'
              ++ echo autogen
              ++ return 0
              ++ require_cmd automake
              ++ '[' 0 -eq 1 ']'
              ++ local wanted found
              ++ for wanted in '"${@}"'
              +++ which automake
              ++ found=
              ++ '[' -z '' ']'
              +++ command -v automake
              ++ found=
              ++ '[' '!' -z '' -a -x '' ']'
              ++ return 1
              ++ suitable_package automake
              ++ local package=automake p= v=16
              ++ eval 'p=${pkg_automake['\''ubuntu-16.04'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_automake['\''ubuntu-16'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_automake['\''ubuntu'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_automake['\''debian-16.04'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_automake['\''debian-16'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_automake['\''debian'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_automake['\''default'\'']}'
              +++ p=automake
              ++ [[ automake =~ ^(ERROR|WARNING|INFO)$ ]]
              ++ '[' automake = NOTREQUIRED ']'
              ++ '[' -z automake ']'
              ++ '[' 0 -eq 0 ']'
              ++ validate_installed_package automake
              ++ validate_install_apt_get automake
              ++ echo ' > Checking if package '\''automake'\'' is installed...'
               > Checking if package 'automake' is installed...
              +++ dpkg-query -W '--showformat=${Status}\n' automake
              ++ '[' 'unknown ok not-installed' = 'install ok installed' ']'
              ++ echo automake
              ++ return 0
              ++ require_cmd pkg-config
              ++ '[' 0 -eq 1 ']'
              ++ local wanted found
              ++ for wanted in '"${@}"'
              +++ which pkg-config
              ++ found=/opt/chef/embedded/bin/pkg-config
              ++ '[' -z /opt/chef/embedded/bin/pkg-config ']'
              ++ '[' '!' -z /opt/chef/embedded/bin/pkg-config -a -x /opt/chef/embedded/bin/pkg-config ']'
              ++ return 0
              ++ '[' 0 -ne 0 ']'
              ++ '[' 1 -ne 0 ']'
              ++ require_cmd tar
              ++ '[' 0 -eq 1 ']'
              ++ local wanted found
              ++ for wanted in '"${@}"'
              +++ which tar
              ++ found=/bin/tar
              ++ '[' -z /bin/tar ']'
              ++ '[' '!' -z /bin/tar -a -x /bin/tar ']'
              ++ return 0
              ++ require_cmd curl
              ++ '[' 0 -eq 1 ']'
              ++ local wanted found
              ++ for wanted in '"${@}"'
              +++ which curl
              ++ found=/usr/bin/curl
              ++ '[' -z /usr/bin/curl ']'
              ++ '[' '!' -z /usr/bin/curl -a -x /usr/bin/curl ']'
              ++ return 0
              ++ require_cmd gzip
              ++ '[' 0 -eq 1 ']'
              ++ local wanted found
              ++ for wanted in '"${@}"'
              +++ which gzip
              ++ found=/bin/gzip
              ++ '[' -z /bin/gzip ']'
              ++ '[' '!' -z /bin/gzip -a -x /bin/gzip ']'
              ++ return 0
              ++ require_cmd nc
              ++ '[' 0 -eq 1 ']'
              ++ local wanted found
              ++ for wanted in '"${@}"'
              +++ which nc
              ++ found=/bin/nc
              ++ '[' -z /bin/nc ']'
              ++ '[' '!' -z /bin/nc -a -x /bin/nc ']'
              ++ return 0
              ++ '[' 0 -ne 0 ']'
              ++ '[' 0 -ne 0 ']'
              ++ '[' 0 -ne 0 ']'
              ++ '[' 1 -ne 0 ']'
              ++ suitable_package libz-dev
              ++ local package=libz_dev p= v=16
              ++ eval 'p=${pkg_libz_dev['\''ubuntu-16.04'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_libz_dev['\''ubuntu-16'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_libz_dev['\''ubuntu'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_libz_dev['\''debian-16.04'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_libz_dev['\''debian-16'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_libz_dev['\''debian'\'']}'
              +++ p=zlib1g-dev
              ++ '[' -z zlib1g-dev ']'
              ++ [[ zlib1g-dev =~ ^(ERROR|WARNING|INFO)$ ]]
              ++ '[' zlib1g-dev = NOTREQUIRED ']'
              ++ '[' -z zlib1g-dev ']'
              ++ '[' 0 -eq 0 ']'
              ++ validate_installed_package zlib1g-dev
              ++ validate_install_apt_get zlib1g-dev
              ++ echo ' > Checking if package '\''zlib1g-dev'\'' is installed...'
               > Checking if package 'zlib1g-dev' is installed...
              +++ dpkg-query -W '--showformat=${Status}\n' zlib1g-dev
              ++ '[' 'install ok installed' = 'install ok installed' ']'
              ++ return 0
              ++ suitable_package libuuid-dev
              ++ local package=libuuid_dev p= v=16
              ++ eval 'p=${pkg_libuuid_dev['\''ubuntu-16.04'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_libuuid_dev['\''ubuntu-16'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_libuuid_dev['\''ubuntu'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_libuuid_dev['\''debian-16.04'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_libuuid_dev['\''debian-16'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_libuuid_dev['\''debian'\'']}'
              +++ p=uuid-dev
              ++ '[' -z uuid-dev ']'
              ++ [[ uuid-dev =~ ^(ERROR|WARNING|INFO)$ ]]
              ++ '[' uuid-dev = NOTREQUIRED ']'
              ++ '[' -z uuid-dev ']'
              ++ '[' 0 -eq 0 ']'
              ++ validate_installed_package uuid-dev
              ++ validate_install_apt_get uuid-dev
              ++ echo ' > Checking if package '\''uuid-dev'\'' is installed...'
               > Checking if package 'uuid-dev' is installed...
              +++ dpkg-query -W '--showformat=${Status}\n' uuid-dev
              dpkg-query: no packages found matching uuid-dev
              ++ '[' '' = 'install ok installed' ']'
              ++ echo uuid-dev
              ++ return 0
              ++ suitable_package libmnl-dev
              ++ local package=libmnl_dev p= v=16
              ++ eval 'p=${pkg_libmnl_dev['\''ubuntu-16.04'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_libmnl_dev['\''ubuntu-16'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_libmnl_dev['\''ubuntu'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_libmnl_dev['\''debian-16.04'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_libmnl_dev['\''debian-16'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_libmnl_dev['\''debian'\'']}'
              +++ p=libmnl-dev
              ++ '[' -z libmnl-dev ']'
              ++ [[ libmnl-dev =~ ^(ERROR|WARNING|INFO)$ ]]
              ++ '[' libmnl-dev = NOTREQUIRED ']'
              ++ '[' -z libmnl-dev ']'
              ++ '[' 0 -eq 0 ']'
              ++ validate_installed_package libmnl-dev
              ++ validate_install_apt_get libmnl-dev
              ++ echo ' > Checking if package '\''libmnl-dev'\'' is installed...'
               > Checking if package 'libmnl-dev' is installed...
              +++ dpkg-query -W '--showformat=${Status}\n' libmnl-dev
              dpkg-query: no packages found matching libmnl-dev
              ++ '[' '' = 'install ok installed' ']'
              ++ echo libmnl-dev
              ++ return 0
              ++ '[' 0 -ne 0 ']'
              ++ '[' 1 -ne 0 ']'
              ++ suitable_package libuv
              ++ local package=libuv p= v=16
              ++ eval 'p=${pkg_libuv['\''ubuntu-16.04'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_libuv['\''ubuntu-16'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_libuv['\''ubuntu'\'']}'
              +++ p=libuv1-dev
              ++ '[' -z libuv1-dev ']'
              ++ '[' -z libuv1-dev ']'
              ++ '[' -z libuv1-dev ']'
              ++ '[' -z libuv1-dev ']'
              ++ [[ libuv1-dev =~ ^(ERROR|WARNING|INFO)$ ]]
              ++ '[' libuv1-dev = NOTREQUIRED ']'
              ++ '[' -z libuv1-dev ']'
              ++ '[' 0 -eq 0 ']'
              ++ validate_installed_package libuv1-dev
              ++ validate_install_apt_get libuv1-dev
              ++ echo ' > Checking if package '\''libuv1-dev'\'' is installed...'
               > Checking if package 'libuv1-dev' is installed...
              +++ dpkg-query -W '--showformat=${Status}\n' libuv1-dev
              ++ '[' 'install ok installed' = 'install ok installed' ']'
              ++ return 0
              ++ suitable_package lz4
              ++ local package=lz4 p= v=16
              ++ eval 'p=${pkg_lz4['\''ubuntu-16.04'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_lz4['\''ubuntu-16'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_lz4['\''ubuntu'\'']}'
              +++ p=liblz4-dev
              ++ '[' -z liblz4-dev ']'
              ++ '[' -z liblz4-dev ']'
              ++ '[' -z liblz4-dev ']'
              ++ '[' -z liblz4-dev ']'
              ++ [[ liblz4-dev =~ ^(ERROR|WARNING|INFO)$ ]]
              ++ '[' liblz4-dev = NOTREQUIRED ']'
              ++ '[' -z liblz4-dev ']'
              ++ '[' 0 -eq 0 ']'
              ++ validate_installed_package liblz4-dev
              ++ validate_install_apt_get liblz4-dev
              ++ echo ' > Checking if package '\''liblz4-dev'\'' is installed...'
               > Checking if package 'liblz4-dev' is installed...
              +++ dpkg-query -W '--showformat=${Status}\n' liblz4-dev
              dpkg-query: no packages found matching liblz4-dev
              ++ '[' '' = 'install ok installed' ']'
              ++ echo liblz4-dev
              ++ return 0
              ++ suitable_package openssl
              ++ local package=openssl p= v=16
              ++ eval 'p=${pkg_openssl['\''ubuntu-16.04'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_openssl['\''ubuntu-16'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_openssl['\''ubuntu'\'']}'
              +++ p=libssl-dev
              ++ '[' -z libssl-dev ']'
              ++ '[' -z libssl-dev ']'
              ++ '[' -z libssl-dev ']'
              ++ '[' -z libssl-dev ']'
              ++ [[ libssl-dev =~ ^(ERROR|WARNING|INFO)$ ]]
              ++ '[' libssl-dev = NOTREQUIRED ']'
              ++ '[' -z libssl-dev ']'
              ++ '[' 0 -eq 0 ']'
              ++ validate_installed_package libssl-dev
              ++ validate_install_apt_get libssl-dev
              ++ echo ' > Checking if package '\''libssl-dev'\'' is installed...'
               > Checking if package 'libssl-dev' is installed...
              +++ dpkg-query -W '--showformat=${Status}\n' libssl-dev
              ++ '[' 'install ok installed' = 'install ok installed' ']'
              ++ return 0
              ++ suitable_package judy
              ++ local package=judy p= v=16
              ++ eval 'p=${pkg_judy['\''ubuntu-16.04'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_judy['\''ubuntu-16'\'']}'
              +++ p=
              ++ '[' -z '' ']'
              ++ eval 'p=${pkg_judy['\''ubuntu'\'']}'
              +++ p=libjudy-dev
              ++ '[' -z libjudy-dev ']'
              ++ '[' -z libjudy-dev ']'
              ++ '[' -z libjudy-dev ']'
              ++ '[' -z libjudy-dev ']'
              ++ [[ libjudy-dev =~ ^(ERROR|WARNING|INFO)$ ]]
              ++ '[' libjudy-dev = NOTREQUIRED ']'
              ++ '[' -z libjudy-dev ']'
              ++ '[' 0 -eq 0 ']'
              ++ validate_installed_package libjudy-dev
              ++ validate_install_apt_get libjudy-dev
              ++ echo ' > Checking if package '\''libjudy-dev'\'' is installed...'
               > Checking if package 'libjudy-dev' is installed...
              +++ dpkg-query -W '--showformat=${Status}\n' libjudy-dev
              dpkg-query: no packages found matching libjudy-dev
              ++ '[' '' = 'install ok installed' ']'
              ++ echo libjudy-dev
              ++ return 0
              ++ '[' 0 -ne 0 ']'
              ++ '[' 1 -ne 0 ']'
              ++ require_cmd python
              ++ '[' 0 -eq 1 ']'
              ++ local wanted found
              ++ for wanted in '"${@}"'
              +++ which python
              ++ found=/usr/bin/python
              ++ '[' -z /usr/bin/python ']'
              ++ '[' '!' -z /usr/bin/python -a -x /usr/bin/python ']'
              ++ return 0
              ++ '[' 0 -ne 0 ']'
              ++ '[' 0 -ne 0 ']'
              ++ '[' 0 -ne 0 ']'
              ++ '[' 0 -ne 0 ']'
              ++ '[' 0 -ne 0 ']'
              + '[' 8 -gt 0 ']'
              + echo

              + echo 'The following command will be run:'
              The following command will be run:
              + echo

              + DRYRUN=1
              + install_apt_get autoconf autoconf-archive autogen automake libjudy-dev liblz4-dev libmnl-dev uuid-dev
              + '[' 1 -eq 1 ']'
              + echo ' >> IMPORTANT << '
               >> IMPORTANT <<
              + echo '    Please make sure your system is up to date'
                  Please make sure your system is up to date
              + echo '    by running:   apt-get update  '
                  by running:   apt-get update
              + echo

              + local opts=
              + '[' 1 -eq 1 ']'
              + echo 'Running in non-interactive mode'
              Running in non-interactive mode
              + export DEBIAN_FRONTEND=noninteractive
              + DEBIAN_FRONTEND=noninteractive
              + opts=' -yq'
              + for pkg in '"${@}"'
              + [[ 1 -eq 0 ]]
              + run apt-get -yq install autoconf
              + printf '%q ' apt-get -yq install autoconf
              apt-get -yq install autoconf + printf '\n'

              + '[' '!' 1 -eq 1 ']'
              + return 0
              + for pkg in '"${@}"'
              + [[ 1 -eq 0 ]]
              + run apt-get -yq install autoconf-archive
              + printf '%q ' apt-get -yq install autoconf-archive
              apt-get -yq install autoconf-archive + printf '\n'

              + '[' '!' 1 -eq 1 ']'
              + return 0
              + for pkg in '"${@}"'
              + [[ 1 -eq 0 ]]
              + run apt-get -yq install autogen
              + printf '%q ' apt-get -yq install autogen
              apt-get -yq install autogen + printf '\n'

              + '[' '!' 1 -eq 1 ']'
              + return 0
              + for pkg in '"${@}"'
              + [[ 1 -eq 0 ]]
              + run apt-get -yq install automake
              + printf '%q ' apt-get -yq install automake
              apt-get -yq install automake + printf '\n'

              + '[' '!' 1 -eq 1 ']'
              + return 0
              + for pkg in '"${@}"'
              + [[ 1 -eq 0 ]]
              + run apt-get -yq install libjudy-dev
              + printf '%q ' apt-get -yq install libjudy-dev
              apt-get -yq install libjudy-dev + printf '\n'

              + '[' '!' 1 -eq 1 ']'
              + return 0
              + for pkg in '"${@}"'
              + [[ 1 -eq 0 ]]
              + run apt-get -yq install liblz4-dev
              + printf '%q ' apt-get -yq install liblz4-dev
              apt-get -yq install liblz4-dev + printf '\n'

              + '[' '!' 1 -eq 1 ']'
              + return 0
              + for pkg in '"${@}"'
              + [[ 1 -eq 0 ]]
              + run apt-get -yq install libmnl-dev
              + printf '%q ' apt-get -yq install libmnl-dev
              apt-get -yq install libmnl-dev + printf '\n'

              + '[' '!' 1 -eq 1 ']'
              + return 0
              + for pkg in '"${@}"'
              + [[ 1 -eq 0 ]]
              + run apt-get -yq install uuid-dev
              + printf '%q ' apt-get -yq install uuid-dev
              apt-get -yq install uuid-dev + printf '\n'

              + '[' '!' 1 -eq 1 ']'
              + return 0
              + DRYRUN=0
              + echo

              + echo

              + '[' 1 -eq 0 -a 1 -eq 0 ']'
              + install_apt_get autoconf autoconf-archive autogen automake libjudy-dev liblz4-dev libmnl-dev uuid-dev
              + '[' 0 -eq 1 ']'
              + local opts=
              + '[' 1 -eq 1 ']'
              + echo 'Running in non-interactive mode'
              Running in non-interactive mode
              + export DEBIAN_FRONTEND=noninteractive
              + DEBIAN_FRONTEND=noninteractive
              + opts=' -yq'
              + for pkg in '"${@}"'
              + [[ 0 -eq 0 ]]
              + echo 'Adding package autoconf'
              Adding package autoconf
              + run apt-get -yq install autoconf
              + printf '%q ' apt-get -yq install autoconf
              apt-get -yq install autoconf + printf '\n'

              + '[' '!' 0 -eq 1 ']'
              + apt-get -yq install autoconf
              Reading package lists...
              Building dependency tree...
              Reading state information...
              The following package was automatically installed and is no longer required:
                libopts25
              Use 'sudo apt autoremove' to remove it.
              The following additional packages will be installed:
                automake autotools-dev m4
              Suggested packages:
                autoconf-archive gnu-standards autoconf-doc libtool gettext
              The following NEW packages will be installed:
                autoconf automake autotools-dev m4
              0 upgraded, 4 newly installed, 0 to remove and 77 not upgraded.
              Need to get 1065 kB of archives.
              After this operation, 3935 kB of additional disk space will be used.
              Get:1 http://us-west-2.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 m4 amd64 1.4.17-5 [195 kB]
              Get:2 http://us-west-2.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 autoconf all 2.69-9 [321 kB]
              Get:3 http://us-west-2.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 autotools-dev all 20150820.1 [39.8 kB]
              Get:4 http://us-west-2.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 automake all 1:1.15-4ubuntu1 [510 kB]
              Fetched 1065 kB in 0s (30.0 MB/s)
              Selecting previously unselected package m4.
(Reading database ... 79531 files and directories currently installed.)
              Preparing to unpack .../archives/m4_1.4.17-5_amd64.deb ...
              Unpacking m4 (1.4.17-5) ...
              Selecting previously unselected package autoconf.
              Preparing to unpack .../autoconf_2.69-9_all.deb ...
              Unpacking autoconf (2.69-9) ...
              Selecting previously unselected package autotools-dev.
              Preparing to unpack .../autotools-dev_20150820.1_all.deb ...
              Unpacking autotools-dev (20150820.1) ...
              Selecting previously unselected package automake.
              Preparing to unpack .../automake_1%3a1.15-4ubuntu1_all.deb ...
              Unpacking automake (1:1.15-4ubuntu1) ...
              Processing triggers for install-info (6.1.0.dfsg.1-5) ...
              Processing triggers for man-db (2.7.5-1) ...
              Setting up m4 (1.4.17-5) ...
              Setting up autoconf (2.69-9) ...
              Setting up autotools-dev (20150820.1) ...
              Setting up automake (1:1.15-4ubuntu1) ...
              update-alternatives: using /usr/bin/automake-1.15 to provide /usr/bin/automake (automake) in auto mode
              + return 0
              + for pkg in '"${@}"'
              + [[ 0 -eq 0 ]]
              + echo 'Adding package autoconf-archive'
              Adding package autoconf-archive
              + run apt-get -yq install autoconf-archive
              + printf '%q ' apt-get -yq install autoconf-archive
              apt-get -yq install autoconf-archive + printf '\n'

              + '[' '!' 0 -eq 1 ']'
              + apt-get -yq install autoconf-archive
              Reading package lists...
              Building dependency tree...
              Reading state information...
              The following package was automatically installed and is no longer required:
                libopts25
              Use 'sudo apt autoremove' to remove it.
              The following NEW packages will be installed:
                autoconf-archive
              0 upgraded, 1 newly installed, 0 to remove and 77 not upgraded.
              Need to get 637 kB of archives.
              After this operation, 6030 kB of additional disk space will be used.
              Get:1 http://us-west-2.ec2.archive.ubuntu.com/ubuntu xenial/universe amd64 autoconf-archive all 20150925-1 [637 kB]
              Fetched 637 kB in 0s (23.7 MB/s)
              Selecting previously unselected package autoconf-archive.
(Reading database ... 79813 files and directories currently installed.)
              Preparing to unpack .../autoconf-archive_20150925-1_all.deb ...
              Unpacking autoconf-archive (20150925-1) ...
              Processing triggers for install-info (6.1.0.dfsg.1-5) ...
              Setting up autoconf-archive (20150925-1) ...
              + return 0
              + for pkg in '"${@}"'
              + [[ 0 -eq 0 ]]
              + echo 'Adding package autogen'
              Adding package autogen
              + run apt-get -yq install autogen
              + printf '%q ' apt-get -yq install autogen
              apt-get -yq install autogen + printf '\n'

              + '[' '!' 0 -eq 1 ']'
              + apt-get -yq install autogen
              Reading package lists...
              Building dependency tree...
              Reading state information...
              The following additional packages will be installed:
                autogen-doc guile-2.0-libs libgc1c2 libopts25-dev libunistring0
              The following NEW packages will be installed:
                autogen autogen-doc guile-2.0-libs libgc1c2 libopts25-dev libunistring0
              0 upgraded, 6 newly installed, 0 to remove and 77 not upgraded.
              Need to get 4254 kB of archives.
              After this operation, 17.8 MB of additional disk space will be used.
              Get:1 http://us-west-2.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 libunistring0 amd64 0.9.3-5.2ubuntu1 [279 kB]
              Get:2 http://us-west-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgc1c2 amd64 1:7.4.2-7.3ubuntu0.1 [82.1 kB]
              Get:3 http://us-west-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 guile-2.0-libs amd64 2.0.11+1-10ubuntu0.1 [2237 kB]
              Get:4 http://us-west-2.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 libopts25-dev amd64 1:5.18.7-3 [93.0 kB]
              Get:5 http://us-west-2.ec2.archive.ubuntu.com/ubuntu xenial/universe amd64 autogen amd64 1:5.18.7-3 [550 kB]
              Get:6 http://us-west-2.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 autogen-doc all 1:5.18.7-3 [1013 kB]
              Fetched 4254 kB in 0s (54.4 MB/s)
              Selecting previously unselected package libunistring0:amd64.
(Reading database ... 80921 files and directories currently installed.)
              Preparing to unpack .../libunistring0_0.9.3-5.2ubuntu1_amd64.deb ...
              Unpacking libunistring0:amd64 (0.9.3-5.2ubuntu1) ...
              Selecting previously unselected package libgc1c2:amd64.
              Preparing to unpack .../libgc1c2_1%3a7.4.2-7.3ubuntu0.1_amd64.deb ...
              Unpacking libgc1c2:amd64 (1:7.4.2-7.3ubuntu0.1) ...
              Selecting previously unselected package guile-2.0-libs:amd64.
              Preparing to unpack .../guile-2.0-libs_2.0.11+1-10ubuntu0.1_amd64.deb ...
              Unpacking guile-2.0-libs:amd64 (2.0.11+1-10ubuntu0.1) ...
              Selecting previously unselected package libopts25-dev:amd64.
              Preparing to unpack .../libopts25-dev_1%3a5.18.7-3_amd64.deb ...
              Unpacking libopts25-dev:amd64 (1:5.18.7-3) ...
              Selecting previously unselected package autogen.
              Preparing to unpack .../autogen_1%3a5.18.7-3_amd64.deb ...
              Unpacking autogen (1:5.18.7-3) ...
              Replaced by files in installed package libopts25-dev:amd64 (1:5.18.7-3) ...
              Selecting previously unselected package autogen-doc.
              Preparing to unpack .../autogen-doc_1%3a5.18.7-3_all.deb ...
              Unpacking autogen-doc (1:5.18.7-3) ...
              Processing triggers for libc-bin (2.23-0ubuntu11) ...
              Processing triggers for man-db (2.7.5-1) ...
              Processing triggers for install-info (6.1.0.dfsg.1-5) ...
              Setting up libunistring0:amd64 (0.9.3-5.2ubuntu1) ...
              Setting up libgc1c2:amd64 (1:7.4.2-7.3ubuntu0.1) ...
              Setting up guile-2.0-libs:amd64 (2.0.11+1-10ubuntu0.1) ...
              Setting up libopts25-dev:amd64 (1:5.18.7-3) ...
              Setting up autogen (1:5.18.7-3) ...
              Setting up autogen-doc (1:5.18.7-3) ...
              Processing triggers for libc-bin (2.23-0ubuntu11) ...
              + return 0
              + for pkg in '"${@}"'
              + [[ 0 -eq 0 ]]
              + echo 'Adding package automake'
              Adding package automake
              + run apt-get -yq install automake
              + printf '%q ' apt-get -yq install automake
              apt-get -yq install automake + printf '\n'

              + '[' '!' 0 -eq 1 ']'
              + apt-get -yq install automake
              Reading package lists...
              Building dependency tree...
              Reading state information...
              automake is already the newest version (1:1.15-4ubuntu1).
              automake set to manually installed.
              0 upgraded, 0 newly installed, 0 to remove and 77 not upgraded.
              + return 0
              + for pkg in '"${@}"'
              + [[ 0 -eq 0 ]]
              + echo 'Adding package libjudy-dev'
              Adding package libjudy-dev
              + run apt-get -yq install libjudy-dev
              + printf '%q ' apt-get -yq install libjudy-dev
              apt-get -yq install libjudy-dev + printf '\n'

              + '[' '!' 0 -eq 1 ']'
              + apt-get -yq install libjudy-dev
              Reading package lists...
              Building dependency tree...
              Reading state information...
              The following additional packages will be installed:
                libjudydebian1
              The following NEW packages will be installed:
                libjudy-dev libjudydebian1
              0 upgraded, 2 newly installed, 0 to remove and 77 not upgraded.
              Need to get 228 kB of archives.
              After this operation, 1180 kB of additional disk space will be used.
              Get:1 http://us-west-2.ec2.archive.ubuntu.com/ubuntu xenial/universe amd64 libjudydebian1 amd64 1.0.5-5 [94.6 kB]
              Get:2 http://us-west-2.ec2.archive.ubuntu.com/ubuntu xenial/universe amd64 libjudy-dev amd64 1.0.5-5 [133 kB]
              Fetched 228 kB in 0s (1205 kB/s)
              Selecting previously unselected package libjudydebian1.
(Reading database ... 82135 files and directories currently installed.)
              Preparing to unpack .../libjudydebian1_1.0.5-5_amd64.deb ...
              Unpacking libjudydebian1 (1.0.5-5) ...
              Selecting previously unselected package libjudy-dev.
              Preparing to unpack .../libjudy-dev_1.0.5-5_amd64.deb ...
              Unpacking libjudy-dev (1.0.5-5) ...
              Processing triggers for man-db (2.7.5-1) ...
              Setting up libjudydebian1 (1.0.5-5) ...
              Setting up libjudy-dev (1.0.5-5) ...
              Processing triggers for libc-bin (2.23-0ubuntu11) ...
              + return 0
              + for pkg in '"${@}"'
              + [[ 0 -eq 0 ]]
              + echo 'Adding package liblz4-dev'
              Adding package liblz4-dev
              + run apt-get -yq install liblz4-dev
              + printf '%q ' apt-get -yq install liblz4-dev
              apt-get -yq install liblz4-dev + printf '\n'

              + '[' '!' 0 -eq 1 ']'
              + apt-get -yq install liblz4-dev
              Reading package lists...
              Building dependency tree...
              Reading state information...
              The following NEW packages will be installed:
                liblz4-dev
              0 upgraded, 1 newly installed, 0 to remove and 77 not upgraded.
              Need to get 50.3 kB of archives.
              After this operation, 189 kB of additional disk space will be used.
              Get:1 http://us-west-2.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 liblz4-dev amd64 0.0~r131-2ubuntu2 [50.3 kB]
              Fetched 50.3 kB in 0s (0 B/s)
              Selecting previously unselected package liblz4-dev:amd64.
(Reading database ... 82240 files and directories currently installed.)
              Preparing to unpack .../liblz4-dev_0.0~r131-2ubuntu2_amd64.deb ...
              Unpacking liblz4-dev:amd64 (0.0~r131-2ubuntu2) ...
              Setting up liblz4-dev:amd64 (0.0~r131-2ubuntu2) ...
              + return 0
              + for pkg in '"${@}"'
              + [[ 0 -eq 0 ]]
              + echo 'Adding package libmnl-dev'
              Adding package libmnl-dev
              + run apt-get -yq install libmnl-dev
              + printf '%q ' apt-get -yq install libmnl-dev
              apt-get -yq install libmnl-dev + printf '\n'

              + '[' '!' 0 -eq 1 ']'
              + apt-get -yq install libmnl-dev
              Reading package lists...
              Building dependency tree...
              Reading state information...
              The following NEW packages will be installed:
                libmnl-dev
              0 upgraded, 1 newly installed, 0 to remove and 77 not upgraded.
              Need to get 11.0 kB of archives.
              After this operation, 88.1 kB of additional disk space will be used.
              Get:1 http://us-west-2.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 libmnl-dev amd64 1.0.3-5 [11.0 kB]
              Fetched 11.0 kB in 0s (0 B/s)
              Selecting previously unselected package libmnl-dev.
(Reading database ... 82249 files and directories currently installed.)
              Preparing to unpack .../libmnl-dev_1.0.3-5_amd64.deb ...
              Unpacking libmnl-dev (1.0.3-5) ...
              Setting up libmnl-dev (1.0.3-5) ...
              + return 0
              + for pkg in '"${@}"'
              + [[ 0 -eq 0 ]]
              + echo 'Adding package uuid-dev'
              Adding package uuid-dev
              + run apt-get -yq install uuid-dev
              + printf '%q ' apt-get -yq install uuid-dev
              apt-get -yq install uuid-dev + printf '\n'

              + '[' '!' 0 -eq 1 ']'
              + apt-get -yq install uuid-dev
              Reading package lists...
              Building dependency tree...
              Reading state information...
              The following additional packages will be installed:
                libuuid1
              The following NEW packages will be installed:
                uuid-dev
              The following packages will be upgraded:
                libuuid1
              1 upgraded, 1 newly installed, 0 to remove and 76 not upgraded.
              Need to get 41.4 kB of archives.
              After this operation, 154 kB of additional disk space will be used.
              Get:1 http://us-west-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libuuid1 amd64 2.27.1-6ubuntu3.7 [14.9 kB]
              Get:2 http://us-west-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 uuid-dev amd64 2.27.1-6ubuntu3.7 [26.5 kB]
              Fetched 41.4 kB in 0s (3732 kB/s)
(Reading database ... 82258 files and directories currently installed.)
              Preparing to unpack .../libuuid1_2.27.1-6ubuntu3.7_amd64.deb ...
              Unpacking libuuid1:amd64 (2.27.1-6ubuntu3.7) over (2.27.1-6ubuntu3.6) ...
              Processing triggers for libc-bin (2.23-0ubuntu11) ...
              Setting up libuuid1:amd64 (2.27.1-6ubuntu3.7) ...
              Processing triggers for libc-bin (2.23-0ubuntu11) ...
              Selecting previously unselected package uuid-dev:amd64.
(Reading database ... 82258 files and directories currently installed.)
              Preparing to unpack .../uuid-dev_2.27.1-6ubuntu3.7_amd64.deb ...
              Unpacking uuid-dev:amd64 (2.27.1-6ubuntu3.7) ...
              Processing triggers for man-db (2.7.5-1) ...
              Setting up uuid-dev:amd64 (2.27.1-6ubuntu3.7) ...
              + return 0
              + echo

              + echo 'All Done! - Now proceed to the next step.'
              All Done! - Now proceed to the next step.
              + echo

              + remote_log OK
              + curl -Ss --max-time 3 'https://registry.my-netdata.io/log/installer?status=OK&error=&distribution=ubuntu&version=16.04&installer=install_apt_get&tree=debian&detection=/etc/os-release&netdata=1&nodejs=0&python=1&python3=0&mysql=0&postgres=0&pymongo=0&sensors=0&database=&firehol=0&fireqos=0&iprange=0&update_ipsets=0&demo=0'
              + exit 0
[2019-07-11T14:06:14+00:00] INFO: bash[install_netdata] ran successfully

However, on that same machine:

$ apt policy pkg-config
pkg-config:
  Installed: (none)
  Candidate: 0.29.1-0ubuntu1
  Version table:
     0.29.1-0ubuntu1 500
        500 http://us-west-2.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

So running chef-client again with the previous command (bash <(curl -Ss https://my-netdata.io/kickstart.sh) --dont-wait --stable-channel --no-updates) on the same machine (without having destroyed and re-created it) still results in the original failure.

@paulkatsoulakis
Copy link
Contributor

paulkatsoulakis commented Jul 11, 2019

              +++ which pkg-config
              ++ found=/opt/chef/embedded/bin/pkg-config
              ++ '[' -z /opt/chef/embedded/bin/pkg-config ']'
              ++ '[' '!' -z /opt/chef/embedded/bin/pkg-config -a -x /opt/chef/embedded/bin/pkg-config ']'
              ++ return 0

what is that? We detect this pkg-config and we do not install our own.

@rtkjliviero
Copy link
Author

Great question. After some limited reading, apparently chef bundles some packages internally for use by the chef-client machine.

If netdata is using which to determine whether a required package is installed, does that imply that any script in $PATH with a name matching one of the required packages will cause the package to not install?

@paulkatsoulakis
Copy link
Contributor

Well yes, we can't control the environments and the binaries the may carry. We can only go up to the point to expect specific binaries and install them if they are missing.

I think you need to check with Chef what is going on.
For example i found this: chef/omnibus-software#710

@rtkjliviero
Copy link
Author

I'll definitely do some more investigation into chef, but I don't think it's chef that's breaking here. The issue link above describes a different problem. This issue seems more closely related: https://github.com/chef/chef-dk/issues/313

Either way, the issue here won't be chef-specific - my use of chef is just exposing the underlying problem. You posted the relevant lines above; any script residing in PATH could block the installation of a package with a matching name . That is what is happening in my case - a script named pkg-config lives under the chef directory. If some user had a custom script named netcat (for some reason), they would encounter the same problem I have.

Looking at the install-required-packages.sh script, I see that it is detecting the available package manager anyway (detect_package_manager_from_distribution()). Would it not be feasible to:

  1. always detect the system's package manager early in the installation script
  2. use that package manager to check for installation - in the Debian case for example, apt policy <whatever> or dpkg -s <whatever> | grep Status

In any case, I have a couple easy workarounds for my own case, and I appreciate your time and insight!
At this point I'm just interested in smoothing out the installation experience of future users.

@paulkatsoulakis
Copy link
Contributor

I'll definitely do some more investigation into chef, but I don't think it's chef that's breaking here. The issue link above describes a different problem. This issue seems more closely related: chef/chef-dk#313

Either way, the issue here won't be chef-specific - my use of chef is just exposing the underlying problem. You posted the relevant lines above; any script residing in PATH could block the installation of a package with a matching name . That is what is happening in my case - a script named pkg-config lives under the chef directory. If some user had a custom script named netcat (for some reason), they would encounter the same problem I have.

Looking at the install-required-packages.sh script, I see that it is detecting the available package manager anyway (detect_package_manager_from_distribution()). Would it not be feasible to:

  1. always detect the system's package manager early in the installation script
  2. use that package manager to check for installation - in the Debian case for example, apt policy <whatever> or dpkg -s <whatever> | grep Status

In any case, I have a couple easy workarounds for my own case, and I appreciate your time and insight!
At this point I'm just interested in smoothing out the installation experience of future users.

I will take the time to discuss it with the team, but the thing is we can't predict what people do with their installations. In this particular case, even if we did work with package manager and we detect that pkg-config package needs to be installed, path will still be messed up because there will be two binaries that are resolved with $PATH and the problem would still be there.

@paulkatsoulakis
Copy link
Contributor

Hello @rtkjliviero, after careful consideration of the possible solutions to this peculiar issue, we concluded that we are not really able to do much about it. No matter what we do, it is always left to the system admins hands to make sure they maintain a healthy PATH with all the required dependencies correctly set.

Even in the case where we decide to stop checking for the binary and just install the package directly by checking the package manager only, we would end up with problems. If PATH is defined in such way that the binary from folder A gets overriden by the binary with the same name under folder B and we are interested for binary in folder A, we won't be able to see it.

If you allow me, i will be closing the issue for now, but please do reopen if you have a concrete suggestion for us to implement.

@rtkjliviero
Copy link
Author

Thanks for following up @paulkatsoulakis!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/packaging Packaging and operating systems support bug
Projects
None yet
Development

No branches or pull requests

2 participants