Skip to content

Instantly share code, notes, and snippets.

@rishiloyola
Created October 15, 2017 07:48
Show Gist options
  • Save rishiloyola/efa3c0b9184fb9d321bd63a6940f3866 to your computer and use it in GitHub Desktop.
Save rishiloyola/efa3c0b9184fb9d321bd63a6940f3866 to your computer and use it in GitHub Desktop.
wifi:transfer2go Rishi$ bash test/run.sh pull dataset
### Perform test of pull model
Kill previous transfer2go processes (if any)
create agents areas in /tmp/transfer2go
Create config and catalogs
main agent: mainAgent (http://localhost:8989)
source agent: sourceAgent (http://localhost:8000)
destination agent: destinationAgent (http://localhost:9000)
create large file in source area
0+0 records in
0+0 records out
0 bytes transferred in 0.000007 secs (0 bytes/sec)
0+0 records in
0+0 records out
0 bytes transferred in 0.000007 secs (0 bytes/sec)
Start mainAgent at http://localhost:8989
Start sourceAgent at http://localhost:8000
Start destinationAgent at http://localhost:9000
Test setup is done:
status of mainAgent
{"url":"http://localhost:8989","name":"mainAgent","ts":1508053652,"catalog":"sqlite3","protocol":"http","backend":"/tmp/transfer2go/main","tool":"/bin/cp","toolopts":"","agents":{"destinationAgent":"http://localhost:9000","mainAgent":"http://localhost:8989","sourceAgent":"http://localhost:8000"},"addrs":["fe80::1","fe80::c2ce:cdff:feea:5421","192.168.0.3","fe80::6c5f:71ff:fe4a:445a"],"metrics":{"bytes":0,"failed":0,"in":0,"total":0,"totalBytes":0},"cpuusage":100,"memusage":2789.3203125}
status of sourceAgent
{"url":"http://localhost:8000","name":"sourceAgent","ts":1508053652,"catalog":"sqlite3","protocol":"http","backend":"/tmp/transfer2go/source","tool":"/bin/cp","toolopts":"","agents":{"destinationAgent":"http://localhost:9000","mainAgent":"http://localhost:8989","sourceAgent":"http://localhost:8000"},"addrs":["fe80::1","fe80::c2ce:cdff:feea:5421","192.168.0.3","fe80::6c5f:71ff:fe4a:445a"],"metrics":{"bytes":0,"failed":0,"in":0,"total":0,"totalBytes":0},"cpuusage":25,"memusage":2800.171875}
status of destinationAgent
{"url":"http://localhost:9000","name":"destinationAgent","ts":1508053652,"catalog":"sqlite3","protocol":"http","backend":"/tmp/transfer2go/destination","tool":"/bin/cp","toolopts":"","agents":{"destinationAgent":"http://localhost:9000","mainAgent":"http://localhost:8989","sourceAgent":"http://localhost:8000"},"addrs":["fe80::1","fe80::c2ce:cdff:feea:5421","192.168.0.3","fe80::6c5f:71ff:fe4a:445a"],"metrics":{"bytes":0,"failed":0,"in":0,"total":0,"totalBytes":0},"cpuusage":75,"memusage":2804.2265625}
Rishi 34910 1.8 0.2 556655340 7056 s000 S+ 1:17PM 0:00.08 ./transfer2go -config /tmp/transfer2go/config/main.json -auth=false
Rishi 34917 1.7 0.2 556654972 7216 s000 S+ 1:17PM 0:00.04 ./transfer2go -config /tmp/transfer2go/config/destination.json -auth=false -agent http://localhost:8989
Rishi 34915 1.4 0.2 556656636 7428 s000 S+ 1:17PM 0:00.06 ./transfer2go -config /tmp/transfer2go/config/source.json -auth=false -agent http://localhost:8989
upload records into source agent
[
{"lfn":"file.root",
"pfn":"/tmp/transfer2go/source/file.root",
"block":"/a/b/c#123",
"dataset":"/a/b/c"},
{"lfn":"file2.root",
"pfn":"/tmp/transfer2go/source/file2.root",
"block":"/a/b/c#987",
"dataset":"/a/b/c"}
]
INFO[0000] Registered records in Agent="http://localhost:8000" Size=2
list records at http://localhost:8989
null
list records at http://localhost:8000
[{"lfn":"file.root","pfn":"/tmp/transfer2go/source/file.root","dataset":"/a/b/c","block":"/a/b/c#123","bytes":1048576,"hash":"00f00001","transferTime":0,"timestamp":0},{"lfn":"file2.root","pfn":"/tmp/transfer2go/source/file2.root","dataset":"/a/b/c","block":"/a/b/c#987","bytes":1048576,"hash":"00f00001","transferTime":0,"timestamp":0}]
list records at http://localhost:9000
null
Transfer file from sourceAgent (http://localhost:8000) to destinationAgent (http://localhost:9000)
INFO[0000] HTTP GET Args= Error=<nil> Time=1.867513ms URL="http://localhost:8989/agents"
INFO[0000] <TransferRequest id= priority=0 status= ts=0 lfn= block= dataset=/a/b/c srcUrl=http://localhost:8000 srcAlias=sourceAgent dstUrl=http://localhost:9000 dstAlias=destinationAgent regUrl=http://localhost:8989 regAlias=mainAgent delay=0>
INFO[0000] HTTP POST Args="[{"ts":0,"file":"","block":"","dataset":"/a/b/c","srcUrl":"http://localhost:8000","srcAlias":"sourceAgent","dstUrl":"http://localhost:9000","dstAlias":"destinationAgent","regUrl":"http://localhost:8989","regAlias":"mainAgent","delay":0,"id":"","priority":0,"status":""}]" Error=<nil> Time=650.433µs URL="http://localhost:8989/request"
INFO[0000] successfully registered request Url="http://localhost:8989/request"
list known requests on mainAgent
requests=[{"ts":0,"file":"","block":"","dataset":"/a/b/c","srcUrl":"http://localhost:8000","srcAlias":"sourceAgent","dstUrl":"http://localhost:9000","dstAlias":"destinationAgent","regUrl":"http://localhost:8989","regAlias":"mainAgent","delay":0,"id":"0a2f56de-af22-5fd2-ab38-5746db79e79d","priority":0,"status":""}]
list know requests on mainAgent via requests API
INFO[0000] <TransferRequest id=0a2f56de-af22-5fd2-ab38-5746db79e79d priority=0 status= ts=0 lfn= block= dataset=/a/b/c srcUrl=http://localhost:8000 srcAlias=sourceAgent dstUrl=http://localhost:9000 dstAlias=destinationAgent regUrl=http://localhost:8989 regAlias=mainAgent delay=0>
You may visit http://localhost:8989/html/main.html to view and/or approve requests
approve request 0a2f56de-af22-5fd2-ab38-5746db79e79d
INFO[0000] successfully process the action Action=approve Id=0a2f56de-af22-5fd2-ab38-5746db79e79d Url="http://localhost:8989/action"
Datasets at source and destination matched
Main agent REQUEST table
1|0a2f56de-af22-5fd2-ab38-5746db79e79d|||/a/b/c|http://localhost:8000|sourceAgent|http://localhost:9000|destinationAgent|http://localhost:8989|mainAgent|pending|0
Source agent tables
Files table:
1|file.root|/tmp/transfer2go/source/file.root|1|1|1048576|00f00001|0|0
2|file2.root|/tmp/transfer2go/source/file2.root|2|1|1048576|00f00001|0|0
Blocks table:
1|/a/b/c#123|1
2|/a/b/c#987|1
Datasets table:
1|/a/b/c
Destination agent tables
Files table:
1|file2.root|/tmp/transfer2go/destination/file2.root|1|1|1048576|00f00001|0|1508053655
2|file.root|/tmp/transfer2go/destination/file.root|2|1|1048576|00f00001|0|1508053655
Blocks table:
1|/a/b/c#987|1
2|/a/b/c#123|1
Datasets table:
1|/a/b/c
Test OK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment