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

mesos: 1.0.1 -> 1.1.0 #21416

Merged
merged 1 commit into from Jan 22, 2017
Merged

mesos: 1.0.1 -> 1.1.0 #21416

merged 1 commit into from Jan 22, 2017

Conversation

cstrahan
Copy link
Contributor

@cstrahan cstrahan commented Dec 25, 2016

Motivation for this change

Update Mesos to 1.1.0.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

/cc @philip-wernersbach @kamilchm @benley @kevincox @ibrahimsag

@mention-bot
Copy link

@cstrahan, thanks for your PR! By analyzing the history of the files in this pull request, we identified @kamilchm, @kevincox and @pSub to be potential reviewers.

@cstrahan
Copy link
Contributor Author

I've fixed a few of the problems outlined in #19064, but I still need to figure out how to fix the python bindings.

@cstrahan
Copy link
Contributor Author

cstrahan commented Dec 26, 2016

Regarding the python problems:

I think the crash might have been introduced when we moved to protobuf 2.6 (from 2.5) when we moved to Mesos 1.0.1. With the protobuf 2.6 python bindings, we pass --cpp_implementation, which presumably links to the native lib instead of using pure python. (EDIT: this turned out to be false - our python protobuf package is broken and doesn't even include the C extension)

I don't know what the fix is, but I want to try the following:

  • Run a build of Mesos without the --cpp_implementation flag, just to sanity check things.
  • Run a build of Mesos with --cpp_implementation, but also pass --compile_static_extension.

@cstrahan
Copy link
Contributor Author

cstrahan commented Dec 26, 2016

--cpp_implementation didn't fix it.

So, I've built 0.28.2 to compare (from 7b1efbf), and I've also taken a look at the 1.1.0 deb package. Here's how things look:


0.28.2

$ ldd /nix/store/4zz1kl5mn3x2jm3j2g6i76h2zg8qdyw1-mesos-0.28.2/lib/libmesos.so
	linux-vdso.so.1 (0x00007ffd23ad8000)
	libglog.so.0 => /nix/store/zwqyy940fvdmw3zd25acaglrb3npnhlf-glog-0.3.4/lib/libglog.so.0 (0x00007f5e40fed000)
	libleveldb.so.1 => /nix/store/id76gqyh6x5rn3rqnm675wvn7vbr59a4-leveldb-1.18/lib/libleveldb.so.1 (0x00007f5e40d90000)
	libevent_openssl-2.0.so.5 => /nix/store/0c0ak33ijfbvzi7g6y7zc1hab616hdwb-libevent-2.0.22/lib/libevent_openssl-2.0.so.5 (0x00007f5e40b87000)
	libevent_pthreads-2.0.so.5 => /nix/store/0c0ak33ijfbvzi7g6y7zc1hab616hdwb-libevent-2.0.22/lib/libevent_pthreads-2.0.so.5 (0x00007f5e40984000)
	libevent-2.0.so.5 => /nix/store/0c0ak33ijfbvzi7g6y7zc1hab616hdwb-libevent-2.0.22/lib/libevent-2.0.so.5 (0x00007f5e4073b000)
	libnl-idiag-3.so.200 => /nix/store/zdmn563n7jfwrbm6igy13rzgdkqzq01k-libnl-3.2.28/lib/libnl-idiag-3.so.200 (0x00007f5e40532000)
	libnl-route-3.so.200 => /nix/store/zdmn563n7jfwrbm6igy13rzgdkqzq01k-libnl-3.2.28/lib/libnl-route-3.so.200 (0x00007f5e402c6000)
	libnl-3.so.200 => /nix/store/zdmn563n7jfwrbm6igy13rzgdkqzq01k-libnl-3.2.28/lib/libnl-3.so.200 (0x00007f5e400a5000)
	libsasl2.so.3 => /nix/store/4qxrvwlmadxx1a5p0ng6f2ansn7mxmjr-cyrus-sasl-2.1.26/lib/libsasl2.so.3 (0x00007f5e3fe86000)
	libresolv.so.2 => /nix/store/78sry5bqg60qx4cqqdfficbxshaj9adf-glibc-2.24/lib/libresolv.so.2 (0x00007f5e3fc6f000)
	libsvn_delta-1.so.0 => /nix/store/80247vblljjbipyx8i8kh36996jgbjck-subversion-1.9.4/lib/libsvn_delta-1.so.0 (0x00007f5e3fa5c000)
	libsvn_subr-1.so.0 => /nix/store/80247vblljjbipyx8i8kh36996jgbjck-subversion-1.9.4/lib/libsvn_subr-1.so.0 (0x00007f5e3f736000)
	libaprutil-1.so.0 => /nix/store/ar2iwj02cjw8ghx1ssw20p0nbmyhdqh1-apr-util-1.5.4/lib/libaprutil-1.so.0 (0x00007f5e3f50d000)
	libexpat.so.1 => /nix/store/a6hjv9f55ax12z5n0z3krispalv3j2ca-expat-2.2.0/lib/libexpat.so.1 (0x00007f5e3f2e3000)
	libsqlite3.so.0 => /nix/store/i2qcxwbfhrj391vw81y9v7yj55dbim0a-sqlite-3.14.1/lib/libsqlite3.so.0 (0x00007f5e3f009000)
	libapr-1.so.0 => /nix/store/3nfvxxbmz0f451f7sa0mqsmnaa28ya8f-apr-1.5.2/lib/libapr-1.so.0 (0x00007f5e3edd5000)
	libcrypt.so.1 => /nix/store/78sry5bqg60qx4cqqdfficbxshaj9adf-glibc-2.24/lib/libcrypt.so.1 (0x00007f5e3eb9a000)
	libpthread.so.0 => /nix/store/78sry5bqg60qx4cqqdfficbxshaj9adf-glibc-2.24/lib/libpthread.so.0 (0x00007f5e3e97d000)
	libdl.so.2 => /nix/store/78sry5bqg60qx4cqqdfficbxshaj9adf-glibc-2.24/lib/libdl.so.2 (0x00007f5e3e779000)
	libcurl.so.4 => /nix/store/4sflsm2kyizsrzvlppnwvmx2xw6qik2r-curl-7.50.1/lib/libcurl.so.4 (0x00007f5e3e506000)
	libnghttp2.so.14 => /nix/store/3dawp2fn8xxhcy6l0hpzbgkc97azk67p-nghttp2-1.10.0-lib/lib/libnghttp2.so.14 (0x00007f5e3e2df000)
	libssh2.so.1 => /nix/store/y1nvndkrbvj6j8rc7kx1yq8rsj49yiy5-libssh2-1.7.0/lib/libssh2.so.1 (0x00007f5e3e0b1000)
	libssl.so.1.0.0 => /nix/store/c2wywcsblyyiakx86mllygs23j2kkkhh-openssl-1.0.2h/lib/libssl.so.1.0.0 (0x00007f5e3de43000)
	libcrypto.so.1.0.0 => /nix/store/c2wywcsblyyiakx86mllygs23j2kkkhh-openssl-1.0.2h/lib/libcrypto.so.1.0.0 (0x00007f5e3da08000)
	libz.so.1 => /nix/store/yira0ix6cn5jd4h9g0rb70507yvdyksd-zlib-1.2.8/lib/libz.so.1 (0x00007f5e3d7f2000)
	librt.so.1 => /nix/store/78sry5bqg60qx4cqqdfficbxshaj9adf-glibc-2.24/lib/librt.so.1 (0x00007f5e3d5ea000)
	libstdc++.so.6 => /nix/store/cyxaswkikapsyl2ls8plf0nbbkhfaf8i-gcc-5.4.0-lib/lib/../lib64/libstdc++.so.6 (0x00007f5e3d270000)
	libm.so.6 => /nix/store/78sry5bqg60qx4cqqdfficbxshaj9adf-glibc-2.24/lib/libm.so.6 (0x00007f5e3cf6b000)
	libc.so.6 => /nix/store/78sry5bqg60qx4cqqdfficbxshaj9adf-glibc-2.24/lib/libc.so.6 (0x00007f5e3cbcd000)
	/nix/store/hwbvmr4imiyi5ziq6v2snynr7zf022b5-glibc-2.24/lib64/ld-linux-x86-64.so.2 (0x000055c5bf0f6000)
	libgcc_s.so.1 => /nix/store/cyxaswkikapsyl2ls8plf0nbbkhfaf8i-gcc-5.4.0-lib/lib/../lib64/libgcc_s.so.1 (0x00007f5e3c9b6000)

$ ldd /nix/store/4zz1kl5mn3x2jm3j2g6i76h2zg8qdyw1-mesos-0.28.2/lib/python2.7/site-packages/mesos/native/_mesos.so
	linux-vdso.so.1 (0x00007ffe92fc3000)
	libgcc_s.so.1 => /nix/store/78sry5bqg60qx4cqqdfficbxshaj9adf-glibc-2.24/lib/libgcc_s.so.1 (0x00007f09f612c000)
	libleveldb.so.1 => /nix/store/id76gqyh6x5rn3rqnm675wvn7vbr59a4-leveldb-1.18/lib/libleveldb.so.1 (0x00007f09f5ecf000)
	libglog.so.0 => /nix/store/zwqyy940fvdmw3zd25acaglrb3npnhlf-glog-0.3.4/lib/libglog.so.0 (0x00007f09f5c9e000)
	libpython2.7.so.1.0 => /nix/store/mq23lfyirlkp4qw3493vc1n3z9zgkx3x-python-2.7.12/lib/libpython2.7.so.1.0 (0x00007f09f58c0000)
	libevent_openssl-2.0.so.5 => /nix/store/0c0ak33ijfbvzi7g6y7zc1hab616hdwb-libevent-2.0.22/lib/libevent_openssl-2.0.so.5 (0x00007f09f56b9000)
	libcrypto.so.1.0.0 => /nix/store/c2wywcsblyyiakx86mllygs23j2kkkhh-openssl-1.0.2h/lib/libcrypto.so.1.0.0 (0x00007f09f527e000)
	libssl.so.1.0.0 => /nix/store/c2wywcsblyyiakx86mllygs23j2kkkhh-openssl-1.0.2h/lib/libssl.so.1.0.0 (0x00007f09f5010000)
	libevent_pthreads-2.0.so.5 => /nix/store/0c0ak33ijfbvzi7g6y7zc1hab616hdwb-libevent-2.0.22/lib/libevent_pthreads-2.0.so.5(0x00007f09f4e0d000)
	libevent-2.0.so.5 => /nix/store/0c0ak33ijfbvzi7g6y7zc1hab616hdwb-libevent-2.0.22/lib/libevent-2.0.so.5 (0x00007f09f4bc2000)
	libnl-idiag-3.so.200 => /nix/store/zdmn563n7jfwrbm6igy13rzgdkqzq01k-libnl-3.2.28/lib/libnl-idiag-3.so.200 (0x00007f09f49b9000)
	libnl-route-3.so.200 => /nix/store/zdmn563n7jfwrbm6igy13rzgdkqzq01k-libnl-3.2.28/lib/libnl-route-3.so.200 (0x00007f09f474d000)
	libnl-3.so.200 => /nix/store/zdmn563n7jfwrbm6igy13rzgdkqzq01k-libnl-3.2.28/lib/libnl-3.so.200 (0x00007f09f452c000)
	libsasl2.so.3 => /nix/store/4qxrvwlmadxx1a5p0ng6f2ansn7mxmjr-cyrus-sasl-2.1.26/lib/libsasl2.so.3 (0x00007f09f430f000)
	libsvn_delta-1.so.0 => /nix/store/80247vblljjbipyx8i8kh36996jgbjck-subversion-1.9.4/lib/libsvn_delta-1.so.0 (0x00007f09f40fc000)
	libsvn_subr-1.so.0 => /nix/store/80247vblljjbipyx8i8kh36996jgbjck-subversion-1.9.4/lib/libsvn_subr-1.so.0 (0x00007f09f3dd4000)
	libapr-1.so.0 => /nix/store/3nfvxxbmz0f451f7sa0mqsmnaa28ya8f-apr-1.5.2/lib/libapr-1.so.0 (0x00007f09f3ba0000)
	libcurl.so.4 => /nix/store/4sflsm2kyizsrzvlppnwvmx2xw6qik2r-curl-7.50.1/lib/libcurl.so.4 (0x00007f09f392d000)
	libz.so.1 => /nix/store/yira0ix6cn5jd4h9g0rb70507yvdyksd-zlib-1.2.8/lib/libz.so.1 (0x00007f09f3717000)
	librt.so.1 => /nix/store/78sry5bqg60qx4cqqdfficbxshaj9adf-glibc-2.24/lib/librt.so.1 (0x00007f09f350f000)
	libstdc++.so.6 => /nix/store/cyxaswkikapsyl2ls8plf0nbbkhfaf8i-gcc-5.4.0-lib/lib/libstdc++.so.6 (0x00007f09f3197000)
	libm.so.6 => /nix/store/78sry5bqg60qx4cqqdfficbxshaj9adf-glibc-2.24/lib/libm.so.6 (0x00007f09f2e90000)
	libpthread.so.0 => /nix/store/78sry5bqg60qx4cqqdfficbxshaj9adf-glibc-2.24/lib/libpthread.so.0 (0x00007f09f2c73000)
	libc.so.6 => /nix/store/78sry5bqg60qx4cqqdfficbxshaj9adf-glibc-2.24/lib/libc.so.6 (0x00007f09f28d5000)
	/nix/store/hwbvmr4imiyi5ziq6v2snynr7zf022b5-glibc-2.24/lib64/ld-linux-x86-64.so.2 (0x00005569a8ea1000)
	libdl.so.2 => /nix/store/78sry5bqg60qx4cqqdfficbxshaj9adf-glibc-2.24/lib/libdl.so.2 (0x00007f09f26d1000)
	libutil.so.1 => /nix/store/78sry5bqg60qx4cqqdfficbxshaj9adf-glibc-2.24/lib/libutil.so.1 (0x00007f09f24ce000)
	libresolv.so.2 => /nix/store/78sry5bqg60qx4cqqdfficbxshaj9adf-glibc-2.24/lib/libresolv.so.2 (0x00007f09f22b5000)
	libsqlite3.so.0 => /nix/store/i2qcxwbfhrj391vw81y9v7yj55dbim0a-sqlite-3.14.1/lib/libsqlite3.so.0 (0x00007f09f1fdd000)
	libaprutil-1.so.0 => /nix/store/ar2iwj02cjw8ghx1ssw20p0nbmyhdqh1-apr-util-1.5.4/lib/libaprutil-1.so.0 (0x00007f09f1db4000)
	libexpat.so.1 => /nix/store/a6hjv9f55ax12z5n0z3krispalv3j2ca-expat-2.2.0/lib/libexpat.so.1 (0x00007f09f1b8a000)
	libcrypt.so.1 => /nix/store/78sry5bqg60qx4cqqdfficbxshaj9adf-glibc-2.24/lib/libcrypt.so.1 (0x00007f09f194f000)
	libnghttp2.so.14 => /nix/store/3dawp2fn8xxhcy6l0hpzbgkc97azk67p-nghttp2-1.10.0-lib/lib/libnghttp2.so.14 (0x00007f09f1728000)
	libssh2.so.1 => /nix/store/y1nvndkrbvj6j8rc7kx1yq8rsj49yiy5-libssh2-1.7.0/lib/libssh2.so.1 (0x00007f09f14fa000)

1.1.0 (NixOS)

$ ldd /nix/store/irwmx4jyvmb1c3i4xykvnbb86ynkvjvq-mesos-1.0.1/lib/libmesos.so
	linux-vdso.so.1 (0x00007fff0758a000)
	libleveldb.so.1 => /nix/store/5h0wizsa981hd95agkcw1v0y48qm1h53-leveldb-1.18/lib/libleveldb.so.1 (0x00007f75f1f86000)
	libglog.so.0 => /nix/store/909z52mhyilscwn244mzpk80042r31mr-glog-0.3.4/lib/libglog.so.0 (0x00007f75f1d55000)
	libprotobuf.so.9 => /nix/store/sa55q8vm5d3wlq1844ywl4dggivm49rm-protobuf-2.6.1-lib/lib/libprotobuf.so.9 (0x00007f75f1a47000)
	libsvn_delta-1.so.0 => /nix/store/jmjk5wi9fr7sa1pdxhdjhnk23r2rs0ws-subversion-1.9.5/lib/libsvn_delta-1.so.0 (0x00007f75f1834000)
	libsvn_subr-1.so.0 => /nix/store/jmjk5wi9fr7sa1pdxhdjhnk23r2rs0ws-subversion-1.9.5/lib/libsvn_subr-1.so.0 (0x00007f75f150d000)
	libaprutil-1.so.0 => /nix/store/4q7pr0yg58j1hpk16ggz03nxdpi1v7k0-apr-util-1.5.4/lib/libaprutil-1.so.0 (0x00007f75f12e4000)
	libexpat.so.1 => /nix/store/2nvsa2m6ss08f7kz4wi26dp43x6gvav3-expat-2.2.0/lib/libexpat.so.1 (0x00007f75f10ba000)
	libsqlite3.so.0 => /nix/store/9fqd4xnrf7cxx0k4384hmjr2pcfr41l9-sqlite-3.15.2/lib/libsqlite3.so.0 (0x00007f75f0dbb000)
	libevent_openssl-2.0.so.5 => /nix/store/irimhimk9plpwsnmrw1dcj910xmnpd3g-libevent-2.0.22/lib/libevent_openssl-2.0.so.5 (0x00007f75f0bb4000)
	libsasl2.so.3 => /nix/store/np3nl0ykvci9p4kqkvi6nhrbdm1bjkx6-cyrus-sasl-2.5.10/lib/libsasl2.so.3 (0x00007f75f0997000)
	libresolv.so.2 => /nix/store/8lbpq1vmajrbnc96xhv84r87fa4wvfds-glibc-2.24/lib/libresolv.so.2 (0x00007f75f0780000)
	libnl-idiag-3.so.200 => /nix/store/5jwn7g9fbzn9nmvns1y3r04ivpvwbwww-libnl-3.2.28/lib/libnl-idiag-3.so.200 (0x00007f75f0577000)
	libnl-route-3.so.200 => /nix/store/5jwn7g9fbzn9nmvns1y3r04ivpvwbwww-libnl-3.2.28/lib/libnl-route-3.so.200 (0x00007f75f030b000)
	libnl-3.so.200 => /nix/store/5jwn7g9fbzn9nmvns1y3r04ivpvwbwww-libnl-3.2.28/lib/libnl-3.so.200 (0x00007f75f00e8000)
	libevent_pthreads-2.0.so.5 => /nix/store/irimhimk9plpwsnmrw1dcj910xmnpd3g-libevent-2.0.22/lib/libevent_pthreads-2.0.so.5 (0x00007f75efee5000)
	libevent-2.0.so.5 => /nix/store/irimhimk9plpwsnmrw1dcj910xmnpd3g-libevent-2.0.22/lib/libevent-2.0.so.5 (0x00007f75efc9c000)
	libcurl.so.4 => /nix/store/jic3d80c119cxkqdh62q5rq4cni2jjdb-curl-7.51.0/lib/libcurl.so.4 (0x00007f75efa28000)
	libnghttp2.so.14 => /nix/store/yizk9gj1ivjz56hciikapg614ldj2jdz-nghttp2-1.17.0-lib/lib/libnghttp2.so.14 (0x00007f75ef802000)
	libssh2.so.1 => /nix/store/dbqc46f5pyi8qh274d619ca90fdqxwf6-libssh2-1.7.0/lib/libssh2.so.1 (0x00007f75ef5d4000)
	libssl.so.1.0.0 => /nix/store/f7vp024rwfnmzm17p3c6ji3zc79a5vyr-openssl-1.0.2j/lib/libssl.so.1.0.0 (0x00007f75ef364000)
	libcrypto.so.1.0.0 => /nix/store/f7vp024rwfnmzm17p3c6ji3zc79a5vyr-openssl-1.0.2j/lib/libcrypto.so.1.0.0 (0x00007f75eef28000)
	libapr-1.so.0 => /nix/store/8b380pg44z2da1kl76xb777n1gm3rnv2-apr-1.5.2/lib/libapr-1.so.0 (0x00007f75eecf4000)
	libcrypt.so.1 => /nix/store/8lbpq1vmajrbnc96xhv84r87fa4wvfds-glibc-2.24/lib/libcrypt.so.1 (0x00007f75eeab9000)
	libpthread.so.0 => /nix/store/8lbpq1vmajrbnc96xhv84r87fa4wvfds-glibc-2.24/lib/libpthread.so.0 (0x00007f75ee89c000)
	libdl.so.2 => /nix/store/8lbpq1vmajrbnc96xhv84r87fa4wvfds-glibc-2.24/lib/libdl.so.2 (0x00007f75ee698000)
	libz.so.1 => /nix/store/nlvp2f6p41k0bf3ymqkmsg2llqm19xwp-zlib-1.2.8/lib/libz.so.1 (0x00007f75ee480000)
	librt.so.1 => /nix/store/8lbpq1vmajrbnc96xhv84r87fa4wvfds-glibc-2.24/lib/librt.so.1 (0x00007f75ee278000)
	libstdc++.so.6 => /nix/store/h9nfcpcmnax1pi2lz897irbk822833vq-gcc-5.4.0-lib/lib/../lib64/libstdc++.so.6 (0x00007f75edf00000)
	libm.so.6 => /nix/store/8lbpq1vmajrbnc96xhv84r87fa4wvfds-glibc-2.24/lib/libm.so.6 (0x00007f75edbfb000)
	libc.so.6 => /nix/store/8lbpq1vmajrbnc96xhv84r87fa4wvfds-glibc-2.24/lib/libc.so.6 (0x00007f75ed85d000)
	/nix/store/hwbvmr4imiyi5ziq6v2snynr7zf022b5-glibc-2.24/lib64/ld-linux-x86-64.so.2 (0x0000559bf471d000)
	libgcc_s.so.1 => /nix/store/h9nfcpcmnax1pi2lz897irbk822833vq-gcc-5.4.0-lib/lib/../lib64/libgcc_s.so.1 (0x00007f75ed646000)

$ ldd /nix/store/irwmx4jyvmb1c3i4xykvnbb86ynkvjvq-mesos-1.0.1/lib/python2.7/site-packages/mesos/executor/_executor.so
	linux-vdso.so.1 (0x00007ffe8f528000)
	libgcc_s.so.1 => /nix/store/8lbpq1vmajrbnc96xhv84r87fa4wvfds-glibc-2.24/lib/libgcc_s.so.1 (0x00007fbc1d396000)
	libleveldb.so.1 => /nix/store/5h0wizsa981hd95agkcw1v0y48qm1h53-leveldb-1.18/lib/libleveldb.so.1 (0x00007fbc1d139000)
	libglog.so.0 => /nix/store/909z52mhyilscwn244mzpk80042r31mr-glog-0.3.4/lib/libglog.so.0 (0x00007fbc1cf0a000)
	libprotobuf.so.9 => /nix/store/sa55q8vm5d3wlq1844ywl4dggivm49rm-protobuf-2.6.1-lib/lib/libprotobuf.so.9 (0x00007fbc1cbfa000)
	libpython2.7.so.1.0 => /nix/store/q45sl6xg6ah6896v0f1nyvbixss5j9y6-python-2.7.13/lib/libpython2.7.so.1.0 (0x00007fbc1c81a000)
	libz.so.1 => /nix/store/nlvp2f6p41k0bf3ymqkmsg2llqm19xwp-zlib-1.2.8/lib/libz.so.1 (0x00007fbc1c604000)
	libevent_openssl-2.0.so.5 => /nix/store/irimhimk9plpwsnmrw1dcj910xmnpd3g-libevent-2.0.22/lib/libevent_openssl-2.0.so.5 (0x00007fbc1c3fd000)
	libcrypto.so.1.0.0 => /nix/store/f7vp024rwfnmzm17p3c6ji3zc79a5vyr-openssl-1.0.2j/lib/libcrypto.so.1.0.0 (0x00007fbc1bfc1000)
	libssl.so.1.0.0 => /nix/store/f7vp024rwfnmzm17p3c6ji3zc79a5vyr-openssl-1.0.2j/lib/libssl.so.1.0.0 (0x00007fbc1bd53000)
	libevent_pthreads-2.0.so.5 => /nix/store/irimhimk9plpwsnmrw1dcj910xmnpd3g-libevent-2.0.22/lib/libevent_pthreads-2.0.so.5 (0x00007fbc1bb4e000)
	libevent-2.0.so.5 => /nix/store/irimhimk9plpwsnmrw1dcj910xmnpd3g-libevent-2.0.22/lib/libevent-2.0.so.5 (0x00007fbc1b905000)
	librt.so.1 => /nix/store/8lbpq1vmajrbnc96xhv84r87fa4wvfds-glibc-2.24/lib/librt.so.1 (0x00007fbc1b6fd000)
	libstdc++.so.6 => /nix/store/h9nfcpcmnax1pi2lz897irbk822833vq-gcc-5.4.0-lib/lib/libstdc++.so.6 (0x00007fbc1b385000)
	libm.so.6 => /nix/store/8lbpq1vmajrbnc96xhv84r87fa4wvfds-glibc-2.24/lib/libm.so.6 (0x00007fbc1b080000)
	libpthread.so.0 => /nix/store/8lbpq1vmajrbnc96xhv84r87fa4wvfds-glibc-2.24/lib/libpthread.so.0 (0x00007fbc1ae63000)
	libc.so.6 => /nix/store/8lbpq1vmajrbnc96xhv84r87fa4wvfds-glibc-2.24/lib/libc.so.6 (0x00007fbc1aac3000)
	/nix/store/hwbvmr4imiyi5ziq6v2snynr7zf022b5-glibc-2.24/lib64/ld-linux-x86-64.so.2 (0x000056087d735000)
	libdl.so.2 => /nix/store/8lbpq1vmajrbnc96xhv84r87fa4wvfds-glibc-2.24/lib/libdl.so.2 (0x00007fbc1a8bf000)
	libutil.so.1 => /nix/store/8lbpq1vmajrbnc96xhv84r87fa4wvfds-glibc-2.24/lib/libutil.so.1 (0x00007fbc1a6bc000)

1.1.0 (deb pkg)

$ ldd ./usr/lib/libmesos.so
	linux-vdso.so.1 (0x00007fffebbd4000)
	libpthread.so.0 => /nix/store/6fix3zqpnahyml8zp2sxi2rwan55rgb8-glibc-2.24/lib/libpthread.so.0 (0x00007effddd4b000)
	libsvn_delta-1.so.1 => not found
	libsvn_subr-1.so.1 => not found
	libevent_openssl-2.0.so.5 => not found
	libcrypto.so.1.0.0 => not found
	libssl.so.1.0.0 => not found
	libsasl2.so.2 => not found
	libevent_pthreads-2.0.so.5 => not found
	libevent-2.0.so.5 => not found
	libcurl.so.4 => not found
	libapr-1.so.0 => not found
	libz.so.1 => not found
	librt.so.1 => /nix/store/6fix3zqpnahyml8zp2sxi2rwan55rgb8-glibc-2.24/lib/librt.so.1 (0x00007effddb3f000)
	libstdc++.so.6 => not found
	libm.so.6 => /nix/store/6fix3zqpnahyml8zp2sxi2rwan55rgb8-glibc-2.24/lib/libm.so.6 (0x00007effdd83a000)
	libc.so.6 => /nix/store/6fix3zqpnahyml8zp2sxi2rwan55rgb8-glibc-2.24/lib/libc.so.6 (0x00007effdd49c000)
	/nix/store/6fix3zqpnahyml8zp2sxi2rwan55rgb8-glibc-2.24/lib64/ld-linux-x86-64.so.2 (0x000056161b403000)
	libgcc_s.so.1 => /nix/store/6fix3zqpnahyml8zp2sxi2rwan55rgb8-glibc-2.24/lib/libgcc_s.so.1 (0x00007effdd286000)

$ ldd ./usr/lib/python2.7/site-packages/mesos/executor/_executor.so
	linux-vdso.so.1 (0x00007fff553fc000)
	libz.so.1 => not found
	libevent_openssl-2.0.so.5 => not found
	libcrypto.so.1.0.0 => not found
	libssl.so.1.0.0 => not found
	libevent_pthreads-2.0.so.5 => not found
	libevent-2.0.so.5 => not found
	librt.so.1 => /nix/store/6fix3zqpnahyml8zp2sxi2rwan55rgb8-glibc-2.24/lib/librt.so.1 (0x00007fa8e29a9000)
	libstdc++.so.6 => not found
	libm.so.6 => /nix/store/6fix3zqpnahyml8zp2sxi2rwan55rgb8-glibc-2.24/lib/libm.so.6 (0x00007fa8e26a4000)
	libgcc_s.so.1 => /nix/store/6fix3zqpnahyml8zp2sxi2rwan55rgb8-glibc-2.24/lib/libgcc_s.so.1 (0x00007fa8e248e000)
	libpthread.so.0 => /nix/store/6fix3zqpnahyml8zp2sxi2rwan55rgb8-glibc-2.24/lib/libpthread.so.0 (0x00007fa8e2271000)
	libc.so.6 => /nix/store/6fix3zqpnahyml8zp2sxi2rwan55rgb8-glibc-2.24/lib/libc.so.6 (0x00007fa8e1ed1000)
	/nix/store/6fix3zqpnahyml8zp2sxi2rwan55rgb8-glibc-2.24/lib64/ld-linux-x86-64.so.2 (0x000055c821099000)

One thing that stands out is that in both the 0.28.2 package and the debian package of 1.1.0: libprotobuf is statically linked.

I suspect this is due to telling the mesos build system to use our package of protobuf, as opposed to using the bundled version. I'll see if building with the bundled version resolves things, and if that works, I'll see if I can write a patch to have mesos always statically link the lib (and then I'll see if I can upstream that patch).

@cstrahan
Copy link
Contributor Author

@kamilchm I fixed the libprotobuf+python problems by statically linking libprotobuf:

    substituteInPlace 3rdparty/stout/Makefile.am \
      --replace "-lprotobuf" \
                "${pythonProtobuf.protobuf.lib}/lib/libprotobuf.a"

    substituteInPlace src/python/native_common/ext_modules.py.in \
      --replace "-lprotobuf" \
                "${pythonProtobuf.protobuf.lib}/lib/libprotobuf.a"

    substituteInPlace src/Makefile.am \
      --replace "-lprotobuf" \
                "${pythonProtobuf.protobuf.lib}/lib/libprotobuf.a"

I'm running one more build to sanity check. However, I'm pretty sure that the package is now in a state that I feel comfortable asking for testing. So for anyone following this PR, please do try it out and let me know if you run into any issues. In the meantime, I'm going to try to write some tests.

@cstrahan
Copy link
Contributor Author

@kamilchm I'm getting an error that, from looking through the IRC logs, I see you too were running into:

mesos-slave[700]: Failed to create a containerizer: Could not create DockerContainerizer: Failed to create docker: Failed to getdocker version: Failed to execute '/nix/store/8gayxk8vg453asxypc1qvmvsbdarybcv-docker-1.12.5/libexec/docker/docker -H unix:///var/run/docker/libcontainerd/docker-containerd.sock --version': terminated with signal Aborted

Interestingly, if I override the docker path in the following ways and I still get the same "Aborted" error:

  1. --docker=${pkgs.coreutils}/bin/true
  2. --docker=does-not-exist

So it's clearly not a problem invoking docker - it would seem that the subprocess function is failing at some point inside the child process (i.e. after the call to clone) before it ever execs the target program.

I've sprinkled in some LOG statements, and I'll see if I can figure out where precisely it's failing, and then I'll try to step through with gdb.

@cstrahan
Copy link
Contributor Author

So, it's definitely failing at the os::execvpe call, and I presume the abort is due to the following ABORT (the message doesn't show up in the logs because stdout/stderr have been redirected). I'll see what errno is and see if I can figure out what's going on.

@cstrahan
Copy link
Contributor Author

cstrahan commented Dec 27, 2016

Ah, that's because, per the problems mentioned in the previous PR, I removed the patch to set os::Shell::name to the ${pkgs.stdenv}/bin/sh, and the variant of subprocess that is used here is one that uses that shell (which is just sh). So os::execvpe fails with errno 2 (No such file or directory).

For the curious, here's what gets invoked:

slave# [    3.702704] mesos-slave[687]: XXX execing program: sh
slave# [    3.703439] mesos-slave[687]: XXX argv[0]=sh
slave# [    3.704073] mesos-slave[687]: XXX argv[1]=-c
slave# [    3.704733] mesos-slave[687]: XXX argv[2]=/nix/store/8gayxk8vg453asxypc1qvmvsbdarybcv-docker-1.12.5/libexec/docker/docker -H unix:///var/run/docker.sock --version
slave# [    3.705925] mesos-slave[687]: XXX envp[0]=LANG=en_US.UTF-8
slave# [    3.706767] mesos-slave[687]: XXX envp[1]=PATH=/nix/store/8gayxk8vg453asxypc1qvmvsbdarybcv-docker-1.12.5/bin:/nix/store/cymbr3a1s7d1zj4073mb85hb0vdrr4la-coreutils-8.26/bin:/nix/store/r2g04csk4flx3v9kf5g0i3h6j7m5wfq1-findutils-4.6.0/bin:/nix/store/rff8mpdyx6782qr12y65vc05f7n16qhb-gnugrep-2.27/bin:/nix/store/64xlllqh7gak9kf7g608ck5axd29r98k-gnused-4.2.2/bin:/nix/store/4maz3hyzx3m0m4w11988w8l8y4l9h2y7-systemd-231/bin:/nix/store/8gayxk8vg453asxypc1qvmvsbdarybcv-docker-1.12.5/sbin:/nix/store/cymbr3a1s7d1zj4073mb85hb0vdrr4la-coreutils-8.26/sbin:/nix/store/r2g04csk4flx3v9kf5g0i3h6j7m5wfq1-findutils-4.6.0/sbin:/nix/store/rff8mpdyx6782qr12y65vc05f7n16qhb-gnugrep-2.27/sbin:/nix/store/64xlllqh7gak9kf7g608ck5axd29r98k-gnused-4.2.2/sbin:/nix/store/4maz3hyzx3m0m4w11988w8l8y4l9h2y7-systemd-231/sbin
slave# [    3.709971] mesos-slave[687]: XXX envp[2]=JOURNAL_STREAM=8:12999
slave# [    3.710672] mesos-slave[687]: XXX envp[3]=GCOV_PREFIX=/tmp/xchg/coverage-data
slave# [    3.711411] mesos-slave[687]: XXX envp[4]=LOCALE_ARCHIVE=/nix/store/261s1323apwhv8xszff5w2nz2myrk1d8-glibc-locales-2.24/lib/locale/locale-archive
slave# [    3.712420] mesos-slave[687]: XXX envp[5]=MESOS_CONTAINERIZERS=mesos,docker
slave# [    3.713175] mesos-slave[687]: XXX envp[6]=TZDIR=/nix/store/aacmjq0zmkcwchaxz7zs5lnh176jv9qf-tzdata-2016f/share/zoneinfo
slave# [    3.714108] mesos-slave[687]: XXX envp[7]=LIBPROCESS_IP=0.0.0.0
slave# [    3.714812] mesos-slave[687]: XXX envp[8]=LIBPROCESS_PORT=5051
slave# [    3.715637] mesos-slave[687]: XXX failed to exec: (2) No such file or directory

@cstrahan cstrahan force-pushed the mesos-1.1.0 branch 3 times, most recently from fba5a15 to e053900 Compare December 27, 2016 10:23
@kamilchm
Copy link
Member

@cstrahan It was some time ago when I was trying to run different NixOS configuration. However, I would stick with nixos tests which I introduced later. If we find new bugs these needs to be added to the test module.
Good work with the python bindings 👍
I'll try to test all your changes before the weekend.

@cstrahan
Copy link
Contributor Author

I resolved the os::Shell::name problem by replacing "sh" with "/bin/sh". Now the master and agent both run without crashing.

I'm still adapting @kamilchm's tests, as I'm running into issues with the "docker" containerizer (it really wants to connect to the internet to fetch the test image, despite having already docker loaded the image...). I'm going to try switching to the "mesos" containerizer and point the agent at a directory containing the test image(s) via --docker_registry.

@cstrahan
Copy link
Contributor Author

Oh, so I made some bad assumptions, and I need to patch out some more paths. I'm going to let mesos build overnight, and then I'll update this tomorrow morning. Hopefully that's the last big change before I have the new tests working.

@cstrahan
Copy link
Contributor Author

Hm... So I'm having a hard time deciding what to do about os::Shell::name. In the original source it's "sh", but that causes the initial docker --version check (and other similar shell invocations at early startup) to fail, because it's not guaranteed that sh is on $PATH. I suppose we could either depend on sh being on $PATH via the systemd unit, or find some way (via a wrapper or patches to the source) to ensure any invocation of the mesos binaries has $PATH setup accordingly.

Another option, and the one I've been experimenting with up to now, is to patch the source so os::Shell::name is "/bin/sh". The problem there is that os::Shell::name is also used within the chrooted container environments too, which will fail when the container's rootfs doesn't have /bin/sh. Now, it crossed my mind that stuff like system(3) will fail when /bin/sh doesn't exist, so maybe we can get away with treating such scenarios as wrong and unsupported; however, that's clearly not what mesos is doing - they expect that, in the case of Docker images, the Env setting will setup $PATH so that sh will resolve. Therefore, I'm inclined to think we shouldn't change that behavior, and thus we should keep "sh". The question now is: by what means shall we ensure sh will resolve on the host, which takes us back to the options outlined in the preceding paragraph.

When creating images with our dockerTools functions, we should probably just assume that the user is savvy enough to know to set Env so that sh is on $PATH.

@cstrahan
Copy link
Contributor Author

cstrahan commented Dec 28, 2016

I think, for now, I'm going to add stdenv.shellPackage to the systemd unit's path setting. We can revisit this part at a later time, if anyone develops strong feelings about how to do this.

@kamilchm
Copy link
Member

kamilchm commented Dec 28, 2016

It reminds me my confusion about tar and gzip #13783 (comment) which led me to https://github.com/NixOS/nixpkgs/pull/19825/files#diff-240e08313b497d1d9110d6eb6b416e0eR49
I don't know how to decide what is the smallest usable dependency set to fulfill basic mesos use cases?
What are the drawbacks of modifying $PATH with wrapper?

@cstrahan
Copy link
Contributor Author

What are the drawbacks of modifying $PATH with wrapper?

I might switch to wrappers... I'll have to give it some thought. I don't like the indirection, but the simplicity of that approach might outweigh any objections to wrappers.

@philip-wernersbach
Copy link

We shouldn't place additional restrictions on containers, outside of what Mesos does itself. We should always be able to run the same containers on a NixOS Mesos as on a Mesosphere Mesos, etc. I agree that forcing the container shell to /bin/sh is bad.

@cstrahan
Copy link
Contributor Author

@philip-wernersbach Thanks for the feedback! Are you using Mesos on NixOS? Curious how things have been working for you, if so.

@cstrahan
Copy link
Contributor Author

As of the last push, @kamilchm's test cases pass (with some minor edits, e.g. using mesos executor instead of docker). There are also a handful of new module options that I've found useful while testing Mesos locally and in the NixOS tests.

@philip-wernersbach
Copy link

philip-wernersbach commented Dec 29, 2016

@cstrahan No, we're using Mesos 1.0.1 on CentOS, installed via Nix and Disnix (@svanderburg). Except for the problems noted here and here, which I've fixed with hacks, everything is working well for our use case. Which is using Marathon with the Mesos containerizer.

@cstrahan
Copy link
Contributor Author

@philip-wernersbach gotcha. The second issue(s) should be fixed now, but I'll need to check the SSL/curl problem. What was the hack you had to do to fix it?

Copy link
Member

@kamilchm kamilchm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested my use cases and it works for me.
Great work that makes Mesos on NixOS fully usable as it was before 1.0!

master = "master:5050";
dockerRegistry = registry;
executorEnvironmentVariables = {
PATH = "/run/current-system/sw/bin";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be the default to make Mesos on NixOS behaves the sames as in other distros? @philip-wernersbach

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kamilchm In the test framework in mesos_test.py we set the command to cat test.result, but that'll only work if cat is accessible on $PATH (in the original source (which remains unchanged, btw), the default mesos agent path is the typical /bin:/usr/bin:...etc..., so on normal distros cat and such would be on $PATH). So, to keep our test simple (that is, to avoid patching in the full path to cat in mesos_test.py) we mimic how mesos would run on other distros by using /run/current-system/sw/bin in this test case.

Alternatively, we could set the default to /run/current-system/sw/bin (e.g. via the executorEnvironmentVariables.PATH) so stuff like coreutils are accessible by default, and then we could remove this line.

Thoughts?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I think it's reasonable to keep it explicit.

self.download_uri = sys.argv[2]

def resourceOffers(self, driver, offers):
log("XXX got resource offer")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XXX -> NixosTestScheduler?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'll make that change before merging.

};

patches = [
# https://reviews.apache.org/r/36610/
# TODO: is this still needed?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this patch is no longer needed since https://reviews.apache.org/r/46730/ was merged

@grahamc
Copy link
Member

grahamc commented Jan 10, 2017

Should this be merged? Or is it a WIP?

@cstrahan
Copy link
Contributor Author

I think this is, at this point, strictly an improvement on what we had before, and shouldn't introduce any regressions. So it should be safe to merge, though I do want to make some minor changes here and there.

@grahamc
Copy link
Member

grahamc commented Jan 11, 2017

Ok, since you have merge rights I'll just leave it to you :)

@cstrahan
Copy link
Contributor Author

Alright, think I've waited long enough; merging.

@cstrahan cstrahan merged commit d298a96 into NixOS:master Jan 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants