@@ -815,7 +815,7 @@ function killRemainingProcesses(results) {
815
815
print ( killExternal ( running [ i ] . pid , abortSignal ) ) ;
816
816
}
817
817
results . crashed = true ;
818
- } ;
818
+ }
819
819
}
820
820
821
821
// //////////////////////////////////////////////////////////////////////////////
@@ -1364,7 +1364,9 @@ function checkInstanceAlive(instanceInfo, options, {skipHealthCheck = false} = {
1364
1364
) {
1365
1365
rc = checkServersGOOD ( instanceInfo ) ;
1366
1366
if ( first ) {
1367
- print ( RESET + "Waiting for all servers to go GOOD..." ) ;
1367
+ if ( ! options . noStartStopLogs ) {
1368
+ print ( RESET + "Waiting for all servers to go GOOD..." ) ;
1369
+ }
1368
1370
first = false ;
1369
1371
}
1370
1372
}
@@ -1532,7 +1534,9 @@ function shutdownArangod (arangod, options, forceTerminate) {
1532
1534
const requestOptions = makeAuthorizationHeaders ( options ) ;
1533
1535
requestOptions . method = 'DELETE' ;
1534
1536
requestOptions . timeout = 60 ; // 60 seconds hopefully are enough for getting a response
1535
- print ( Date ( ) + ' ' + arangod . url + '/_admin/shutdown' ) ;
1537
+ if ( ! options . noStartStopLogs ) {
1538
+ print ( Date ( ) + ' ' + arangod . url + '/_admin/shutdown' ) ;
1539
+ }
1536
1540
let sockStat = getSockStat ( arangod , options , "Sock stat for: " ) ;
1537
1541
const reply = download ( arangod . url + '/_admin/shutdown' , '' , requestOptions ) ;
1538
1542
if ( ( reply . code !== 200 ) && // if the server should reply, we expect 200 - if not:
@@ -1545,7 +1549,7 @@ function shutdownArangod (arangod, options, forceTerminate) {
1545
1549
print ( Date ( ) + ' Wrong shutdown response: ' + JSON . stringify ( reply ) + "' " + sockStat + " continuing with hard kill!" ) ;
1546
1550
shutdownArangod ( arangod , options , true ) ;
1547
1551
}
1548
- else {
1552
+ else if ( ! options . noStartStopLogs ) {
1549
1553
print ( sockStat ) ;
1550
1554
}
1551
1555
if ( options . extremeVerbosity ) {
@@ -1622,7 +1626,9 @@ function shutDownOneInstance(options, arangod, fullInstance, counters, forceTerm
1622
1626
if ( arangod . role !== 'agent' ) {
1623
1627
counters . nonAgenciesCount -- ;
1624
1628
}
1625
- print ( Date ( ) + ' Server "' + arangod . role + '" shutdown: Success: pid' , arangod . pid ) ;
1629
+ if ( ! options . noStartStopLogs ) {
1630
+ print ( Date ( ) + ' Server "' + arangod . role + '" shutdown: Success: pid' , arangod . pid) ;
1631
+ }
1626
1632
crashUtils . stopProcdump ( options , arangod ) ;
1627
1633
return false ;
1628
1634
}
@@ -1664,7 +1670,9 @@ function shutdownInstance (instanceInfo, options, forceTerminate) {
1664
1670
let requestOptions = makeAuthorizationHeaders ( options ) ;
1665
1671
requestOptions . method = 'PUT' ;
1666
1672
1667
- print ( coords [ 0 ] . url + "/_admin/cluster/maintenance" ) ;
1673
+ if ( ! options . noStartStopLogs ) {
1674
+ print ( coords [ 0 ] . url + "/_admin/cluster/maintenance" ) ;
1675
+ }
1668
1676
download ( coords [ 0 ] . url + "/_admin/cluster/maintenance" , JSON . stringify ( "on" ) , requestOptions ) ;
1669
1677
}
1670
1678
} catch ( err ) {
@@ -1697,7 +1705,10 @@ function shutdownInstance (instanceInfo, options, forceTerminate) {
1697
1705
if ( b . role === 'agent' ) return - 1 ;
1698
1706
return 0 ;
1699
1707
} ) ;
1700
- print ( Date ( ) + ' Shutdown order ' + JSON . stringify ( toShutdown ) ) ;
1708
+
1709
+ if ( ! options . noStartStopLogs ) {
1710
+ print ( Date ( ) + ' Shutdown order ' + JSON . stringify ( toShutdown ) ) ;
1711
+ }
1701
1712
1702
1713
let nonAgenciesCount = instanceInfo . arangods
1703
1714
. filter ( arangod => {
@@ -1733,7 +1744,10 @@ function shutdownInstance (instanceInfo, options, forceTerminate) {
1733
1744
arangod . exitStatus = {
1734
1745
status : 'RUNNING'
1735
1746
} ;
1736
- print ( Date ( ) + " Commanded shut down: " + JSON . stringify ( arangod ) ) ;
1747
+
1748
+ if ( ! options . noStartStopLogs ) {
1749
+ print ( Date ( ) + " Commanded shut down: " + JSON . stringify ( arangod ) ) ;
1750
+ }
1737
1751
}
1738
1752
return true ;
1739
1753
}
@@ -1787,7 +1801,9 @@ function shutdownInstance (instanceInfo, options, forceTerminate) {
1787
1801
if ( arangod . role !== 'agent' ) {
1788
1802
nonAgenciesCount -- ;
1789
1803
}
1790
- print ( Date ( ) + ' Server "' + arangod . role + '" shutdown: Success: pid' , arangod . pid ) ;
1804
+ if ( ! options . noStartStopLogs ) {
1805
+ print ( Date ( ) + ' Server "' + arangod . role + '" shutdown: Success: pid' , arangod . pid ) ;
1806
+ }
1791
1807
crashUtils . stopProcdump ( options , arangod ) ;
1792
1808
return false ;
1793
1809
}
@@ -1805,7 +1821,9 @@ function shutdownInstance (instanceInfo, options, forceTerminate) {
1805
1821
// e.g. 2 + coordinator + (s)
1806
1822
roleNames . push ( roles [ r ] + ' ' + r + '(s)' ) ;
1807
1823
}
1808
- print ( roleNames . join ( ', ' ) + ' are still running...' ) ;
1824
+ if ( ! options . noStartStopLogs ) {
1825
+ print ( roleNames . join ( ', ' ) + ' are still running...' ) ;
1826
+ }
1809
1827
require ( 'internal' ) . wait ( 1 , false ) ;
1810
1828
}
1811
1829
}
@@ -1895,7 +1913,9 @@ function checkClusterAlive(options, instanceInfo, addArgs) {
1895
1913
arangod . upAndRunning = true ;
1896
1914
return ;
1897
1915
}
1898
- print ( Date ( ) + " tickeling cluster node " + arangod . url + " - " + arangod . role ) ;
1916
+ if ( ! options . noStartStopLogs ) {
1917
+ print ( Date ( ) + " tickeling cluster node " + arangod . url + " - " + arangod . role ) ;
1918
+ }
1899
1919
let url = arangod . url ;
1900
1920
if ( arangod . role === "coordinator" && arangod . args [ "javascript.enabled" ] !== "false" ) {
1901
1921
url += '/_admin/aardvark/index.html' ;
@@ -1944,7 +1964,9 @@ function checkClusterAlive(options, instanceInfo, addArgs) {
1944
1964
}
1945
1965
}
1946
1966
1947
- print ( "Determining server IDs" ) ;
1967
+ if ( ! options . noStartStopLogs ) {
1968
+ print ( "Determining server IDs" ) ;
1969
+ }
1948
1970
instanceInfo . arangods . forEach ( arangod => {
1949
1971
if ( arangod . suspended ) {
1950
1972
return ;
@@ -2151,7 +2173,9 @@ function launchFinalize(options, instanceInfo, startTime) {
2151
2173
}
2152
2174
} ) ;
2153
2175
}
2154
- print ( CYAN + Date ( ) + ' up and running in ' + ( time ( ) - startTime ) + ' seconds' + RESET ) ;
2176
+ if ( ! options . noStartStopLogs ) {
2177
+ print ( CYAN + Date ( ) + ' up and running in ' + ( time ( ) - startTime ) + ' seconds' + RESET ) ;
2178
+ }
2155
2179
var matchPort = / .* : .* : ( [ 0 - 9 ] * ) / ;
2156
2180
var ports = [ ] ;
2157
2181
var processInfo = [ ] ;
@@ -2178,7 +2202,6 @@ function launchFinalize(options, instanceInfo, startTime) {
2178
2202
' - ' + arangod . args [ 'database.directory' ] ) ;
2179
2203
} ) ;
2180
2204
2181
- print ( Date ( ) + ' sniffing template:\n tcpdump -ni lo -s0 -w /tmp/out.pcap ' + ports . join ( ' or ' ) + '\n' ) ;
2182
2205
if ( options . sniff !== undefined && options . sniff !== false ) {
2183
2206
options . cleanup = false ;
2184
2207
let device = 'lo' ;
@@ -2218,7 +2241,9 @@ function launchFinalize(options, instanceInfo, startTime) {
2218
2241
print ( CYAN + 'launching ' + prog + ' ' + JSON . stringify ( args ) + RESET ) ;
2219
2242
tcpdump = executeExternal ( prog , args ) ;
2220
2243
}
2221
- print ( processInfo . join ( '\n' ) + '\n' ) ;
2244
+ if ( ! options . noStartStopLogs ) {
2245
+ print ( processInfo . join ( '\n' ) + '\n' ) ;
2246
+ }
2222
2247
internal . sleep ( options . sleepBeforeStart ) ;
2223
2248
initProcessStats ( instanceInfo ) ;
2224
2249
}
@@ -2282,6 +2307,8 @@ function startArango (protocol, options, addArgs, rootDir, role) {
2282
2307
2283
2308
if ( options . verbose ) {
2284
2309
args [ 'log.level' ] = 'debug' ;
2310
+ } else if ( options . noStartStopLogs ) {
2311
+ args [ 'log.level' ] = 'all=error' ;
2285
2312
}
2286
2313
2287
2314
instanceInfo . url = endpointToURL ( instanceInfo . endpoint ) ;
@@ -2367,7 +2394,9 @@ function startInstanceAgency (instanceInfo, protocol, options, addArgs, rootDir)
2367
2394
instanceInfo . endpoint = instanceInfo . arangods [ instanceInfo . arangods . length - 1 ] . endpoint ;
2368
2395
instanceInfo . url = instanceInfo . arangods [ instanceInfo . arangods . length - 1 ] . url ;
2369
2396
instanceInfo . role = 'agent' ;
2370
- print ( Date ( ) + ' Agency Endpoint: ' + instanceInfo . endpoint ) ;
2397
+ if ( ! options . noStartStopLogs ) {
2398
+ print ( Date ( ) + ' Agency Endpoint: ' + instanceInfo . endpoint ) ;
2399
+ }
2371
2400
}
2372
2401
2373
2402
checkClusterAlive ( options , instanceInfo , addArgs ) ;
0 commit comments