Differencies between mesos-agent binary - build

I installed OpenDC/OS 1.9, I found there are some differencies between mesos binaries. In my OpenDC/OS's agent node, it stores mesos-agent binary under:/opt/mesosphere/packages/mesos--aaedd03eee0d57f5c0d49c74ff1e5721862cad98/bin/
[root#localhost mesosphere]# ls -lh packages/mesos--aaedd03eee0d57f5c0d49c74ff1e5721862cad98/bin/
total 1.8M
-rwxr-xr-x. 1 root root 5.0K Mar 24 07:46 make_disk_resources.py
-rwxr-xr-x. 1 root root 44K Mar 24 07:46 mesos
-rwxr-xr-x. 1 root root 278K Mar 24 07:46 mesos-agent
-rwxr-xr-x. 1 root root 4.6K Mar 24 07:46 mesos-cat
........
mesos-agent size is only 278K
I follow below steps to build mesos source code(same version as above),
http://mesos.apache.org/gettingstarted
I got all binary and other files under xx/build/src/.libs folder:
-rwxr-xr-x. 1 root root 2.0M Jun 20 06:50 mesos-agent
-rwxr-xr-x. 1 root root 781K Jun 20 06:49 mesos-containerizer
-rwxr-xr-x. 1 root root 4.7M Jun 20 06:50 mesos-docker-executor
-rwxr-xr-x. 1 root root 3.5M Jun 20 06:48 mesos-execute
-rwxr-xr-x. 1 root root 3.8M Jun 20 06:49 mesos-executor
-rwxr-xr-x. 1 root root 2.4M Jun 20 06:48 mesos-fetcher
-rwxr-xr-x. 1 root root 3.1M Jun 20 06:49 mesos-health-check
-rwxr-xr-x. 1 root root 1.6M Jun 20 06:48 mesos-local
-rwxr-xr-x. 1 root root 591K Jun 20 06:48 mesos-log
this mesos-agent size is more than 2.0M
what's the differencies between these two mesos-agent? Can I replace the first mesos-agent binary(278K) with my self build one(2.0M) ?
if I install mesos by apt-get install or yum install, the mesos-agent size is almost the same as first one (278K)
How does OpenDC/OS build and use mesos ?
thanks!

Related

GCP's SSH terminal not working after stopping and starting vm instance

I am using gcp vm machine instance N1-standard 8V-30GB and N1-standard 4V-15GB
os-Debian
version - Debian GNU/Linux 10(buster)
this issue i am facing from last 1 month.
public access permission denied is one of message i am seeing while trying to access from cloud shell
I had run command chmod 777 <home directory> earlier.
I've tried to reproduce your steps and was able to solve this issue.
Please have a look at my steps below:
create VM instances:
gcloud compute instances create instance-1 --zone=europe-west3-a --machine-type=e2-medium --image=ubuntu-1804-bionic-v20200701 --image-project=ubuntu-os-cloud
gcloud compute instances create instance-2 --zone=europe-west3-a --machine-type=e2-medium --image=ubuntu-1804-bionic-v20200701 --image-project=ubuntu-os-cloud
change permissions recursively on my home directory at the VM instance instance-1:
instance-1:~$ chmod -R 777 ~
instance-1:~$ ls -la
...
drwxrwxrwx 2 username username 4096 Jul 15 07:50 .ssh
create snapshot of the VM instance instance-1 boot disk:
gcloud compute disks snapshot instance-1 --snapshot-names instance-1-snapshot --zone=europe-west3-a
create a new disk with the snapshot:
gcloud compute disks create instance-1-snapshot-disk --zone=europe-west3-a --source-snapshot=instance-1-snapshot
attach created disk instance-1-snapshot-disk to the VM instance instance-2:
instance-2:~$ ls -l /dev/ | grep sd
brw-rw---- 1 root disk 8, 0 Jul 15 07:39 sda
brw-rw---- 1 root disk 8, 1 Jul 15 07:39 sda1
brw-rw---- 1 root disk 8, 14 Jul 15 07:39 sda14
brw-rw---- 1 root disk 8, 15 Jul 15 07:39 sda15
instance-2:~$ mount | grep sda
/dev/sda1 on / type ext4 (rw,relatime)
/dev/sda15 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
then
gcloud compute instances attach-disk instance-2 --disk=instance-1-snapshot-disk --zone=europe-west3-a
after that
instance-2:~$ ls -l /dev/ | grep sd
brw-rw---- 1 root disk 8, 0 Jul 15 07:39 sda
brw-rw---- 1 root disk 8, 1 Jul 15 07:39 sda1
brw-rw---- 1 root disk 8, 14 Jul 15 07:39 sda14
brw-rw---- 1 root disk 8, 15 Jul 15 07:39 sda15
brw-rw---- 1 root disk 8, 16 Jul 15 08:04 sdb
brw-rw---- 1 root disk 8, 17 Jul 15 08:04 sdb1
brw-rw---- 1 root disk 8, 30 Jul 15 08:04 sdb14
brw-rw---- 1 root disk 8, 31 Jul 15 08:04 sdb15
instance-2:~$ sudo mkdir /mnt/instance-1-snapshot-disk
instance-2:~$ sudo mount /dev/sdb1 /mnt/instance-1-snapshot-disk
instance-2:~$ ls -la /mnt/instance-1-snapshot-disk
total 104
drwxr-xr-x 23 root root 4096 Jul 15 07:56 .
drwxr-xr-x 3 root root 4096 Jul 15 08:05 ..
drwxr-xr-x 2 root root 4096 Jul 1 19:14 bin
drwxr-xr-x 4 root root 4096 Jul 1 19:19 boot
drwxr-xr-x 4 root root 4096 Jul 1 19:11 dev
drwxr-xr-x 93 root root 4096 Jul 15 07:55 etc
drwxr-xr-x 4 root root 4096 Jul 15 07:50 home
lrwxrwxrwx 1 root root 30 Jul 1 19:18 initrd.img -> boot/initrd.img-5.3.0-1030-gcp
lrwxrwxrwx 1 root root 30 Jul 1 19:18 initrd.img.old -> boot/initrd.img-5.3.0-1030-gcp
drwxr-xr-x 22 root root 4096 Jul 1 19:17 lib
drwxr-xr-x 2 root root 4096 Jul 1 19:01 lib64
drwx------ 2 root root 16384 Jul 1 19:13 lost+found
drwxr-xr-x 2 root root 4096 Jul 1 19:01 media
drwxr-xr-x 2 root root 4096 Jul 1 19:01 mnt
drwxr-xr-x 2 root root 4096 Jul 1 19:01 opt
drwxr-xr-x 2 root root 4096 Apr 24 2018 proc
drwx------ 3 root root 4096 Jul 15 07:36 root
drwxr-xr-x 4 root root 4096 Jul 1 19:19 run
drwxr-xr-x 2 root root 4096 Jul 1 19:17 sbin
drwxr-xr-x 6 root root 4096 Jul 15 07:36 snap
drwxr-xr-x 2 root root 4096 Jul 1 19:01 srv
drwxr-xr-x 2 root root 4096 Apr 24 2018 sys
drwxrwxrwt 7 root root 4096 Jul 15 07:56 tmp
drwxr-xr-x 10 root root 4096 Jul 1 19:01 usr
drwxr-xr-x 13 root root 4096 Jul 1 19:12 var
lrwxrwxrwx 1 root root 27 Jul 1 19:18 vmlinuz -> boot/vmlinuz-5.3.0-1030-gcp
lrwxrwxrwx 1 root root 27 Jul 1 19:18 vmlinuz.old -> boot/vmlinuz-5.3.0-1030-gcp
change permissions:
.ssh directory: 700 drwx------
public key (.pub file): 644 -rw-r--r--
private key (id_rsa): 600 -rw-------
lastly your home directory should not be writeable by the group or others: 755 drwxr-xr-x
instance-2:~$ chmod -R 755 /mnt/instance-1-snapshot-disk/home/username/
instance-2:~$ chmod -R 700 /mnt/instance-1-snapshot-disk/home/username/.ssh/
instance-2:~$ chmod 644 /mnt/instance-1-snapshot-disk/home/username/.ssh/authorized_keys
unmount the disk when you finish:
instance-2:~$ sudo umount /mnt/instance-1-snapshot-disk/
detach disk instance-1-snapshot-disk from the VM instance instance-2:
gcloud compute instances detach-disk instance-2 --disk=instance-1-snapshot-disk --zone=europe-west3-a
create a new instance from the repaired disk:
gcloud compute instances create instance-3 --zone=europe-west3-a --machine-type=e2-medium --disk=name=instance-1-snapshot-disk
check SSH connection to at the VM instance instance-1.
In addition, please have a look at the documentation Troubleshooting SSH section Inspect the VM instance without shutting it down to find more details.
From owner's account i tried to access instance-1 but owner is also not able to connect to the instance-1.
owner of project got this pop-up on ssh window
[1]: https://i.stack.imgur.com/y2fzC.jpg
I observe that in fresh new created instance if i add add some file like git clone repo, after that if i restart it then i am able to connect SSH again.

Create a service using systemctl on CentOS 7

I'm trying to create a service using systemctl on my CentOS 7 server.
In /usr/lib/systemd/system I've this situation ...
[root#centos-4gb-hel1-1 system]# pwd
/usr/lib/systemd/system
[root#centos-4gb-hel1-1 system]# ls -la getUpdatesTelegram.sh
-rwxr-xr-x. 1 root root 116 Oct 24 22:32 getUpdatesTelegram.sh
[root#centos-4gb-hel1-1 system]# cat getUpdatesTelegram.sh
#!/bin/bash
while true ; do
/var/www/html/OpenProntoSoccorsi/TelegramBot/getUpdates_launcher.sh
sleep 5
done
[root#centos-4gb-hel1-1 system]#
If I try to execute
/var/www/html/OpenProntoSoccorsi/TelegramBot/getUpdates_launcher.sh
all works fine.
In /etc/systemd/system I've this ....
[root#centos-4gb-hel1-1 system]# cd /etc/systemd/system
[root#centos-4gb-hel1-1 system]# ls -la
total 40
drwxr-xr-x. 10 root root 4096 Oct 24 22:05 .
drwxr-xr-x. 4 root root 4096 Oct 18 22:41 ..
drwxr-xr-x. 2 root root 4096 Sep 24 12:31 basic.target.wants
lrwxrwxrwx. 1 root root 37 Sep 24 12:29 default.target -> /lib/systemd/system/multi-user.target
drwxr-xr-x. 2 root root 4096 Sep 24 12:26 default.target.wants
drwxr-xr-x. 2 root root 4096 Sep 24 12:27 dev-virtio\x2dports-org.qemu.guest_agent.0.device.wants
drwxr-xr-x. 2 root root 4096 Sep 24 12:26 getty.target.wants
drwxr-xr-x. 2 root root 4096 Sep 24 12:31 local-fs.target.wants
drwxr-xr-x. 2 root root 4096 Oct 24 22:32 multi-user.target.wants
drwxr-xr-x. 2 root root 4096 Sep 24 12:31 sysinit.target.wants
drwxr-xr-x. 2 root root 4096 Sep 24 12:26 system-update.target.wants
[root#centos-4gb-hel1-1 system]# cd multi-user.target.wants/
[root#centos-4gb-hel1-1 multi-user.target.wants]# ls -la
total 8
drwxr-xr-x. 2 root root 4096 Oct 24 22:32 .
drwxr-xr-x. 10 root root 4096 Oct 24 22:05 ..
lrwxrwxrwx. 1 root root 38 Sep 24 12:27 auditd.service -> /usr/lib/systemd/system/auditd.service
lrwxrwxrwx. 1 root root 37 Sep 24 12:31 brandbot.path -> /usr/lib/systemd/system/brandbot.path
lrwxrwxrwx. 1 root root 39 Sep 24 12:27 chronyd.service -> /usr/lib/systemd/system/chronyd.service
lrwxrwxrwx. 1 root root 44 Sep 24 12:33 cloud-config.service -> /usr/lib/systemd/system/cloud-config.service
lrwxrwxrwx. 1 root root 43 Sep 24 12:33 cloud-final.service -> /usr/lib/systemd/system/cloud-final.service
lrwxrwxrwx. 1 root root 48 Sep 24 12:33 cloud-init-local.service -> /usr/lib/systemd/system/cloud-init-local.service
lrwxrwxrwx. 1 root root 42 Sep 24 12:33 cloud-init.service -> /usr/lib/systemd/system/cloud-init.service
lrwxrwxrwx. 1 root root 37 Sep 24 12:26 crond.service -> /usr/lib/systemd/system/crond.service
lrwxrwxrwx. 1 root root 50 Oct 24 22:32 getUpdatesTelegram.service -> /usr/lib/systemd/system/getUpdatesTelegram.service
lrwxrwxrwx. 1 root root 42 Sep 24 12:27 irqbalance.service -> /usr/lib/systemd/system/irqbalance.service
lrwxrwxrwx. 1 root root 37 Sep 24 12:29 kdump.service -> /usr/lib/systemd/system/kdump.service
lrwxrwxrwx. 1 root root 40 Sep 24 12:26 remote-fs.target -> /usr/lib/systemd/system/remote-fs.target
lrwxrwxrwx. 1 root root 46 Sep 24 12:31 rhel-configure.service -> /usr/lib/systemd/system/rhel-configure.service
lrwxrwxrwx. 1 root root 39 Sep 24 12:26 rsyslog.service -> /usr/lib/systemd/system/rsyslog.service
lrwxrwxrwx. 1 root root 36 Sep 24 12:27 sshd.service -> /usr/lib/systemd/system/sshd.service
lrwxrwxrwx. 1 root root 37 Sep 24 12:26 tuned.service -> /usr/lib/systemd/system/tuned.service
[root#centos-4gb-hel1-1 multi-user.target.wants]# cat getUpdatesTelegram.service
[Service]
Type=simple
ExecStart=/bin/bash /bin/getUpdatesTelegram.sh
[Install]
WantedBy=multi-user.target
[root#centos-4gb-hel1-1 multi-user.target.wants]#
When I try to execute
systemctl enable getUpdatesTelegram.service
I obtain
...
...
getUpdatesTelegram.service loaded failed failed getUpdatesTelegram.service
...
...
The log I've is tthe follow ....
[root#centos-4gb-hel1-1 multi-user.target.wants]# journalctl -u getUpdatesTelegram.service
-- Logs begin at Fri 2018-10-19 20:09:02 CEST, end at Wed 2018-10-24 22:44:11 CEST. --
Oct 24 21:44:10 centos-4gb-hel1-1 systemd[1]: Started getUpdatesTelegram.service.
Oct 24 21:44:10 centos-4gb-hel1-1 systemd[1]: Starting getUpdatesTelegram.service...
Oct 24 21:44:10 centos-4gb-hel1-1 systemd[1]: getUpdatesTelegram.service: main process exited, code=exited, status=203/EXEC
Oct 24 21:44:10 centos-4gb-hel1-1 systemd[1]: Unit getUpdatesTelegram.service entered failed state.
Oct 24 21:44:10 centos-4gb-hel1-1 systemd[1]: getUpdatesTelegram.service failed.
Where I'm wrong?
Thank you in advance!
First, custom services should not be put in /usr/lib/systemd/system, but in /etc/systemd/system. Same goes with shell scripts, just put them into /usr/local/sbin or something.
The reason why this does not work is that the script path in your service file getUpdatesTelegram.service is wrong:
ExecStart=/bin/bash /bin/getUpdatesTelegram.sh
should really be
ExecStart=/bin/bash /usr/lib/systemd/system/getUpdatesTelegram.sh
(Though as I wrote, don't put shell scripts into /usr/lib/systemd/system)
As a Red Hat fork, CentOS tends to follow similar guidelines.
The Red Hat system administrator's guide offers this useful paragraph for your situation.
The solution proposed by Jakob is correct by the way.

how to compile mariadb to get libmysqlclient.so? (missing libmysqlclient.so in /usr/local/mysql/lib)

I wanted to move our database from mysql (community version) to mariadb with the further use of php7.1/apache2.4.25... So I have to compile mariadb in our new production environment. I compiled it with these options:
cmake -DCMAKE_CXX_FLAGS:STRING="-std=c++11" -DCONC_WITH_CURL=ON -DCONC_WITH_EXTERNAL_ZLIB=ON -DDISABLE_SHARED=OFF -DCONC_WITH_MYSQLCOMPAT:BOOL=ON -DPLUGIN_CLIENT_ED25519:STRING=DYNAMIC .
make all && make install
The mysql community version has a libmysqlclient.so in /usr/local/mysql/lib located. If I compile it with the options given above I only found these files in /usr/local/mysql/lib (MariaDB 10.2.6):
# ls -l /usr/local/mysql/lib/
total 3572
-rw-r--r-- 1 root root 2305518 Jul 4 08:14 libmariadbclient.a
lrwxrwxrwx 1 root root 15 Jul 4 08:31 libmariadb.so -> libmariadb.so.3
-rwxr-xr-x 1 root root 1297664 Jul 4 08:14 libmariadb.so.3
-rw-r--r-- 1 root root 48406 Jul 4 08:14 libmysqlservices.a
drwxr-xr-x 2 root root 4096 Jul 4 08:31 plugin
How can I get libmysqlclient.so? There isn't also any libmariadbclient.so just libmariadbclient.a ...
Thank you for further hints!
OK, now I found a solution.
I've just did a symbolic link to libmariadb.so and it now looks like the following:
ls -l /usr/local/mysql/lib/
total 3572
-rw-r--r-- 1 root root 2305518 Jul 4 16:21 libmariadbclient.a
lrwxrwxrwx 1 root root 15 Jul 4 16:39 libmariadb.so -> libmariadb.so.3
-rwxr-xr-x 1 root root 1297664 Jul 4 16:21 libmariadb.so.3
lrwxrwxrwx 1 root root 15 Jul 4 16:40 libmysqlclient_r.so -> libmariadb.so.3
lrwxrwxrwx 1 root root 15 Jul 4 16:40 libmysqlclient.so -> libmariadb.so.3
-rw-r--r-- 1 root root 48406 Jul 4 16:21 libmysqlservices.a
drwxr-xr-x 2 root root 4096 Jul 4 16:39 plugin
In this case PHP 7 would finally find the mysql libraries...

Errors importing pyql namespaces

I can import many things as the code below shows, but if I uncomment the imports two that are commented out, I get errors
[idf#node1 cboe]$ python pandas_pyql.py
Traceback (most recent call last):
File "pandas_pyql.py", line 33, in <module>
from quantlib.instruments.api import EuropeanOption
File "/home/idf/anaconda/lib/python2.7/site-packages/quantlib-0.1-py2.7-linux-x86_64.egg/quantlib/instruments/api.py", line 1, in <module>
from .bonds import FixedRateBond, ZeroCouponBond
File "quantlib/indexes/ibor_index.pxd", line 12, in init quantlib.instruments.bonds (quantlib/instruments/bonds.cpp:6651)
ImportError: /home/idf/anaconda/lib/python2.7/site-packages/quantlib-0.1-py2.7-linux-x86_64.egg/quantlib/indexes/ibor_index.so: undefined symbol: _ZNK8QuantLib9IborIndex21businessDayConventionEv
[idf#node1 cboe]$
[idf#node1 cboe]$ python pandas_pyql.py
Traceback (most recent call last):
File "pandas_pyql.py", line 36, in <module>
from quantlib.termstructures.yields.api import FlatForward
File "/home/idf/anaconda/lib/python2.7/site-packages/quantlib-0.1-py2.7-linux-x86_64.egg/quantlib/termstructures/yields/api.py", line 1, in <module>
from .bond_helpers import BondHelper, FixedRateBondHelper
File "quantlib/termstructures/yields/bond_helpers.pyx", line 1, in init quantlib.termstructures.yields.bond_helpers (quantlib/termstructures/yields/bond_helpers.cpp:4617)
ImportError: /home/idf/anaconda/lib/python2.7/site-packages/quantlib-0.1-py2.7-linux-x86_64.egg/quantlib/termstructures/yields/rate_helpers.so: undefined symbol: _ZN8QuantLib14SwapRateHelperC1ERKNS_6HandleINS_5QuoteEEERKNS_6PeriodERKNS_8CalendarENS_9FrequencyENS_21BusinessDayConventionERKNS_10DayCounterERKN5boost10shared_ptrINS_9IborIndexEEES5_S8_RKNS1_INS_18YieldTermStructureEEE
[idf#node1 cboe]$
import quantlib.reference.names as nm
from quantlib.pricingengines.blackformula import blackFormulaImpliedStdDev
from quantlib.instruments.option import EuropeanExercise, VanillaOption
from quantlib.instruments.payoffs import PlainVanillaPayoff, Put, Call
from quantlib.models.equity.heston_model import HestonModel
from quantlib.pricingengines.vanilla.vanilla import AnalyticHestonEngine
from quantlib.processes.heston_process import HestonProcess
from quantlib.quotes import SimpleQuote
from quantlib.settings import Settings
from quantlib.util.converter import pydate_to_qldate, df_to_zero_curve
#from quantlib.instruments.api import EuropeanOption
from quantlib.pricingengines.api import AnalyticEuropeanEngine
from quantlib.processes.api import BlackScholesMertonProcess
#from quantlib.termstructures.yields.api import FlatForward
from quantlib.termstructures.volatility.api import BlackConstantVol
from quantlib.time.api import today, NullCalendar, ActualActual
from quantlib.time.date import (Period, Days)
from quantlib.mlab.util import common_shape, array_call
EDIT 1
This is my /usr/local/lib
lrwxrwxrwx. 1 root root 16 Apr 24 2015 libczmq.so -> libczmq.so.1.1.0
lrwxrwxrwx. 1 root root 16 Apr 24 2015 libczmq.so.1 -> libczmq.so.1.1.0
-rwxr-xr-x. 1 root root 780174 Apr 24 2015 libczmq.so.1.1.0
-rwxr-xr-x. 1 root root 927 Apr 24 2015 libfix8.la
lrwxrwxrwx. 1 root root 16 Apr 24 2015 libfix8.so -> libfix8.so.1.0.3
lrwxrwxrwx. 1 root root 16 Apr 24 2015 libfix8.so.1 -> libfix8.so.1.0.3
-rwxr-xr-x. 1 root root 7784908 Apr 24 2015 libfix8.so.1.0.3
lrwxrwxrwx 1 root root 19 Jul 17 2015 libgdiplus.so -> libgdiplus.so.0.0.0
lrwxrwxrwx 1 root root 19 Jul 17 2015 libgdiplus.so.0 -> libgdiplus.so.0.0.0
-rwxr-xr-x 1 root root 424120 Mar 9 2015 libgdiplus.so.0.0.0
-rwxr-xr-x. 1 root root 939 Apr 24 2015 libhftest.la
lrwxrwxrwx. 1 root root 18 Apr 24 2015 libhftest.so -> libhftest.so.0.0.0
lrwxrwxrwx. 1 root root 18 Apr 24 2015 libhftest.so.0 -> libhftest.so.0.0.0
-rwxr-xr-x. 1 root root 2834313 Apr 24 2015 libhftest.so.0.0.0
-rwxr-xr-x. 1 root root 209608 Apr 24 2015 libkj-0.6-dev.so
-rw-r--r--. 1 root root 334352 Apr 24 2015 libkj.a
-rwxr-xr-x. 1 root root 359914 Apr 24 2015 libkj-async-0.6-dev.so
-rw-r--r--. 1 root root 528718 Apr 24 2015 libkj-async.a
-rwxr-xr-x. 1 root root 1002 Apr 24 2015 libkj-async.la
lrwxrwxrwx. 1 root root 22 Apr 24 2015 libkj-async.so -> libkj-async-0.6-dev.so
-rwxr-xr-x. 1 root root 936 Apr 24 2015 libkj.la
lrwxrwxrwx. 1 root root 16 Apr 24 2015 libkj.so -> libkj-0.6-dev.so
-rwxr-xr-x. 1 root root 57925 Apr 24 2015 libkj-test-0.6-dev.so
-rw-r--r--. 1 root root 71578 Apr 24 2015 libkj-test.a
-rwxr-xr-x. 1 root root 995 Apr 24 2015 libkj-test.la
lrwxrwxrwx. 1 root root 21 Apr 24 2015 libkj-test.so -> libkj-test-0.6-dev.so
-rw-r--r-- 1 root root 550804 Jul 3 2015 libpfring.a
-rwxr-xr-x 1 root root 421488 Jul 3 2015 libpfring.so
lrwxrwxrwx. 1 root root 24 Apr 24 2015 libPocoFoundationd.so -> libPocoFoundationd.so.30
-rwxr-xr-x. 1 root root 10145915 Apr 24 2015 libPocoFoundationd.so.30
lrwxrwxrwx. 1 root root 23 Apr 24 2015 libPocoFoundation.so -> libPocoFoundation.so.30
-rwxr-xr-x. 1 root root 2006896 Apr 24 2015 libPocoFoundation.so.30
lrwxrwxrwx. 1 root root 18 Apr 24 2015 libPocoJSONd.so -> libPocoJSONd.so.30
-rwxr-xr-x. 1 root root 2318379 Apr 24 2015 libPocoJSONd.so.30
lrwxrwxrwx. 1 root root 17 Apr 24 2015 libPocoJSON.so -> libPocoJSON.so.30
-rwxr-xr-x. 1 root root 327936 Apr 24 2015 libPocoJSON.so.30
lrwxrwxrwx. 1 root root 17 Apr 24 2015 libPocoNetd.so -> libPocoNetd.so.30
-rwxr-xr-x. 1 root root 7169896 Apr 24 2015 libPocoNetd.so.30
lrwxrwxrwx. 1 root root 16 Apr 24 2015 libPocoNet.so -> libPocoNet.so.30
-rwxr-xr-x. 1 root root 1209648 Apr 24 2015 libPocoNet.so.30
lrwxrwxrwx. 1 root root 18 Apr 24 2015 libPocoUtild.so -> libPocoUtild.so.30
-rwxr-xr-x. 1 root root 3264471 Apr 24 2015 libPocoUtild.so.30
lrwxrwxrwx. 1 root root 17 Apr 24 2015 libPocoUtil.so -> libPocoUtil.so.30
-rwxr-xr-x. 1 root root 473760 Apr 24 2015 libPocoUtil.so.30
lrwxrwxrwx. 1 root root 17 Apr 24 2015 libPocoXMLd.so -> libPocoXMLd.so.30
-rwxr-xr-x. 1 root root 2927891 Apr 24 2015 libPocoXMLd.so.30
lrwxrwxrwx. 1 root root 16 Apr 24 2015 libPocoXML.so -> libPocoXML.so.30
-rwxr-xr-x. 1 root root 596408 Apr 24 2015 libPocoXML.so.30
-rw-r--r-- 1 root root 54723484 Mar 27 13:42 libprotobuf.a
-rwxr-xr-x 1 root root 972 Mar 27 13:42 libprotobuf.la
-rw-r--r-- 1 root root 4638676 Mar 27 13:42 libprotobuf-lite.a
-rwxr-xr-x 1 root root 1007 Mar 27 13:42 libprotobuf-lite.la
lrwxrwxrwx 1 root root 26 Mar 27 13:42 libprotobuf-lite.so -> libprotobuf-lite.so.10.0.0
lrwxrwxrwx 1 root root 26 Mar 27 13:42 libprotobuf-lite.so.10 -> libprotobuf-lite.so.10.0.0
-rwxr-xr-x 1 root root 2005147 Mar 27 13:42 libprotobuf-lite.so.10.0.0
lrwxrwxrwx 1 root root 21 Mar 27 13:42 libprotobuf.so -> libprotobuf.so.10.0.0
lrwxrwxrwx 1 root root 21 Mar 27 13:42 libprotobuf.so.10 -> libprotobuf.so.10.0.0
-rwxr-xr-x 1 root root 21758102 Mar 27 13:42 libprotobuf.so.10.0.0
-rw-r--r-- 1 root root 96605238 Mar 27 13:42 libprotoc.a
-rwxr-xr-x 1 root root 988 Mar 27 13:42 libprotoc.la
lrwxrwxrwx 1 root root 19 Mar 27 13:42 libprotoc.so -> libprotoc.so.10.0.0
lrwxrwxrwx 1 root root 19 Mar 27 13:42 libprotoc.so.10 -> libprotoc.so.10.0.0
-rwxr-xr-x 1 root root 32484516 Mar 27 13:42 libprotoc.so.10.0.0
-rw-r--r-- 1 root root 1025743748 Jun 12 2015 libQuantLib.a
-rwxr-xr-x 1 root root 945 Jun 12 2015 libQuantLib.la
lrwxrwxrwx 1 root root 20 Jun 12 2015 libQuantLib.so -> libQuantLib.so.0.0.0
lrwxrwxrwx 1 root root 20 Jun 12 2015 libQuantLib.so.0 -> libQuantLib.so.0.0.0
-rwxr-xr-x 1 root root 365069474 Jun 12 2015 libQuantLib.so.0.0.0
This is my LD_LIBRARY_PATH
[idf#node1 cboe]$ echo $LD_LIBRARY_PATH
/opt/intel/lib/intel64:/opt/NAG/cll6i25dcl/lib:/usr/lib64:/usr/lib64/openmpi/lib:/usr/local/lib:/opt/intel/opencl/lib64:/usr/local/apr/lib:
[idf#node1 cboe]$

Zero-byte files in /usr/local/bin after AMI captured

I am launching an EC2 instance using Ansible and capturing an AMI image. I have verified that these dependencies get installed correctly on the instance. For example, this is what I get on the EC2 instance just before AMI imaging:
ubuntu#ip-1-2-3-4:/usr/local/bin$ ansible --version
ansible 1.4.4
-rwxr-xr-x 1 root root 5907 Jan 31 22:20 ansible
-rwxr-xr-x 1 root root 9269 Jan 31 22:20 ansible-doc
-rwxr-xr-x 1 root root 29163 Jan 31 22:20 ansible-galaxy
-rwxr-xr-x 1 root root 10419 Jan 31 22:20 ansible-playbook
-rwxr-xr-x 1 root root 6916 Jan 31 22:20 ansible-pull
-rwxr-xr-x 1 root root 714 Jan 31 22:19 aws
-rwxr-xr-x 1 root root 1408 Jan 31 22:19 aws.cmd
-rwxr-xr-x 1 root root 897 Jan 31 22:19 aws_completer
-rwxr-xr-x 1 root root 1860 Jan 31 22:19 aws_zsh_completer.sh
The problem is that once I capture an AMI and launch a new instance, I all files in /usr/local/bin are zero-byte files!
-rwxr-xr-x 1 root root 0 Jan 31 22:20 ansible
-rwxr-xr-x 1 root root 0 Jan 31 22:20 ansible-doc
-rwxr-xr-x 1 root root 0 Jan 31 22:20 ansible-galaxy
-rwxr-xr-x 1 root root 0 Jan 31 22:20 ansible-playbook
-rwxr-xr-x 1 root root 0 Jan 31 22:20 ansible-pull
-rwxr-xr-x 1 root root 0 Jan 31 22:19 aws
-rwxr-xr-x 1 root root 0 Jan 31 22:19 aws.cmd
-rwxr-xr-x 1 root root 0 Jan 31 22:19 aws_completer
-rwxr-xr-x 1 root root 0 Jan 31 22:19 aws_zsh_completer.sh
Why are these files being zero'ed out when I create a new instance from the AMI?
This was a problem with Ansible, not with AWS. Turns out there's a documentation bug in Ansible 1.4.4 where the ec2_ami module does not shut down and reboot the instance by default (the docs claim it does!). This causes all sorts of problems with file system integrity.
The fix is to include no_reboot: no in the Ansible task.