Overview
Comment: | Partially completed rework of server/client logic |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | re-re-factor-server |
Files: | files | file ages | folders |
SHA1: |
2b3405f60c1493e0f0bd6d3dac74d596 |
User & Date: | matt on 2014-02-17 18:26:08 |
Other Links: | branch diff | manifest | tags |
Context
2014-02-17
| ||
19:36 | Trimmed out some junk code and fixed some logic in the server start up sequencing check-in: 4a2103f62b user: matt tags: re-re-factor-server | |
18:26 | Partially completed rework of server/client logic check-in: 2b3405f60c user: matt tags: re-re-factor-server | |
2014-02-16
| ||
23:42 | Partial fix for run-id of zero server refusing to start when other servers are in the available state check-in: 452be75fb9 user: matt tags: re-re-factor-server | |
Changes
Modified client.scm from [20000f46f9] to [065a0a550e].
︙ | |||
52 53 54 55 56 57 58 | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | + + + + - - - + + + + - - - + + + + + + + + - - + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - | ;; *transport-type* and *runremote* from the monitor.db ;; ;; client:setup ;; ;; lookup_server, need to remove *runremote* stuff ;; (define (client:setup run-id #!key (remaining-tries 3)) (if (<= remaining-tries 0) (begin (debug:print 0 "ERROR: failed to start or connect to server for run-id " run-id) (exit 1)) |
︙ |
Modified docs/manual/Makefile from [c3b17d73da] to [038153bc89].
|
Added docs/manual/client.dot version [23d472e170].
|
Modified docs/manual/server.dot from [2cf0263449] to [5b6f6b599f].
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | - - - - - + + + - - + + + - - + + - - + + - - - + + - + - - - - + + + + + - - - - - + + + + - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - - - + + + | digraph G { |
Modified http-transport.scm from [ab4a44cd0c] to [af9b9bb667].
︙ | |||
213 214 215 216 217 218 219 | 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - + + + - - - - + + + + + + + + - + + - + - - - - - + + + + + - - - - - + + + + + | (set! *http-connections-next-cleanup* (+ (current-seconds) 10)) (mutex-unlock! *http-mutex*)) (define (http-transport:inc-requests-and-prep-to-close-all-connections) (mutex-lock! *http-mutex*) (set! *http-requests-in-progress* (+ 1 *http-requests-in-progress*))) |
︙ | |||
356 357 358 359 360 361 362 | 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 | + - - - - - - - - - + + + + + + + + + | ;; (set! res dat) ;; (http-transport:dec-requests-count-and-close-all-connections)) ;; (http-transport:dec-requests-count ;; (lambda () ;; (set! res dat))))))) (time-out (lambda () (thread-sleep! 45) #f)) |
︙ |
Modified megatest.scm from [51576793bd] to [7c47c73e54].
︙ | |||
362 363 364 365 366 367 368 | 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 | - - - + - - + - - + | ;; (set! *fdb* (filedb:open-db (conc *toppath* "/db/paths.db"))) ;; if not list or kill then start a client (if appropriate) (if (or (args-defined? "-h" "-version" "-gen-megatest-area" "-gen-megatest-test") (eq? (length (hash-table-keys args:arg-hash)) 0)) (debug:print-info 1 "Server connection not needed") (begin (if run-id |
︙ |
Modified rmt.scm from [0c6c337631] to [37aacb2dec].
︙ | |||
34 35 36 37 38 39 40 | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | - - + + - - - + + + - + - - - + + + + | ;; S U P P O R T F U N C T I O N S ;;====================================================================== ;; cmd is a symbol ;; vars is a json string encoding the parameters for the call ;; (define (rmt:send-receive cmd run-id params) |
︙ |
Modified server.scm from [e93cd93c50] to [cffc1a2257].
︙ | |||
44 45 46 47 48 49 50 | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | - - - - + + + + - - - - + + + + | ;; ;; all routes though here end in exit ... ;; ;; start_server ;; (define (server:launch run-id) |
︙ | |||
101 102 103 104 105 106 107 | 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | - + - - - - - - - - - - - + + + + + + - - - - - - - - - - - + | ;; When using zmq this would send the message back (two step process) ;; with spiffy or rpc this simply returns the return data to be returned ;; (define (server:reply return-addr query-sig success/fail result) (db:obj->string (vector success/fail query-sig result))) |
︙ |
Modified tasks.scm from [fe9409354b] to [a457dae400].
︙ | |||
89 90 91 92 93 94 95 | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | - - - - - - - - - - + + + + + + - - + - - | (define (tasks:hostinfo-get-port vec) (vector-ref vec 2)) (define (tasks:hostinfo-get-pubport vec) (vector-ref vec 3)) (define (tasks:hostinfo-get-transport vec) (vector-ref vec 4)) (define (tasks:hostinfo-get-pid vec) (vector-ref vec 5)) (define (tasks:hostinfo-get-hostname vec) (vector-ref vec 6)) (define (tasks:server-lock-slot mdb run-id) |
︙ | |||
133 134 135 136 137 138 139 | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | - + - - + + + + | (set! res num-in-queue)) mdb "SELECT count(id) FROM servers WHERE run_id=?;" run-id) res)) (define (tasks:server-clean-out-old-records-for-run-id mdb run-id) |
︙ |
Modified tests/fullrun/megatest.config from [394e6d468f] to [79fdce739b].
︙ | |||
75 76 77 78 79 80 81 82 83 84 85 86 87 88 | 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | + + + + | [validvalues] state start end 0 1 - 2 status pass fail n/a 0 1 running - 2 # These are set before all tests, override them # in the testconfig [pre-launch-env-overrides] section [env-override] # This variable is honored by the loadrunner script. The value is in percent # a value of 200 will stop new jobs from starting. MAX_ALLOWED_LOAD 200 # MT_XTERM_CMD overrides the terminal command # MT_XTERM_CMD xterm -bg lightgreen -fg black SPECIAL_ENV_VARS overide them here - should be seen at launch and in the runs TESTVAR [system echo $PWD] DEADVAR [system ls] VARWITHDOLLAR $HOME/.zshrc |
︙ |