Overview
Comment: | Most needed changes made for multi-server with log handshaking. However there is a segfault ... |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | server-log-handshaking |
Files: | files | file ages | folders |
SHA1: |
8a4205f90b698a30371e28480f9e0717 |
User & Date: | matt on 2017-01-27 22:47:55 |
Other Links: | branch diff | manifest | tags |
Context
2017-01-28
| ||
12:25 | Fixed couple missing changes needed for server log handshaking check-in: 5a64939577 user: matt tags: server-log-handshaking | |
2017-01-27
| ||
22:47 | Most needed changes made for multi-server with log handshaking. However there is a segfault ... check-in: 8a4205f90b user: matt tags: server-log-handshaking | |
2017-01-25
| ||
23:48 | Get list of servers now works check-in: f2556f210b user: matt tags: server-log-handshaking | |
Changes
Modified common.scm from [040477db58] to [9ceabb42c1].
︙ | |||
139 140 141 142 143 144 145 | 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | - + | (define *run-info-cache* (make-hash-table)) ;; run info is stable, no need to reget (define *launch-setup-mutex* (make-mutex)) ;; need to be able to call launch:setup often so mutex it and re-call the real deal only if *toppath* not set (define *homehost-mutex* (make-mutex)) (defstruct remote (hh-dat (common:get-homehost)) ;; homehost record ( addr . hhflag ) |
︙ |
Modified dashboard.scm from [29cdcf21f3] to [bb7acd661f].
︙ | |||
97 98 99 100 101 102 103 104 105 106 107 108 109 110 | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | + + + + | (exit))) (if (args:get-arg "-h") (begin (print help) (exit))) (if (not (common:on-homehost?)) (begin (debug:print 0 "ERROR: Current policy requires running dashboard on homehost: " (common:get-homehost)))) ;; TODO: Move this inside (main) ;; (if (not (launch:setup)) (begin (print "Failed to find megatest.config, exiting") (exit 1))) |
︙ |
Modified db.scm from [a6e4ada759] to [0ef09f1d37].
︙ | |||
12 13 14 15 16 17 18 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - + | ;;====================================================================== ;; Database access ;;====================================================================== ;; dbstruct vector containing all the relevant dbs like main.db, megatest.db, run.db etc (use (srfi 18) extras tcp stack) ;; RADT => use of require-extension? |
︙ | |||
823 824 825 826 827 828 829 | 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 | - - + + - - + + + | (define (db:multi-db-sync dbstruct . options) (if (not (launch:setup)) (debug:print 0 *default-log-port* "ERROR: not able to setup up for megatest.") (let* ((mtdb (dbr:dbstruct-mtdb dbstruct)) (tmpdb (db:get-db dbstruct)) (refndb (dbr:dbstruct-refndb dbstruct)) (allow-cleanup #t) ;; (if run-ids #f #t)) |
︙ |
Modified megatest.scm from [d7a15310c1] to [9fc67a21aa].
︙ | |||
350 351 352 353 354 355 356 | 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 | - + - - - + + + + + + + | ;; The watchdog is to keep an eye on things like db sync etc. ;; (define *watchdog* (make-thread common:watchdog "Watchdog thread")) (if (not (args:get-arg "-server")) (thread-start! *watchdog*)) ;; if starting a server; wait till we get to running state before kicking off watchdog |
︙ | |||
697 698 699 700 701 702 703 | 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 | - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | (debug:print-error 0 *default-log-port* "Parameter to -envdelta should be new=star-end"))))) ;;====================================================================== ;; Start the server - can be done in conjunction with -runall or -runtests (one day...) ;; we start the server if not running else start the client thread ;;====================================================================== |
︙ |
Modified rmt.scm from [e2d5384f31] to [0b9221a215].
︙ | |||
90 91 92 93 94 95 96 | 90 91 92 93 94 95 96 97 98 99 100 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 127 128 129 | - + - - - - - - - - - - + - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - | (debug:print-info 12 *default-log-port* "rmt:send-receive, case 3") (rmt:open-qry-close-locally cmd 0 params)) ;; on homehost and this is a write, we already have a server, but server has died ((and (cdr (remote-hh-dat *runremote*)) ;; on homehost (not (member cmd api:read-only-queries)) ;; this is a write (remote-server-url *runremote*) ;; have a server |
︙ |
Modified server.scm from [e489317c03] to [81e0620ae8].
1 2 3 4 5 6 7 8 9 10 11 12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | - + | ;; Copyright 2006-2012, Matthew Welland. ;; ;; This program is made available under the GNU GPL version 2.0 or ;; greater. See the accompanying file COPYING for details. ;; ;; This program is distributed WITHOUT ANY WARRANTY; without even the ;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ;; PURPOSE. (require-extension (srfi 18) extras tcp s11n) |
︙ | |||
107 108 109 110 111 112 113 | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | - + - + | ;; (attempt-in-progress (server:start-attempted? areapath)) ;; (dot-server-url (server:check-if-running areapath)) (curr-ip (server:get-best-guess-address curr-host)) (curr-pid (current-process-id)) (homehost (common:get-homehost)) ;; configf:lookup *configdat* "server" "homehost" )) (target-host (car homehost)) (testsuite (common:get-testsuite-name)) |
︙ | |||
163 164 165 166 167 168 169 | 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - + - + + + + + + + | (string->number (caddr dat)))))) (list #f #f #f))))))) ;; get a list of servers with all relevant data ;; ( mod-time host port start-time ) ;; (define (server:get-list areapath) (let ((fname-rx (regexp "^(|.*/)server-(\\d+)-(\\S+).log$"))) |
︙ | |||
358 359 360 361 362 363 364 | 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 | + + + + - + - + + + + + + - + | ;; (common:simple-file-release-lock lock-file)) ;; (debug:print-info 0 *default-log-port* "server file " server-file " for " hostport " NOT removed - could not get lock.")) ;; (debug:print-info 0 *default-log-port* "server file " server-file " for " hostport " NOT removed - dotserver-url("dotserver-url") did not match hostport pattern ("hostport")")))) ;; no longer care if multiple servers are started by accident. older servers will drop off in time. ;; (define (server:check-if-running areapath) (let* ((servers (server:get-best (server:get-list areapath))) (best-server (if (null? servers) #f (car servers))) (dotserver-url (if best-server (server:record->url best-server) |
︙ |
Modified utils/mk_wrapper from [de6ec68c4a] to [9bb7f8caf7].
︙ | |||
26 27 28 29 30 31 32 | 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 | - - - - - - - - - - - + + + + + + + + + + + | # fi # echo "exec $prefix/bin/.\$(lsb_release -sr)/$cmd \"\$@\"" >> $target echo "#!/bin/bash" > $target if [[ $cmd =~ dboard ]]; then cat >> $target <<'EOF' |
︙ |