Skip to content

Commit

Permalink
Merge pull request #1027 from benfitzpatrick/964.back-comp-restart
Browse files Browse the repository at this point in the history
#964: add backwards comp restart
  • Loading branch information
hjoliver committed Jul 23, 2014
2 parents fdafb94 + 52e1ad6 commit 2ef7019
Show file tree
Hide file tree
Showing 4 changed files with 210 additions and 0 deletions.
37 changes: 37 additions & 0 deletions tests/restart/14-back-comp-restart.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash
#C: THIS FILE IS PART OF THE CYLC SUITE ENGINE.
#C: Copyright (C) 2008-2014 Hilary Oliver, NIWA
#C:
#C: This program is free software: you can redistribute it and/or modify
#C: it under the terms of the GNU General Public License as published by
#C: the Free Software Foundation, either version 3 of the License, or
#C: (at your option) any later version.
#C:
#C: This program is distributed in the hope that it will be useful,
#C: but WITHOUT ANY WARRANTY; without even the implied warranty of
#C: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#C: GNU General Public License for more details.
#C:
#C: You should have received a copy of the GNU General Public License
#C: along with this program. If not, see <http://www.gnu.org/licenses/>.
#-------------------------------------------------------------------------------
# Test restarting a pre-Cylc-6 suite.
. $(dirname $0)/test_header
#-------------------------------------------------------------------------------
set_test_number 3
#-------------------------------------------------------------------------------
install_suite $TEST_NAME_BASE back-comp-restart
export TEST_DIR
#-------------------------------------------------------------------------------
TEST_NAME=$TEST_NAME_BASE-validate
run_ok $TEST_NAME cylc validate $SUITE_NAME
#-------------------------------------------------------------------------------
TEST_NAME=$TEST_NAME_BASE-run-base
suite_run_ok $TEST_NAME cylc run --debug --until=2014050206 $SUITE_NAME
#-------------------------------------------------------------------------------
TEST_NAME=$TEST_NAME_BASE-restart
suite_run_ok $TEST_NAME cylc restart --debug --reference-test \
--until=2014050300 $SUITE_NAME $TEST_SOURCE_DIR/back-comp-restart/state
#-------------------------------------------------------------------------------
purge_suite $SUITE_NAME

146 changes: 146 additions & 0 deletions tests/restart/back-comp-restart/reference.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
2014/07/21 14:14:05 INFO - Thread-2 start (Event Handlers)
2014/07/21 14:14:05 INFO - Thread-3 start (Poll & Kill Commands)
2014/07/21 14:14:05 INFO - port:7770
2014/07/21 14:14:05 INFO - Suite starting at 2014-07-21 14:14:05.921630
2014/07/21 14:14:05 INFO - Log event clock: real time
2014/07/21 14:14:05 INFO - Run mode: live
2014/07/21 14:14:05 INFO - Start tag: 2014050100
2014/07/21 14:14:05 INFO - Stop tag: 2014050300
2014/07/21 14:14:05 INFO - Thread-4 start (Job Submission)
2014/07/21 14:14:05 INFO - Thread-5 start (Request Handling)
2014/07/21 14:14:05 INFO - Restart /some/path/to/back-comp-restart/state
2014/07/21 14:14:05 INFO - [qux.2014050206] -polling now
2014/07/21 14:14:05 INFO - [bar.2014050206] -triggered off ['foo.2014050200']
2014/07/21 14:14:06 INFO - [qux.2014050212] -triggered off []
2014/07/21 14:14:07 INFO - [bar.2014050206] -(current:ready)> bar.2014050206 submitting now
2014/07/21 14:14:08 INFO - [bar.2014050206] -(current:ready)> bar.2014050206 submission succeeded
2014/07/21 14:14:08 INFO - [bar.2014050206] -(current:submitted)> bar.2014050206 submit_method_id=1858
2014/07/21 14:14:08 INFO - [bar.2014050206] -(current:submitted)> bar.2014050206 started at 2014-07-21T14:14:07
2014/07/21 14:14:08 INFO - [qux.2014050206] -(current:running)> polled qux.2014050206 succeeded at 2014-07-21T13:05:45
2014/07/21 14:14:08 WARNING - [qux.2014050206] -Assuming non-reported outputs were completed:
qux.2014050206 submitted
qux.2014050206 started
2014/07/21 14:14:09 INFO - [wibble.2014050206] -triggered off ['qux.2014050206']
2014/07/21 14:14:09 INFO - [foo.2014050206] -triggered off ['qux.2014050206']
2014/07/21 14:14:09 INFO - [bar.2014050206] -(current:running)> bar.2014050206 succeeded at 2014-07-21T14:14:08
2014/07/21 14:14:10 INFO - [baz.2014050206] -triggered off ['bar.2014050206']
2014/07/21 14:14:10 INFO - [wibble.2014050206] -(current:ready)> wibble.2014050206 submitting now
2014/07/21 14:14:10 INFO - [foo.2014050206] -(current:ready)> foo.2014050206 submitting now
2014/07/21 14:14:10 INFO - [qux.2014050212] -(current:ready)> qux.2014050212 submitting now
2014/07/21 14:14:11 INFO - [wibble.2014050206] -(current:ready)> wibble.2014050206 started at 2014-07-21T14:14:10
2014/07/21 14:14:11 INFO - [wibble.2014050206] -(current:running)> wibble.2014050206 succeeded at 2014-07-21T14:14:10
2014/07/21 14:14:11 WARNING - [wibble.2014050206] -Assuming non-reported outputs were completed:
wibble.2014050206 submitted
2014/07/21 14:14:11 INFO - [foo.2014050206] -(current:ready)> foo.2014050206 submission succeeded
2014/07/21 14:14:11 INFO - [foo.2014050206] -(current:submitted)> foo.2014050206 submit_method_id=2227
2014/07/21 14:14:11 INFO - [foo.2014050206] -(current:submitted)> foo.2014050206 started at 2014-07-21T14:14:10
2014/07/21 14:14:11 INFO - [qux.2014050212] -(current:ready)> qux.2014050212 started at 2014-07-21T14:14:10
2014/07/21 14:14:11 INFO - [qux.2014050212] -(current:running)> qux.2014050212 submission succeeded
2014/07/21 14:14:11 INFO - [qux.2014050212] -(current:running)> qux.2014050212 submit_method_id=2012
2014/07/21 14:14:11 INFO - [qux.2014050212] -(current:running)> qux.2014050212 succeeded at 2014-07-21T14:14:10
2014/07/21 14:14:12 INFO - [foo.2014050206] -(current:running)> foo.2014050206 succeeded at 2014-07-21T14:14:11
2014/07/21 14:14:13 INFO - [bar.2014050212] -triggered off ['foo.2014050206']
2014/07/21 14:14:13 INFO - [wibble.2014050212] -triggered off ['qux.2014050212']
2014/07/21 14:14:13 INFO - [foo.2014050212] -triggered off ['qux.2014050212']
2014/07/21 14:14:14 INFO - [baz.2014050206] -(current:ready)> baz.2014050206 submitting now
2014/07/21 14:14:14 INFO - [bar.2014050212] -(current:ready)> bar.2014050212 submitting now
2014/07/21 14:14:14 INFO - [wibble.2014050212] -(current:ready)> wibble.2014050212 submitting now
2014/07/21 14:14:15 INFO - [baz.2014050206] -(current:ready)> baz.2014050206 started at 2014-07-21T14:14:14
2014/07/21 14:14:15 INFO - [baz.2014050206] -(current:running)> baz.2014050206 submission succeeded
2014/07/21 14:14:15 INFO - [baz.2014050206] -(current:running)> baz.2014050206 submit_method_id=3561
2014/07/21 14:14:15 INFO - [baz.2014050206] -(current:running)> baz.2014050206 succeeded at 2014-07-21T14:14:14
2014/07/21 14:14:15 INFO - [bar.2014050212] -(current:ready)> bar.2014050212 started at 2014-07-21T14:14:14
2014/07/21 14:14:15 INFO - [wibble.2014050212] -(current:ready)> wibble.2014050212 submission succeeded
2014/07/21 14:14:15 INFO - [wibble.2014050212] -(current:submitted)> wibble.2014050212 submit_method_id=3796
2014/07/21 14:14:15 INFO - [wibble.2014050212] -(current:submitted)> wibble.2014050212 started at 2014-07-21T14:14:14
2014/07/21 14:14:15 INFO - [foo.2014050212] -(current:ready)> foo.2014050212 submitting now
2014/07/21 14:14:16 INFO - [qux.2014050218] -triggered off []
2014/07/21 14:14:16 INFO - [bar.2014050212] -(current:running)> bar.2014050212 succeeded at 2014-07-21T14:14:15
2014/07/21 14:14:16 WARNING - [bar.2014050212] -Assuming non-reported outputs were completed:
bar.2014050212 submitted
2014/07/21 14:14:16 INFO - [bar.2014050212] -(current:succeeded)> bar.2014050212 submission succeeded
2014/07/21 14:14:16 INFO - [bar.2014050212] -(current:succeeded)> bar.2014050212 submit_method_id=3682
2014/07/21 14:14:16 INFO - [wibble.2014050212] -(current:running)> wibble.2014050212 succeeded at 2014-07-21T14:14:15
2014/07/21 14:14:16 INFO - [foo.2014050212] -(current:ready)> foo.2014050212 started at 2014-07-21T14:14:15
2014/07/21 14:14:17 INFO - [baz.2014050212] -triggered off ['bar.2014050212']
2014/07/21 14:14:17 INFO - [foo.2014050212] -(current:running)> foo.2014050212 succeeded at 2014-07-21T14:14:16
2014/07/21 14:14:17 WARNING - [foo.2014050212] -Assuming non-reported outputs were completed:
foo.2014050212 submitted
2014/07/21 14:14:17 INFO - [foo.2014050212] -(current:succeeded)> foo.2014050212 submission succeeded
2014/07/21 14:14:17 INFO - [foo.2014050212] -(current:succeeded)> foo.2014050212 submit_method_id=3930
2014/07/21 14:14:18 INFO - [bar.2014050218] -triggered off ['foo.2014050212']
2014/07/21 14:14:19 INFO - [qux.2014050218] -(current:ready)> qux.2014050218 submitting now
2014/07/21 14:14:19 INFO - [baz.2014050212] -(current:ready)> baz.2014050212 submitting now
2014/07/21 14:14:20 INFO - [qux.2014050218] -(current:ready)> qux.2014050218 submission succeeded
2014/07/21 14:14:20 INFO - [qux.2014050218] -(current:submitted)> qux.2014050218 submit_method_id=4509
2014/07/21 14:14:20 INFO - [bar.2014050218] -(current:ready)> bar.2014050218 submitting now
2014/07/21 14:14:20 INFO - [bar.2014050218] -(current:ready)> bar.2014050218 submission succeeded
2014/07/21 14:14:20 INFO - [bar.2014050218] -(current:submitted)> bar.2014050218 submit_method_id=5057
2014/07/21 14:14:21 INFO - [qux.2014050218] -(current:submitted)> qux.2014050218 started at 2014-07-21T14:14:20
2014/07/21 14:14:21 INFO - [qux.2014050218] -(current:running)> qux.2014050218 succeeded at 2014-07-21T14:14:20
2014/07/21 14:14:21 INFO - [baz.2014050212] -(current:ready)> baz.2014050212 started at 2014-07-21T14:14:20
2014/07/21 14:14:21 INFO - [baz.2014050212] -(current:running)> baz.2014050212 submission succeeded
2014/07/21 14:14:21 INFO - [baz.2014050212] -(current:running)> baz.2014050212 submit_method_id=4835
2014/07/21 14:14:21 INFO - [baz.2014050212] -(current:running)> baz.2014050212 succeeded at 2014-07-21T14:14:20
2014/07/21 14:14:21 INFO - [bar.2014050218] -(current:submitted)> bar.2014050218 started at 2014-07-21T14:14:20
2014/07/21 14:14:22 INFO - [wibble.2014050218] -triggered off ['qux.2014050218']
2014/07/21 14:14:22 INFO - [foo.2014050218] -triggered off ['qux.2014050218']
2014/07/21 14:14:22 INFO - [qux.2014050300] -triggered off []
2014/07/21 14:14:22 INFO - [bar.2014050218] -(current:running)> bar.2014050218 succeeded at 2014-07-21T14:14:21
2014/07/21 14:14:23 INFO - [baz.2014050218] -triggered off ['bar.2014050218']
2014/07/21 14:14:23 INFO - [wibble.2014050218] -(current:ready)> wibble.2014050218 submitting now
2014/07/21 14:14:24 INFO - [wibble.2014050218] -(current:ready)> wibble.2014050218 started at 2014-07-21T14:14:23
2014/07/21 14:14:24 INFO - [wibble.2014050218] -(current:running)> wibble.2014050218 submission succeeded
2014/07/21 14:14:24 INFO - [wibble.2014050218] -(current:running)> wibble.2014050218 submit_method_id=5565
2014/07/21 14:14:24 INFO - [foo.2014050218] -(current:ready)> foo.2014050218 submitting now
2014/07/21 14:14:24 INFO - [qux.2014050300] -(current:ready)> qux.2014050300 submitting now
2014/07/21 14:14:24 INFO - [qux.2014050300] -(current:ready)> qux.2014050300 submission succeeded
2014/07/21 14:14:24 INFO - [qux.2014050300] -(current:submitted)> qux.2014050300 submit_method_id=5751
2014/07/21 14:14:25 INFO - [wibble.2014050218] -(current:running)> wibble.2014050218 succeeded at 2014-07-21T14:14:24
2014/07/21 14:14:25 INFO - [foo.2014050218] -(current:ready)> foo.2014050218 started at 2014-07-21T14:14:24
2014/07/21 14:14:25 INFO - [foo.2014050218] -(current:running)> foo.2014050218 succeeded at 2014-07-21T14:14:24
2014/07/21 14:14:25 WARNING - [foo.2014050218] -Assuming non-reported outputs were completed:
foo.2014050218 submitted
2014/07/21 14:14:25 INFO - [foo.2014050218] -(current:succeeded)> foo.2014050218 submission succeeded
2014/07/21 14:14:25 INFO - [foo.2014050218] -(current:succeeded)> foo.2014050218 submit_method_id=5652
2014/07/21 14:14:25 INFO - [qux.2014050300] -(current:submitted)> qux.2014050300 started at 2014-07-21T14:14:24
2014/07/21 14:14:25 INFO - [qux.2014050300] -(current:running)> qux.2014050300 succeeded at 2014-07-21T14:14:24
2014/07/21 14:14:26 INFO - [bar.2014050300] -triggered off ['foo.2014050218']
2014/07/21 14:14:26 INFO - [wibble.2014050300] -triggered off ['qux.2014050300']
2014/07/21 14:14:27 INFO - [foo.2014050300] -triggered off ['qux.2014050300']
2014/07/21 14:14:27 INFO - [baz.2014050218] -(current:ready)> baz.2014050218 submitting now
2014/07/21 14:14:28 INFO - [bar.2014050300] -(current:ready)> bar.2014050300 submitting now
2014/07/21 14:14:28 INFO - [baz.2014050218] -(current:ready)> baz.2014050218 started at 2014-07-21T14:14:27
2014/07/21 14:14:28 INFO - [baz.2014050218] -(current:running)> baz.2014050218 submission succeeded
2014/07/21 14:14:28 INFO - [baz.2014050218] -(current:running)> baz.2014050218 submit_method_id=6653
2014/07/21 14:14:28 INFO - [wibble.2014050300] -(current:ready)> wibble.2014050300 submitting now
2014/07/21 14:14:28 INFO - [wibble.2014050300] -(current:ready)> wibble.2014050300 submission succeeded
2014/07/21 14:14:28 INFO - [wibble.2014050300] -(current:submitted)> wibble.2014050300 submit_method_id=7068
2014/07/21 14:14:29 INFO - [bar.2014050300] -(current:ready)> bar.2014050300 started at 2014-07-21T14:14:28
2014/07/21 14:14:29 INFO - [bar.2014050300] -(current:running)> bar.2014050300 succeeded at 2014-07-21T14:14:28
2014/07/21 14:14:29 WARNING - [bar.2014050300] -Assuming non-reported outputs were completed:
bar.2014050300 submitted
2014/07/21 14:14:29 INFO - [bar.2014050300] -(current:succeeded)> bar.2014050300 submission succeeded
2014/07/21 14:14:29 INFO - [bar.2014050300] -(current:succeeded)> bar.2014050300 submit_method_id=6824
2014/07/21 14:14:29 INFO - [baz.2014050218] -(current:running)> baz.2014050218 succeeded at 2014-07-21T14:14:28
2014/07/21 14:14:29 INFO - [wibble.2014050300] -(current:submitted)> wibble.2014050300 started at 2014-07-21T14:14:28
2014/07/21 14:14:29 INFO - [wibble.2014050300] -(current:running)> wibble.2014050300 succeeded at 2014-07-21T14:14:29
2014/07/21 14:14:30 INFO - [baz.2014050300] -triggered off ['bar.2014050300']
2014/07/21 14:14:31 INFO - [foo.2014050300] -(current:ready)> foo.2014050300 submitting now
2014/07/21 14:14:32 INFO - [foo.2014050300] -(current:ready)> foo.2014050300 submission succeeded
2014/07/21 14:14:32 INFO - [foo.2014050300] -(current:submitted)> foo.2014050300 submit_method_id=7330
2014/07/21 14:14:32 INFO - [foo.2014050300] -(current:submitted)> foo.2014050300 started at 2014-07-21T14:14:31
2014/07/21 14:14:32 INFO - [baz.2014050300] -(current:ready)> baz.2014050300 submitting now
2014/07/21 14:14:32 INFO - [baz.2014050300] -(current:ready)> baz.2014050300 started at 2014-07-21T14:14:32
2014/07/21 14:14:33 INFO - [foo.2014050300] -(current:running)> foo.2014050300 succeeded at 2014-07-21T14:14:32
2014/07/21 14:14:33 INFO - [baz.2014050300] -(current:running)> baz.2014050300 succeeded at 2014-07-21T14:14:32
2014/07/21 14:14:33 WARNING - [baz.2014050300] -Assuming non-reported outputs were completed:
baz.2014050300 submitted
2014/07/21 14:14:33 INFO - [baz.2014050300] -(current:succeeded)> baz.2014050300 submission succeeded
2014/07/21 14:14:33 INFO - [baz.2014050300] -(current:succeeded)> baz.2014050300 submit_method_id=7411
2014/07/21 14:14:33 INFO - Stopping:
+ all cycling tasks have spawned past the final cycle 2014050300
+ all non-cycling tasks have succeeded
2014/07/21 14:14:33 INFO - Thread-4 exit (Job Submission)
2014/07/21 14:14:33 INFO - Thread-2 exit (Event Handlers)
2014/07/21 14:14:33 INFO - Thread-3 exit (Poll & Kill Commands)
15 changes: 15 additions & 0 deletions tests/restart/back-comp-restart/state
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
run mode : live
time : 2014:07:21:13:35:53
initial cycle : 2014050100
final cycle : (none)
(dp1
.
Begin task states
async_install.1 : status=succeeded, spawned=true
bar.2014050206 : status=waiting, spawned=false
baz.2014050200 : status=succeeded, spawned=true
baz.2014050206 : status=waiting, spawned=false
foo.2014050200 : status=succeeded, spawned=true
foo.2014050206 : status=waiting, spawned=false
qux.2014050206 : status=running, spawned=false
wibble.2014050206 : status=waiting, spawned=false
12 changes: 12 additions & 0 deletions tests/restart/back-comp-restart/suite.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[scheduling]
initial cycle time = 2014050100
[[dependencies]]
graph = "async_install"
[[[0,6,12,18]]]
graph = """
foo[T-6] => bar => baz
baz | qux => wibble & foo
"""
[runtime]
[[root]]
command scripting = /bin/true

0 comments on commit 2ef7019

Please sign in to comment.