Megatest

Changes On Branch f5f9bc5c6c2b9ac4
Login

Changes In Branch v1.80-toomanyfiles Excluding Merge-Ins

This is equivalent to a diff from c608ac13c7 to f5f9bc5c6c

2023-01-20
07:29
Added artifacts (will replace pkts) check-in: 7fa5291a80 user: matt tags: v1.80
2023-01-19
19:52
Refactor start check-in: f7272f26b7 user: matt tags: v1.80-reshape
04:32
Print info on closing connections always Leaf check-in: f5f9bc5c6c user: matt tags: v1.80-toomanyfiles
04:14
Removed added attempt to save server info in runremote. check-in: b290688bbb user: matt tags: v1.80-toomanyfiles
03:46
client setup was not updating runremote in some scenarios check-in: 3f4bf437c0 user: matt tags: v1.80-toomanyfiles
2023-01-18
22:17
Missing fix check-in: c608ac13c7 user: matt tags: v1.80
22:13
Missing fix check-in: ff975ecd14 user: matt tags: v1.80

Modified client.scm from [6913337164] to [eb684293be].

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
	(if (not server-dat) ;; no server found
	    (begin
	      (if (< remaining-tries 99)(thread-sleep! 1)) ;; obviously it needs time
	      (client:setup-http areapath runremote remaining-tries: (- remaining-tries 1)))
	    (match server-dat
	      ((host port start-time server-id pid)
	       (debug:print-info 4 *default-log-port* "client:setup server-dat=" server-dat ", remaining-tries=" remaining-tries)
	       (if (not runremote)

                   (begin
		     ;; Here we are creating a runremote where there was none or it was clobbered with #f
		     ;;

		     (set! runremote (make-remote))

                     (let* ((server-info (server:check-if-running areapath)))
		       (remote-server-info-set! runremote server-info)
                       (if server-info
                           (begin
                             (remote-server-url-set! runremote (server:record->url server-info))
                             (remote-server-id-set! runremote (server:record->id server-info)))))))
	       ;; at this point we have a runremote
	       (if (and host port server-id)
		   (let* ((nada     (client:connect host port server-id runremote))
			  (ping-res (rmt:login-no-auto-client-setup runremote)))
		     (if ping-res
			 (if runremote
			     (begin
			       (debug:print-info 2 *default-log-port* "connected to " (client:get-url runremote))
			       runremote)
			     (client:setup-http areapath runremote remaining-tries: (- remaining-tries 1)))
			 (begin    ;; login failed but have a server record, clean out the record and try again
			   (debug:print-info 0 *default-log-port* "client:setup, login unsuccessful, will attempt to start server ... ping-res=" ping-res ", server-dat=" server-dat) ;; had runid.  Fixes part of Randy;s ticket 1405717332
			   (http-transport:close-connections runremote)
			   (thread-sleep! 1)







|
>



>
|
>












|







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
130
131
132
	(if (not server-dat) ;; no server found
	    (begin
	      (if (< remaining-tries 99)(thread-sleep! 1)) ;; obviously it needs time
	      (client:setup-http areapath runremote remaining-tries: (- remaining-tries 1)))
	    (match server-dat
	      ((host port start-time server-id pid)
	       (debug:print-info 4 *default-log-port* "client:setup server-dat=" server-dat ", remaining-tries=" remaining-tries)
	       (if (or (not runremote)
		       (not (remote-conndat runremote)))
                   (begin
		     ;; Here we are creating a runremote where there was none or it was clobbered with #f
		     ;;
		     (if (not runremote)
			 (set! runremote (make-remote))
			 (http-transport:close-connections runremote))
                     (let* ((server-info (server:check-if-running areapath)))
		       (remote-server-info-set! runremote server-info)
                       (if server-info
                           (begin
                             (remote-server-url-set! runremote (server:record->url server-info))
                             (remote-server-id-set! runremote (server:record->id server-info)))))))
	       ;; at this point we have a runremote
	       (if (and host port server-id)
		   (let* ((nada     (client:connect host port server-id runremote))
			  (ping-res (rmt:login-no-auto-client-setup runremote)))
		     (if ping-res
			 (if runremote
			     (begin ;; updating info in runremote
			       (debug:print-info 2 *default-log-port* "connected to " (client:get-url runremote))
			       runremote)
			     (client:setup-http areapath runremote remaining-tries: (- remaining-tries 1)))
			 (begin    ;; login failed but have a server record, clean out the record and try again
			   (debug:print-info 0 *default-log-port* "client:setup, login unsuccessful, will attempt to start server ... ping-res=" ping-res ", server-dat=" server-dat) ;; had runid.  Fixes part of Randy;s ticket 1405717332
			   (http-transport:close-connections runremote)
			   (thread-sleep! 1)

Modified http-transport.scm from [c450806bbf] to [e034754503].

335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
  (if (remote? runremote)
      (let ((api-dat (remote-api-uri runremote)))
	(handle-exceptions
	    exn
	  (begin
	    (print-call-chain *default-log-port*)
	    (debug:print-error 0 *default-log-port* " closing connection failed with error: " ((condition-property-accessor 'exn 'message) exn) ", exn=" exn))
	  (if (args:any-defined? "-server" "-execute" "-run")
	      (debug:print-info 0 *default-log-port* "Closing connections to "api-dat))
	  (if api-dat (close-connection! api-dat))
	  (remote-conndat-set! runremote #f)
	  #t))
      #f))

;; run http-transport:keep-running in a parallel thread to monitor that the db is being 
;; used and to shutdown after sometime if it is not.







<
|







335
336
337
338
339
340
341

342
343
344
345
346
347
348
349
  (if (remote? runremote)
      (let ((api-dat (remote-api-uri runremote)))
	(handle-exceptions
	    exn
	  (begin
	    (print-call-chain *default-log-port*)
	    (debug:print-error 0 *default-log-port* " closing connection failed with error: " ((condition-property-accessor 'exn 'message) exn) ", exn=" exn))

	  (debug:print-info 0 *default-log-port* "Closing connections to "api-dat)
	  (if api-dat (close-connection! api-dat))
	  (remote-conndat-set! runremote #f)
	  #t))
      #f))

;; run http-transport:keep-running in a parallel thread to monitor that the db is being 
;; used and to shutdown after sometime if it is not.