0

I have an external monitoring tool that connects over ssh periodically and checks the various system params of a linux box (cpu, mem, etc.). However this approach does not work with CoreOS since it has alost nothing on it (sysstat, tcpdump and so on). Installing the software on docker containers is not an option since I'm not able to change the commands that the external monitoring tool runs (unless redefining them - iostat for docker blah, blah).

I have tried to install gcc, but that one itself needs a c compiler as a prerequisite.

Question: how do I bootstrap the iostat/tcpdump/etc. on the CoreOS host rather than the container when gcc is a prerequisite?

1 Answers1

0

I have successfully installed iostat by installing it on the fedora/ubuntu toolbox container and then copying it to the host machine: cp /usr/bin/iostat /media/root/home/core/.

That will not work for gcc though, as the file system is designed to be ro, not rw. The gcc has cc1 as a dependency, and cc1 has two dependencies missing:

core@test ~/meh $ ldd gcc
        linux-vdso.so.1 (0x00007ffd30383000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f752f769000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f752f3b9000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f752fa6d000)

core@test ~/meh $ ldd cc1
        linux-vdso.so.1 (0x00007ffc5d9e9000)
        libmpfr.so.1 => not found
        libgmp.so.3 => not found
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f8238144000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f8237d94000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f8238348000)

[root@test ~]# cp /usr/lib64/libmpfr.so.4 /media/root/lib64/
cp: cannot create regular file '/media/root/lib64/libmpfr.so.4': Read-only file system

I believe the only way is static compilation of gcc inside one machine and then a push of the executable to the CoreOS machine. After that - everything should be easier since we would have gcc to help us compile other resources if needed :)