Skip to content

Instantly share code, notes, and snippets.

@rukletsov
rukletsov / slave log
Created August 27, 2014 21:52
Task: crashed but not reaped
I0827 23:42:46.648185 70000640 exec.cpp:293] Executor asked to run task '00000-crwl'
I0827 23:42:46.648599 70000640 exec.cpp:302] Executor::launchTask took 415us
I0827 23:42:46.648707 68927488 process.cpp:2771] Resuming executor(1)@192.168.178.36:58556 at 2014-08-27 21:42:46.648720128+00:00
I0827 23:42:46.656939 68927488 exec.cpp:525] Executor sending status update TASK_RUNNING (UUID: 31a53d20-45de-4a30-8d9d-d41a77e7222c) for task 00000-crwl of framework 20140827-112812-16777343-5050-71902-0016
I0827 23:42:46.657642 72683520 pid.cpp:87] Attempting to parse 'slave(1)@192.168.178.36:5051' into a PID
I0827 23:42:46.657665 72683520 process.cpp:875] Parsed message name 'mesos.internal.StatusUpdateAcknowledgementMessage' for executor(1)@192.168.178.36:58556 from slave(1)@192.168.178.36:5051
I0827 23:42:46.657691 71073792 process.cpp:2771] Resuming executor(1)@192.168.178.36:58556 at 2014-08-27 21:42:46.657704960+00:00
I0827 23:42:46.657695 70537216 process.cpp:2771] Resuming __gc__@192.168.178.36:58556 at 2014-08-2
@rukletsov
rukletsov / force_shutdown_test
Last active August 29, 2015 14:07
Task force shutdown test
// This test runs two long-living tasks, one responsive to SIGTERM and
// one not, with a small graceful shutdown period. The tasks are unable
// to shutdown in the given timeout and are killed by the executor.
TEST_F(SlaveTest, MesosExecutorForceShutdown)
{
Try<PID<Master>> master = StartMaster();
ASSERT_SOME(master);
// Make the grace period not bigger than the reap interval.
// TODO(alex): Use libprocess constant once it's available.
@rukletsov
rukletsov / force_shutdown_test_1
Created October 8, 2014 15:03
Force shutdown test case 1
TEST_F(SlaveTest, MesosExecutorForceShutdown)
{
Try<PID<Master>> master = StartMaster();
ASSERT_SOME(master);
// Make the grace period not bigger than the reap interval.
// TODO(alex): Use libprocess constant once it's available.
auto minReapInterval = Seconds(5);
slave::Flags flags = CreateSlaveFlags();
flags.executor_shutdown_grace_period = minReapInterval;
I1023 12:18:31.889570 20720 pid.cpp:87] Attempting to parse 'master@172.31.1.35:5050' into a PID
I1023 12:18:31.889626 20720 detector.cpp:377] A new leading master (UPID=master@172.31.1.35:5050) is detected
I1023 12:18:31.889662 20720 process.cpp:3190] Resuming scheduler(1)@172.31.5.3:42260 at 2014-10-23 12:18:31.889659904+00:00
I1023 12:18:31.889683 20720 pid.cpp:87] Attempting to parse 'master@172.31.1.35:5050' into a PID
I1023 12:18:31.889695 20720 sched.cpp:222] New master detected at master@172.31.1.35:5050
I1023 12:18:31.891830 20720 process.cpp:2463] Connecting to ip-172-31-1-35.eu-west-1.compute.internal
I1023 12:18:31.891844 20720 ssl.cpp:1047] SSLTransport::connect(10)
I1023 12:18:31.891877 20720 sched.cpp:230] No credentials provided. Attempting to register without authentication
I1023 12:18:31.891897 20720 sched.cpp:466] Sending registration request to master@172.31.1.35:5050
I1023 12:18:31.891971 20723 process.cpp:3190] Resuming (3)@172.31.5.3:42260 at 2014-10-23 12:18:31.891966976+00:00
I1023 12:39:23.334180 20897 pid.cpp:87] Attempting to parse 'master@172.31.1.35:5050' into a PID
I1023 12:39:23.334216 20897 sched.cpp:222] New master detected at master@172.31.1.35:5050
I1023 12:39:23.334555 20897 process.cpp:2463] Connecting to ip-172-31-1-35.eu-west-1.compute.internal
I1023 12:39:23.334614 20897 sched.cpp:230] No credentials provided. Attempting to register without authentication
I1023 12:39:23.334647 20897 sched.cpp:466] Sending registration request to master@172.31.1.35:5050
I1023 12:39:23.334734 20897 process.cpp:3190] Resuming (2)@172.31.5.3:33334 at 2014-10-23 12:39:23.334731008+00:00
I1023 12:39:23.334861 20902 raw_transport.cpp:129] RawTransportConnection::write(source=0x7f20a8008b68, size=247)
I1023 12:39:23.335687 20902 process.cpp:1309] Socket error while receiving: Connection reset by peer
I1023 12:39:23.335726 20902 socket.hpp:160] Shutting down connection on socket: 9
I1023 12:39:23.335750 20902 process.cpp:2333] Shutting down connection: 9
I1023 12:46:44.891999 20688 process.cpp:3190] Resuming hierarchical-allocator(1)@172.31.1.35:5050 at 2014-10-23 12:46:44.891993088+00:00
I1023 12:46:44.892047 20688 hierarchical_allocator_process.hpp:686] Performed allocation for 1 slaves in 14806ns
I1023 12:46:45.522876 20690 process.cpp:1599] Accepting from ip-172-31-5-3.eu-west-1.compute.internal
I1023 12:46:45.522927 20690 ssl.cpp:1060] SSLTransport::accept(30)
I1023 12:46:45.523008 20690 process.cpp:1606] error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request
I1023 12:46:45.892540 20689 process.cpp:3190] Resuming hierarchical-allocator(1)@172.31.1.35:5050 at 2014-10-23 12:46:45.892528896+00:00
I1023 12:46:45.892612 20689 hierarchical_allocator_process.hpp:686] Performed allocation for 1 slaves in 16002ns
I1023 12:46:46.524047 20690 process.cpp:1599] Accepting from ip-172-31-5-3.eu-west-1.compute.internal
I1023 12:46:46.524101 20690 ssl.cpp:1060] SSLTransport::accept(30)
I1023 12:46:46.524183 20690 process.cpp:1606] error:1407609C:SSL routines:SS
@rukletsov
rukletsov / gist:6402a1a951637b24afb3
Created February 4, 2015 19:11
FUTURE_PROTOBUF & ExecutorRegisteredMessage
I0204 20:06:50.940923 2135221008 exec.cpp:147] Version: 0.22.0
I0204 20:06:50.943150 169402368 exec.cpp:221] Executor registered on slave 20150204-200650-2332431020-53806-4703-S0
Registered executor on 172.18.6.139
Starting task 9f0d18f8-2e6c-4ab8-9396-cdf5d5aa154c
sh -c 'sleep 1000'
Forked command at 4744
../../../src/tests/slave_tests.cpp:1747: Failure
Failed to wait 15secs for executorRegisteredMessage
Updated task (command) grace period to 10
Check in _runTask: (command)10
Check executor in _runTask: 0
Launch containerizer (command exec)
Setting up environment (mesos containerizer)
Parsed env value (command executor) is 3secs
!!! ExecutorGracePeriod: 3secs
!!! Shutdown timeout in executor: 3secs
!!! ExecGracePeriod: 4secs
!! Delivered message mesos.internal.RegisterExecutorMessage
@rukletsov
rukletsov / auto_eg.cpp
Last active August 29, 2015 14:18
Auto benefits
// A case for a more liberal use of `auto`: it's not always easy to get the type correct.
std::map<K, V> data;
for (const std::pair<K, V>& pair : data) {}
for (const auto& pair : data) {}
// First: data.size() copies.
// Second: 0 copies.
// Why? `std::map<K, V>::value_type` is `std::pair<const K, V>`, not `std::pair<K, V>`
Registered executor on srv2.hw.ca1.mesosphere.com
MESOS_NATIVE_JAVA_LIBRARY is not set. Searching in /usr/lib /usr/local/lib.
MESOS_NATIVE_LIBRARY, MESOS_NATIVE_JAVA_LIBRARY set to '/usr/lib/libmesos.so'
Starting task mom-alex-state-explosion-02-marathon.cd46a0c8-df90-11e4-9504-9a3f8a67e915
Forked command at 7450
/bin/sh -c exit `docker wait mesos-eab8609e-7902-453c-ae86-933264bda68d`
[2015-04-10 14:49:35,989] INFO Starting Marathon 0.8.2-SNAPSHOT (mesosphere.marathon.Main$:20)
[2015-04-10 14:49:38,259] INFO Connecting to Zookeeper... (mesosphere.marathon.Main$:39)
[2015-04-10 14:49:38,274] INFO Client environment:zookeeper.version=3.3.3-1203054, built on 11/17/2011 05:47 GMT (org.apache.zookeeper.ZooKeeper:97)
[2015-04-10 14:49:38,274] INFO Client environment:host.name=srv2.hw.ca1.mesosphere.com (org.apache.zookeeper.ZooKeeper:97)