filecoin-project / lotus-infra

1 stars 0 forks source link

check bootstrap nodes scripts allows json output #1508

Closed ognots closed 4 months ago

ognots commented 1 year ago

add a flag to enable json, machine readable output test results should be queryable later using a log aggregation tool such as Loki useful for automation

ognots commented 1 year ago

produces test output like this:

{
  "time": "2023-09-29T21:22:33+00:00",
  "result": {
    "type": "connection",
    "peer": "/dns4/bootstrap-0.mainnet.filops.net/tcp/1347/p2p/12D3KooWCVe8MmsEMes2FzgTpt9fXtmCY7wrq91GRiaC8PHSCCBj",
    "success": "true"
  }
}
{
  "time": "2023-09-29T21:22:33+00:00",
  "result": {
    "type": "connection",
    "peer": "/dns4/bootstrap-1.mainnet.filops.net/tcp/1347/p2p/12D3KooWCwevHg1yLCvktf2nvLu7L9894mcrJR4MsBCcm4syShVc",
    "success": "true"
  }
}
{
  "time": "2023-09-29T21:22:33+00:00",
  "result": {
    "type": "connection",
    "peer": "/dns4/bootstrap-3.mainnet.filops.net/tcp/1347/p2p/12D3KooWKhgq8c7NQ9iGjbyK7v7phXvG6492HQfiDaGHLHLQjk7R",
    "success": "true"
  }
}
{
  "time": "2023-09-29T21:22:33+00:00",
  "result": {
    "type": "connection",
    "peer": "/dns4/bootstrap-4.mainnet.filops.net/tcp/1347/p2p/12D3KooWL6PsFNPhYftrJzGgF5U18hFoaVhfGk7xwzD8yVrHJ3Uc",
    "success": "true"
  }
}
{
  "time": "2023-09-29T21:22:33+00:00",
  "result": {
    "type": "connection",
    "peer": "/dns4/bootstrap-5.mainnet.filops.net/tcp/1347/p2p/12D3KooWLFynvDQiUpXoHroV1YxKHhPJgysQGH2k3ZGwtWzR4dFH",
    "success": "true"
  }
}
{
  "time": "2023-09-29T21:22:33+00:00",
  "result": {
    "type": "connection",
    "peer": "/dns4/node.glif.io/tcp/1235/p2p/12D3KooWBF8cpp65hp2u9LK5mh19x67ftAam84z9LsfaquTDSBpt",
    "success": "true"
  }
}
{
  "time": "2023-09-29T21:22:33+00:00",
  "result": {
    "type": "connection",
    "peer": "/dns4/bootstarp-0.1475.io/tcp/61256/p2p/12D3KooWRzCVDwHUkgdK7eRgnoXbjDAELhxPErjHzbRLguSV1aRt",
    "success": "true"
  }
}
{
  "time": "2023-09-29T21:22:33+00:00",
  "result": {
    "type": "connection",
    "peer": "/dns4/bootstrap-venus.mainnet.filincubator.com/tcp/8888/p2p/QmQu8C6deXwKvJP2D8B6QGyhngc3ZiDnFzEHBDx8yeBXST",
    "success": "true"
  }
}

{
  "time": "2023-09-29T21:22:33+00:00",
  "result": {
    "type": "connection",
    "peer": "/dns4/bootstrap-2.mainnet.filops.net/tcp/1347/p2p/12D3KooWEWVwHGn2yR36gKLozmb4YjDJGerotAPGxmdWZx2nxMC4",
    "success": "false"
  }
}
{
  "time": "2023-09-29T21:22:33+00:00",
  "result": {
    "type": "connection",
    "peer": "/dns4/bootstrap-6.mainnet.filops.net/tcp/1347/p2p/12D3KooWP5MwCiqdMETF9ub1P3MbCvQCcfconnYHbWg6sUJcDRQQ",
    "success": "false"
  }
}
{
  "time": "2023-09-29T21:22:33+00:00",
  "result": {
    "type": "connection",
    "peer": "/dns4/bootstrap-7.mainnet.filops.net/tcp/1347/p2p/12D3KooWRs3aY1p3juFjPy8gPN95PEQChm2QKGUCAdcDCC4EBMKf",
    "success": "false"
  }
}
{
  "time": "2023-09-29T21:22:33+00:00",
  "result": {
    "type": "connection",
    "peer": "/dns4/bootstrap-8.mainnet.filops.net/tcp/1347/p2p/12D3KooWScFR7385LTyR4zU1bYdzSiiAb5rnNABfVahPvVSzyTkR",
    "success": "false"
  }
}
{
  "time": "2023-09-29T21:22:33+00:00",
  "result": {
    "type": "connection",
    "peer": "/dns4/lotus-bootstrap.ipfsforce.com/tcp/41778/p2p/12D3KooWGhufNmZHF3sv48aQeS13ng5XVJZ9E6qy2Ms4VzqeUsHk",
    "success": "false"
  }
}
{
  "time": "2023-09-29T21:22:33+00:00",
  "result": {
    "type": "connection",
    "peer": "/dns4/bootstrap-0.starpool.in/tcp/12757/p2p/12D3KooWGHpBMeZbestVEWkfdnC9u7p6uFHXL1n7m1ZBqsEmiUzz",
    "success": "false"
  }
}
{
  "time": "2023-09-29T21:22:33+00:00",
  "result": {
    "type": "connection",
    "peer": "/dns4/bootstrap-1.starpool.in/tcp/12757/p2p/12D3KooWQZrGH1PxSNZPum99M1zNvjNFM33d1AAu5DcvdHptuU7u",
    "success": "false"
  }
}
{
  "time": "2023-09-29T21:22:33+00:00",
  "result": {
    "type": "connection",
    "peer": "/dns4/bootstrap-0.ipfsmain.cn/tcp/34721/p2p/12D3KooWQnwEGNqcM2nAcPtRR9rAX8Hrg4k9kJLCHoTR5chJfz6d",
    "success": "false"
  }
}
{
  "time": "2023-09-29T21:22:33+00:00",
  "result": {
    "type": "connection",
    "peer": "/dns4/bootstrap-1.ipfsmain.cn/tcp/34723/p2p/12D3KooWMKxMkD5DMpSWsW7dBddKxKT7L2GgbNuckz9otxvkvByP",
    "success": "false"
  }
}
ognots commented 1 year ago

still to do: when json output is set, either the lotus command output needs to be shoved in to an "info" level structured log, or sent to /dev/null

rjan90 commented 4 months ago

Closing as outdated