Project: mesos
Issue MESOS-4961: ContainerLoggerTest.LOGROTATE_RotateInSandbox is flaky
The logger subprocesses may exit before we reach the {{waitpid}} in the test. If this happens, {{waitpid}} will return a {{-1}} as the process no longer exists. Verbose logs: {code} [ RUN ] ContainerLoggerTest.LOGROTATE_RotateInSandbox I0316 14:28:51.329337 1242 cluster.cpp:139] Creating default 'local' authorizer I0316 14:28:51.332823 1242 leveldb.cpp:174] Opened db in 3.079559ms I0316 14:28:51.333916 1242 leveldb.cpp:181] Compacted db in 1.054247ms I0316 14:28:51.333979 1242 leveldb.cpp:196] Created db iterator in 21450ns I0316 14:28:51.334005 1242 leveldb.cpp:202] Seeked to beginning of db in 2205ns I0316 14:28:51.334025 1242 leveldb.cpp:271] Iterated through 0 keys in the db in 410ns I0316 14:28:51.334089 1242 replica.cpp:779] Replica recovered with log positions 0 -> 0 with 1 holes and 0 unlearned I0316 14:28:51.334661 1275 recover.cpp:447] Starting replica recovery I0316 14:28:51.335044 1275 recover.cpp:473] Replica is in EMPTY status I0316 14:28:51.336207 1262 replica.cpp:673] Replica in EMPTY status received a broadcasted recover request from (484)@172.17.0.3:45919 I0316 14:28:51.336730 1270 recover.cpp:193] Received a recover response from a replica in EMPTY status I0316 14:28:51.337257 1275 recover.cpp:564] Updating replica status to STARTING I0316 14:28:51.338001 1267 leveldb.cpp:304] Persisting metadata (8 bytes) to leveldb took 537200ns I0316 14:28:51.338032 1267 replica.cpp:320] Persisted replica status to STARTING I0316 14:28:51.338183 1261 master.cpp:376] Master c7653f60-33e9-4406-9f62-dc74c906bf83 (2cbb23302fe5) started on 172.17.0.3:45919 I0316 14:28:51.338295 1263 recover.cpp:473] Replica is in STARTING status I0316 14:28:51.338213 1261 master.cpp:378] Flags at startup: --acls="" --allocation_interval="1secs" --allocator="HierarchicalDRF" --authenticate="true" --authenticate_http="true" --authenticate_slaves="true" --authenticators="crammd5" --authorizers="local" --credentials="/tmp/XtqwkS/credentials" --framework_sorter="drf" --help="false" --hostname_lookup="true" --http_authenticators="basic" --initialize_driver_logging="true" --log_auto_initialize="true" --logbufsecs="0" --logging_level="INFO" --max_completed_frameworks="50" --max_completed_tasks_per_framework="1000" --max_slave_ping_timeouts="5" --quiet="false" --recovery_slave_removal_limit="100%" --registry="replicated_log" --registry_fetch_timeout="1mins" --registry_store_timeout="100secs" --registry_strict="true" --root_submissions="true" --slave_ping_timeout="15secs" --slave_reregister_timeout="10mins" --user_sorter="drf" --version="false" --webui_dir="/mesos/mesos-0.29.0/_inst/share/mesos/webui" --work_dir="/tmp/XtqwkS/master" --zk_session_timeout="10secs" I0316 14:28:51.338562 1261 master.cpp:423] Master only allowing authenticated frameworks to register I0316 14:28:51.338572 1261 master.cpp:428] Master only allowing authenticated slaves to register I0316 14:28:51.338580 1261 credentials.hpp:35] Loading credentials for authentication from '/tmp/XtqwkS/credentials' I0316 14:28:51.338877 1261 master.cpp:468] Using default 'crammd5' authenticator I0316 14:28:51.339030 1262 replica.cpp:673] Replica in STARTING status received a broadcasted recover request from (485)@172.17.0.3:45919 I0316 14:28:51.339246 1261 master.cpp:537] Using default 'basic' HTTP authenticator I0316 14:28:51.339393 1261 master.cpp:571] Authorization enabled I0316 14:28:51.339390 1266 recover.cpp:193] Received a recover response from a replica in STARTING status I0316 14:28:51.339606 1271 whitelist_watcher.cpp:77] No whitelist given I0316 14:28:51.339607 1275 hierarchical.cpp:144] Initialized hierarchical allocator process I0316 14:28:51.340077 1268 recover.cpp:564] Updating replica status to VOTING I0316 14:28:51.340533 1270 leveldb.cpp:304] Persisting metadata (8 bytes) to leveldb took 331558ns I0316 14:28:51.340558 1270 replica.cpp:320] Persisted replica status to VOTING I0316 14:28:51.340672 1270 recover.cpp:578] Successfully joined the Paxos group I0316 14:28:51.340827 1270 recover.cpp:462] Recover process terminated I0316 14:28:51.341684 1270 master.cpp:1806] The newly elected leader is master@172.17.0.3:45919 with id c7653f60-33e9-4406-9f62-dc74c906bf83 I0316 14:28:51.341717 1270 master.cpp:1819] Elected as the leading master! I0316 14:28:51.341740 1270 master.cpp:1508] Recovering from registrar I0316 14:28:51.341954 1263 registrar.cpp:307] Recovering registrar I0316 14:28:51.342499 1273 log.cpp:659] Attempting to start the writer I0316 14:28:51.343616 1266 replica.cpp:493] Replica received implicit promise request from (487)@172.17.0.3:45919 with proposal 1 I0316 14:28:51.344183 1266 leveldb.cpp:304] Persisting metadata (8 bytes) to leveldb took 536941ns I0316 14:28:51.344208 1266 replica.cpp:342] Persisted promised to 1 I0316 14:28:51.344825 1267 coordinator.cpp:238] Coordinator attempting to fill missing positions I0316 14:28:51.346009 1276 replica.cpp:388] Replica received explicit promise request from (488)@172.17.0.3:45919 for position 0 with proposal 2 I0316 14:28:51.346371 1276 leveldb.cpp:341] Persisting action (8 bytes) to leveldb took 327890ns I0316 14:28:51.346393 1276 replica.cpp:712] Persisted action at 0 I0316 14:28:51.347363 1267 replica.cpp:537] Replica received write request for position 0 from (489)@172.17.0.3:45919 I0316 14:28:51.347414 1267 leveldb.cpp:436] Reading position from leveldb took 24861ns I0316 14:28:51.347774 1267 leveldb.cpp:341] Persisting action (14 bytes) to leveldb took 323654ns I0316 14:28:51.347796 1267 replica.cpp:712] Persisted action at 0 I0316 14:28:51.348323 1276 replica.cpp:691] Replica received learned notice for position 0 from @0.0.0.0:0 I0316 14:28:51.348714 1276 leveldb.cpp:341] Persisting action (16 bytes) to leveldb took 361981ns I0316 14:28:51.348738 1276 replica.cpp:712] Persisted action at 0 I0316 14:28:51.348760 1276 replica.cpp:697] Replica learned NOP action at position 0 I0316 14:28:51.349318 1274 log.cpp:675] Writer started with ending position 0 I0316 14:28:51.350275 1267 leveldb.cpp:436] Reading position from leveldb took 23849ns I0316 14:28:51.351171 1271 registrar.cpp:340] Successfully fetched the registry (0B) in 9.173248ms I0316 14:28:51.351300 1271 registrar.cpp:439] Applied 1 operations in 32119ns; attempting to update the 'registry' I0316 14:28:51.351989 1272 log.cpp:683] Attempting to append 170 bytes to the log I0316 14:28:51.352108 1266 coordinator.cpp:348] Coordinator attempting to write APPEND action at position 1 I0316 14:28:51.352802 1263 replica.cpp:537] Replica received write request for position 1 from (490)@172.17.0.3:45919 I0316 14:28:51.353313 1263 leveldb.cpp:341] Persisting action (189 bytes) to leveldb took 474854ns I0316 14:28:51.353338 1263 replica.cpp:712] Persisted action at 1 I0316 14:28:51.354101 1273 replica.cpp:691] Replica received learned notice for position 1 from @0.0.0.0:0 I0316 14:28:51.354483 1273 leveldb.cpp:341] Persisting action (191 bytes) to leveldb took 338210ns I0316 14:28:51.354507 1273 replica.cpp:712] Persisted action at 1 I0316 14:28:51.354529 1273 replica.cpp:697] Replica learned APPEND action at position 1 I0316 14:28:51.355444 1275 registrar.cpp:484] Successfully updated the 'registry' in 4.084224ms I0316 14:28:51.355569 1275 registrar.cpp:370] Successfully recovered registrar I0316 14:28:51.355697 1268 log.cpp:702] Attempting to truncate the log to 1 I0316 14:28:51.355870 1269 coordinator.cpp:348] Coordinator attempting to write TRUNCATE action at position 2 I0316 14:28:51.356016 1274 master.cpp:1616] Recovered 0 slaves from the Registry (131B) ; allowing 10mins for slaves to re-register I0316 14:28:51.356032 1272 hierarchical.cpp:171] Skipping recovery of hierarchical allocator: nothing to recover I0316 14:28:51.356761 1273 replica.cpp:537] Replica received write request for position 2 from (491)@172.17.0.3:45919 I0316 14:28:51.357203 1273 leveldb.cpp:341] Persisting action (16 bytes) to leveldb took 406053ns I0316 14:28:51.357226 1273 replica.cpp:712] Persisted action at 2 I0316 14:28:51.357718 1270 replica.cpp:691] Replica received learned notice for position 2 from @0.0.0.0:0 I0316 14:28:51.358093 1270 leveldb.cpp:341] Persisting action (18 bytes) to leveldb took 345370ns I0316 14:28:51.358175 1270 leveldb.cpp:399] Deleting ~1 keys from leveldb took 57us I0316 14:28:51.358201 1270 replica.cpp:712] Persisted action at 2 I0316 14:28:51.358220 1270 replica.cpp:697] Replica learned TRUNCATE action at position 2 I0316 14:28:51.368399 1242 containerizer.cpp:149] Using isolation: posix/cpu,posix/mem,filesystem/posix W0316 14:28:51.406371 1242 backend.cpp:66] Failed to create 'bind' backend: BindBackend requires root privileges I0316 14:28:51.410480 1266 slave.cpp:193] Slave started on 12)@172.17.0.3:45919 I0316 14:28:51.410518 1266 slave.cpp:194] Flags at startup: --appc_simple_discovery_uri_prefix="http://" --appc_store_dir="/tmp/mesos/store/appc" --authenticatee="crammd5" --cgroups_cpu_enable_pids_and_tids_count="false" --cgroups_enable_cfs="false" --cgroups_hierarchy="/sys/fs/cgroup" --cgroups_limit_swap="false" --cgroups_root="mesos" --container_disk_watch_interval="15secs" --container_logger="org_apache_mesos_LogrotateContainerLogger" --containerizers="mesos" --credential="/tmp/ContainerLoggerTest_LOGROTATE_RotateInSandbox_JHP0gy/credential" --default_role="*" --disk_watch_interval="1mins" --docker="docker" --docker_kill_orphans="true" --docker_registry="https://registry-1.docker.io" --docker_remove_delay="6hrs" --docker_socket="/var/run/docker.sock" --docker_stop_timeout="0ns" --docker_store_dir="/tmp/mesos/store/docker" --enforce_container_disk_quota="false" --executor_registration_timeout="1mins" --executor_shutdown_grace_period="5secs" --fetcher_cache_dir="/tmp/ContainerLoggerTest_LOGROTATE_RotateInSandbox_JHP0gy/fetch" --fetcher_cache_size="2GB" --frameworks_home="" --gc_delay="1weeks" --gc_disk_headroom="0.1" --hadoop_home="" --help="false" --hostname_lookup="true" --image_provisioner_backend="copy" --initialize_driver_logging="true" --isolation="posix/cpu,posix/mem" --launcher_dir="/mesos/mesos-0.29.0/_build/src" --logbufsecs="0" --logging_level="INFO" --oversubscribed_resources_interval="15secs" --perf_duration="10secs" --perf_interval="1mins" --qos_correction_interval_min="0ns" --quiet="false" --recover="reconnect" --recovery_timeout="15mins" --registration_backoff_factor="10ms" --resources="cpus:2;mem:1024;disk:1024;ports:[31000-32000]" --revocable_cpu_low_priority="true" --sandbox_directory="/mnt/mesos/sandbox" --strict="true" --switch_user="true" --systemd_enable_support="true" --systemd_runtime_directory="/run/systemd/system" --version="false" --work_dir="/tmp/ContainerLoggerTest_LOGROTATE_RotateInSandbox_JHP0gy" I0316 14:28:51.411118 1266 credentials.hpp:83] Loading credential for authentication from '/tmp/ContainerLoggerTest_LOGROTATE_RotateInSandbox_JHP0gy/credential' I0316 14:28:51.411381 1266 slave.cpp:324] Slave using credential for: test-principal I0316 14:28:51.411696 1266 resources.cpp:572] Parsing resources as JSON failed: cpus:2;mem:1024;disk:1024;ports:[31000-32000] Trying semicolon-delimited string format instead I0316 14:28:51.412075 1266 slave.cpp:464] Slave resources: cpus(*):2; mem(*):1024; disk(*):1024; ports(*):[31000-32000] I0316 14:28:51.412148 1266 slave.cpp:472] Slave attributes: [ ] I0316 14:28:51.412160 1266 slave.cpp:477] Slave hostname: 2cbb23302fe5 I0316 14:28:51.413516 1263 state.cpp:58] Recovering state from '/tmp/ContainerLoggerTest_LOGROTATE_RotateInSandbox_JHP0gy/meta' I0316 14:28:51.413774 1266 status_update_manager.cpp:200] Recovering status update manager I0316 14:28:51.414029 1276 containerizer.cpp:407] Recovering containerizer I0316 14:28:51.415222 1269 provisioner.cpp:245] Provisioner recovery complete I0316 14:28:51.415650 1268 slave.cpp:4565] Finished recovery I0316 14:28:51.416115 1268 slave.cpp:4737] Querying resource estimator for oversubscribable resources I0316 14:28:51.416365 1268 slave.cpp:796] New master detected at master@172.17.0.3:45919 I0316 14:28:51.416448 1276 status_update_manager.cpp:174] Pausing sending status updates I0316 14:28:51.416445 1268 slave.cpp:859] Authenticating with master master@172.17.0.3:45919 I0316 14:28:51.416522 1268 slave.cpp:864] Using default CRAM-MD5 authenticatee I0316 14:28:51.416671 1268 slave.cpp:832] Detecting new master I0316 14:28:51.416731 1275 authenticatee.cpp:121] Creating new client SASL connection I0316 14:28:51.416807 1268 slave.cpp:4751] Received oversubscribable resources from the resource estimator I0316 14:28:51.417006 1263 master.cpp:5659] Authenticating slave(12)@172.17.0.3:45919 I0316 14:28:51.417103 1262 authenticator.cpp:413] Starting authentication session for crammd5_authenticatee(38)@172.17.0.3:45919 I0316 14:28:51.417348 1273 authenticator.cpp:98] Creating new server SASL connection I0316 14:28:51.417548 1266 authenticatee.cpp:212] Received SASL authentication mechanisms: CRAM-MD5 I0316 14:28:51.417582 1266 authenticatee.cpp:238] Attempting to authenticate with mechanism 'CRAM-MD5' I0316 14:28:51.417696 1264 authenticator.cpp:203] Received SASL authentication start I0316 14:28:51.417753 1264 authenticator.cpp:325] Authentication requires more steps I0316 14:28:51.417948 1265 authenticatee.cpp:258] Received SASL authentication step I0316 14:28:51.418107 1267 authenticator.cpp:231] Received SASL authentication step I0316 14:28:51.418159 1267 auxprop.cpp:107] Request to lookup properties for user: 'test-principal' realm: '2cbb23302fe5' server FQDN: '2cbb23302fe5' SASL_AUXPROP_VERIFY_AGAINST_HASH: false SASL_AUXPROP_OVERRIDE: false SASL_AUXPROP_AUTHZID: false I0316 14:28:51.418180 1267 auxprop.cpp:179] Looking up auxiliary property '*userPassword' I0316 14:28:51.418233 1267 auxprop.cpp:179] Looking up auxiliary property '*cmusaslsecretCRAM-MD5' I0316 14:28:51.418270 1267 auxprop.cpp:107] Request to lookup properties for user: 'test-principal' realm: '2cbb23302fe5' server FQDN: '2cbb23302fe5' SASL_AUXPROP_VERIFY_AGAINST_HASH: false SASL_AUXPROP_OVERRIDE: false SASL_AUXPROP_AUTHZID: true I0316 14:28:51.418289 1267 auxprop.cpp:129] Skipping auxiliary property '*userPassword' since SASL_AUXPROP_AUTHZID == true I0316 14:28:51.418300 1267 auxprop.cpp:129] Skipping auxiliary property '*cmusaslsecretCRAM-MD5' since SASL_AUXPROP_AUTHZID == true I0316 14:28:51.418323 1267 authenticator.cpp:317] Authentication success I0316 14:28:51.418414 1264 authenticatee.cpp:298] Authentication success I0316 14:28:51.418473 1269 master.cpp:5689] Successfully authenticated principal 'test-principal' at slave(12)@172.17.0.3:45919 I0316 14:28:51.418514 1275 authenticator.cpp:431] Authentication session cleanup for crammd5_authenticatee(38)@172.17.0.3:45919 I0316 14:28:51.418781 1276 slave.cpp:927] Successfully authenticated with master master@172.17.0.3:45919 I0316 14:28:51.418937 1276 slave.cpp:1321] Will retry registration in 1.983001ms if necessary I0316 14:28:51.419108 1262 master.cpp:4370] Registering slave at slave(12)@172.17.0.3:45919 (2cbb23302fe5) with id c7653f60-33e9-4406-9f62-dc74c906bf83-S0 I0316 14:28:51.419643 1266 registrar.cpp:439] Applied 1 operations in 75642ns; attempting to update the 'registry' I0316 14:28:51.420670 1272 log.cpp:683] Attempting to append 339 bytes to the log I0316 14:28:51.420820 1269 coordinator.cpp:348] Coordinator attempting to write APPEND action at position 3 I0316 14:28:51.421495 1270 slave.cpp:1321] Will retry registration in 1.437257ms if necessary I0316 14:28:51.421716 1275 master.cpp:4358] Ignoring register slave message from slave(12)@172.17.0.3:45919 (2cbb23302fe5) as admission is already in progress I0316 14:28:51.422107 1267 replica.cpp:537] Replica received write request for position 3 from (505)@172.17.0.3:45919 I0316 14:28:51.423033 1267 leveldb.cpp:341] Persisting action (358 bytes) to leveldb took 762815ns I0316 14:28:51.423066 1267 replica.cpp:712] Persisted action at 3 I0316 14:28:51.424069 1267 replica.cpp:691] Replica received learned notice for position 3 from @0.0.0.0:0 I0316 14:28:51.424232 1264 slave.cpp:1321] Will retry registration in 66.01292ms if necessary I0316 14:28:51.424342 1269 master.cpp:4358] Ignoring register slave message from slave(12)@172.17.0.3:45919 (2cbb23302fe5) as admission is already in progress I0316 14:28:51.424686 1267 leveldb.cpp:341] Persisting action (360 bytes) to leveldb took 574743ns I0316 14:28:51.424757 1267 replica.cpp:712] Persisted action at 3 I0316 14:28:51.424792 1267 replica.cpp:697] Replica learned APPEND action at position 3 I0316 14:28:51.426441 1272 registrar.cpp:484] Successfully updated the 'registry' in 6.721024ms I0316 14:28:51.426677 1262 log.cpp:702] Attempting to truncate the log to 3 I0316 14:28:51.426808 1264 coordinator.cpp:348] Coordinator attempting to write TRUNCATE action at position 4 I0316 14:28:51.427584 1261 slave.cpp:3482] Received ping from slave-observer(11)@172.17.0.3:45919 I0316 14:28:51.428213 1262 hierarchical.cpp:473] Added slave c7653f60-33e9-4406-9f62-dc74c906bf83-S0 (2cbb23302fe5) with cpus(*):2; mem(*):1024; disk(*):1024; ports(*):[31000-32000] (allocated: ) I0316 14:28:51.427865 1266 master.cpp:4438] Registered slave c7653f60-33e9-4406-9f62-dc74c906bf83-S0 at slave(12)@172.17.0.3:45919 (2cbb23302fe5) with cpus(*):2; mem(*):1024; disk(*):1024; ports(*):[31000-32000] I0316 14:28:51.428270 1267 slave.cpp:971] Registered with master master@172.17.0.3:45919; given slave ID c7653f60-33e9-4406-9f62-dc74c906bf83-S0 I0316 14:28:51.428412 1265 replica.cpp:537] Replica received write request for position 4 from (506)@172.17.0.3:45919 I0316 14:28:51.428443 1267 fetcher.cpp:81] Clearing fetcher cache I0316 14:28:51.428503 1262 hierarchical.cpp:1453] No resources available to allocate! I0316 14:28:51.428535 1262 hierarchical.cpp:1150] Performed allocation for slave c7653f60-33e9-4406-9f62-dc74c906bf83-S0 in 205421ns I0316 14:28:51.428750 1273 status_update_manager.cpp:181] Resuming sending status updates I0316 14:28:51.429157 1265 leveldb.cpp:341] Persisting action (16 bytes) to leveldb took 695258ns I0316 14:28:51.429225 1267 slave.cpp:994] Checkpointing SlaveInfo to '/tmp/ContainerLoggerTest_LOGROTATE_RotateInSandbox_JHP0gy/meta/slaves/c7653f60-33e9-4406-9f62-dc74c906bf83-S0/slave.info' I0316 14:28:51.429275 1265 replica.cpp:712] Persisted action at 4 I0316 14:28:51.429759 1267 slave.cpp:1030] Forwarding total oversubscribed resources I0316 14:28:51.430055 1265 master.cpp:4782] Received update of slave c7653f60-33e9-4406-9f62-dc74c906bf83-S0 at slave(12)@172.17.0.3:45919 (2cbb23302fe5) with total oversubscribed resources I0316 14:28:51.430614 1271 replica.cpp:691] Replica received learned notice for position 4 from @0.0.0.0:0 I0316 14:28:51.430891 1242 sched.cpp:222] Version: 0.29.0 I0316 14:28:51.431043 1265 hierarchical.cpp:531] Slave c7653f60-33e9-4406-9f62-dc74c906bf83-S0 (2cbb23302fe5) updated with oversubscribed resources (total: cpus(*):2; mem(*):1024; disk(*):1024; ports(*):[31000-32000], allocated: ) I0316 14:28:51.431236 1271 leveldb.cpp:341] Persisting action (18 bytes) to leveldb took 536892ns I0316 14:28:51.431267 1265 hierarchical.cpp:1453] No resources available to allocate! I0316 14:28:51.431584 1271 leveldb.cpp:399] Deleting ~2 keys from leveldb took 66904ns I0316 14:28:51.431538 1273 sched.cpp:326] New master detected at master@172.17.0.3:45919 I0316 14:28:51.431622 1271 replica.cpp:712] Persisted action at 4 I0316 14:28:51.431623 1265 hierarchical.cpp:1150] Performed allocation for slave c7653f60-33e9-4406-9f62-dc74c906bf83-S0 in 518588ns I0316 14:28:51.431660 1271 replica.cpp:697] Replica learned TRUNCATE action at position 4 I0316 14:28:51.431711 1273 sched.cpp:382]...
Story points: 1