graphprotocol / mission-control-indexer

Technical indexer documentation and infrastructure templates for the Mission Control testnet
21 stars 4 forks source link

managing allocation, does not always work #78

Closed grassets closed 3 years ago

grassets commented 4 years ago

image while rules and indexer agent logs show one more subgraph: {"level":30,"time":1600258120411,"pid":1,"hostname":"1002dadee85d","name":"IndexerAgent","deploy":[],"remove":[],"msg":"Deployment changes"} {"level":30,"time":1600258120411,"pid":1,"hostname":"1002dadee85d","name":"IndexerAgent","currentEpoch":1568,"maxAllocationEpochs":24,"allocationLifetime":23,"active":[{"id":"0x6fca82717fbe270aabcbd16e00980ec7da5d8ff7","deployment":{"bytes32":"0xde61fdafa7b737b71fb6e2b639b92dda625727d4049850d9fc8f9f315de2c4de","ipfsHash":"QmdJjt7nX7bZraGLRb93eJMQ9ND4SwoFQtA934N3FdxMBs"},"createdAtEpoch":1566},{"id":"0x71a670cf96cbd040b134e239c3bfb2dc6367161a","deployment":{"bytes32":"0xe29ee672bec24179e7f5e1163df9e9b6f9194545d974bec220abb4f0099d1dad","ipfsHash":"QmdbHP5ALcHda6UdCtZLYEwQJo7xTKKgUXMwMLLiCspYFE"},"createdAtEpoch":1566},{"id":"0xf5a31b1cdb24579438c7d18458f4f37ee79bb883","deployment":{"bytes32":"0x78b5aa53c182c1d81cde580f43ace5434ace0e168ecd4ec248386119dbfb75f1","ipfsHash":"QmWTrJJ9W8h3JE19FhCzzPYsJ2tgXZCdUqnbyuo64ToTBN"},"createdAtEpoch":1567}],"msg":"Reconcile allocations"} {"level":20,"time":1600258120411,"pid":1,"hostname":"1002dadee85d","name":"IndexerAgent","number":3,"deployments":[{"bytes32":"0x78b5aa53c182c1d81cde580f43ace5434ace0e168ecd4ec248386119dbfb75f1","ipfsHash":"QmWTrJJ9W8h3JE19FhCzzPYsJ2tgXZCdUqnbyuo64ToTBN"},{"bytes32":"0xde61fdafa7b737b71fb6e2b639b92dda625727d4049850d9fc8f9f315de2c4de","ipfsHash":"QmdJjt7nX7bZraGLRb93eJMQ9ND4SwoFQtA934N3FdxMBs"},{"bytes32":"0xe29ee672bec24179e7f5e1163df9e9b6f9194545d974bec220abb4f0099d1dad","ipfsHash":"QmdbHP5ALcHda6UdCtZLYEwQJo7xTKKgUXMwMLLiCspYFE"}],"msg":"Deployments to reconcile allocations for"} {"level":30,"time":1600258120411,"pid":1,"hostname":"1002dadee85d","name":"IndexerAgent","deployment":{"bytes32":"0x78b5aa53c182c1d81cde580f43ace5434ace0e168ecd4ec248386119dbfb75f1","ipfsHash":"QmWTrJJ9W8h3JE19FhCzzPYsJ2tgXZCdUqnbyuo64ToTBN"},"epoch":1568,"allocationAmount":"1000.0","totalActiveAllocationAmount":"1000.0","desiredNumberOfAllocations":1,"activeNumberOfAllocations":1,"activeAllocations":[{"id":"0xf5a31b1cdb24579438c7d18458f4f37ee79bb883","createdAtEpoch":1567,"amount":"1000.0"}],"msg":"Reconcile deployment allocations"} {"level":30,"time":1600258120412,"pid":1,"hostname":"1002dadee85d","name":"IndexerAgent","deployment":{"bytes32":"0xde61fdafa7b737b71fb6e2b639b92dda625727d4049850d9fc8f9f315de2c4de","ipfsHash":"QmdJjt7nX7bZraGLRb93eJMQ9ND4SwoFQtA934N3FdxMBs"},"epoch":1568,"allocationAmount":"1500.0","totalActiveAllocationAmount":"1500.0","desiredNumberOfAllocations":1,"activeNumberOfAllocations":1,"activeAllocations":[{"id":"0x6fca82717fbe270aabcbd16e00980ec7da5d8ff7","createdAtEpoch":1566,"amount":"1500.0"}],"msg":"Reconcile deployment allocations"} {"level":30,"time":1600258120412,"pid":1,"hostname":"1002dadee85d","name":"IndexerAgent","deployment":{"bytes32":"0xe29ee672bec24179e7f5e1163df9e9b6f9194545d974bec220abb4f0099d1dad","ipfsHash":"QmdbHP5ALcHda6UdCtZLYEwQJo7xTKKgUXMwMLLiCspYFE"},"epoch":1568,"allocationAmount":"1200.0","totalActiveAllocationAmount":"1200.0","desiredNumberOfAllocations":1,"activeNumberOfAllocations":1,"activeAllocations":[{"id":"0x71a670cf96cbd040b134e239c3bfb2dc6367161a","createdAtEpoch":1566,"amount":"1200.0"}],"msg":"Reconcile deployment allocations"}

image

Another issue is when changing allocation and manipulating with start/stop even the indexer agent in logs shows old alocation..

2179 graph indexer rules start 0x0652da44da147270e3800f1d6b8f21a2b70d414f266dec5df0b45e62861c2475 2180 docker logs --tail 100 -f indexer-agent 2181 graph indexer rules stop 0x0652da44da147270e3800f1d6b8f21a2b70d414f266dec5df0b45e62861c2475 2182 docker logs --tail 100 -f indexer-agent 2183 graph indexer rules start 0x0652da44da147270e3800f1d6b8f21a2b70d414f266dec5df0b45e62861c2475 2184 docker logs --tail 100 -f indexer-agent 2185 graph indexer rules set QmNmLRx82a8FEvVr3aBahEReAj3fN4JSmHG2ufTEVwVR7z allocationAmount null 2186 docker logs --tail 100 -f indexer-agent 2187 graph indexer rules set QmNmLRx82a8FEvVr3aBahEReAj3fN4JSmHG2ufTEVwVR7z allocationAmount 100 2188 docker logs --tail 100 -f indexer-agent 2189 history

{"level":30,"time":1600261183746,"pid":1,"hostname":"1002dadee85d","name":"IndexerAgent","deployment":{"bytes32":"0x0652da44da147270e3800f1d6b8f21a2b70d414f266dec5df0b45e62861c2475","ipfsHash":"QmNmLRx82a8FEvVr3aBahEReAj3fN4JSmHG2ufTEVwVR7z"},"epoch":1569,"allocationAmount":"100.0","totalActiveAllocationAmount":"1.0","desiredNumberOfAllocations":1,"activeNumberOfAllocations":1,"activeAllocations":[{"id":"0x5eec982e287888e71ea01b4341a79f8a88842e0e","createdAtEpoch":1569,"amount":"1.0"}],"msg":"Reconcile deployment allocations"}

Then added another allocation ;

graph indexer rules set QmTXzATwNfgGVukV1fX2T6xw9f6LAYRVWpsdXyRWzUR2H9 allocationAmount 500

image

Logs:

{"level":30,"time":1600261679496,"pid":1,"hostname":"1002dadee85d","name":"IndexerAgent","deployment":{"bytes32":"0x07cba3f2adb9510af75ae0ed4f911ed76555f54c30268e099b1b72d1374dda41","ipfsHash":"QmNs5fU6VkyGUsaNsa5sUHEKpzCA5AZWKJG8LaBrcCRpmW"},"epoch":1569,"allocationAmount":"1100.0","totalActiveAllocationAmount":"1100.0","desiredNumberOfAllocations":1,"activeNumberOfAllocations":1,"activeAllocations":[{"id":"0x388e35537c467e656607ae6694e159a717082c20","createdAtEpoch":1569,"amount":"1100.0"}],"msg":"Reconcile deployment allocations"} {"level":30,"time":1600261679496,"pid":1,"hostname":"1002dadee85d","name":"IndexerAgent","deployment":{"bytes32":"0x4d31d21d389263c98d1e83a031e8fed17cdcef15bd62ee8153f34188a83c7b1c","ipfsHash":"QmTXzATwNfgGVukV1fX2T6xw9f6LAYRVWpsdXyRWzUR2H9"},"epoch":1569,"allocationAmount":"500.0","totalActiveAllocationAmount":"500.0","desiredNumberOfAllocations":1,"activeNumberOfAllocations":1,"activeAllocations":[{"id":"0x3c1afa4e532c2865e4020eb3a175e57340d44553","createdAtEpoch":1569,"amount":"500.0"}],"msg":"Reconcile deployment allocations"} {"level":30,"time":1600261679497,"pid":1,"hostname":"1002dadee85d","name":"IndexerAgent","deployment":{"bytes32":"0x78b5aa53c182c1d81cde580f43ace5434ace0e168ecd4ec248386119dbfb75f1","ipfsHash":"QmWTrJJ9W8h3JE19FhCzzPYsJ2tgXZCdUqnbyuo64ToTBN"},"epoch":1569,"allocationAmount":"900.0","totalActiveAllocationAmount":"900.0","desiredNumberOfAllocations":1,"activeNumberOfAllocations":1,"activeAllocations":[{"id":"0x7b7cbdaec9439eda20944fcadbebe72b87c15c49","createdAtEpoch":1569,"amount":"900.0"}],"msg":"Reconcile deployment allocations"} {"level":30,"time":1600261679497,"pid":1,"hostname":"1002dadee85d","name":"IndexerAgent","deployment":{"bytes32":"0xde61fdafa7b737b71fb6e2b639b92dda625727d4049850d9fc8f9f315de2c4de","ipfsHash":"QmdJjt7nX7bZraGLRb93eJMQ9ND4SwoFQtA934N3FdxMBs"},"epoch":1569,"allocationAmount":"1500.0","totalActiveAllocationAmount":"1500.0","desiredNumberOfAllocations":1,"activeNumberOfAllocations":1,"activeAllocations":[{"id":"0x6fca82717fbe270aabcbd16e00980ec7da5d8ff7","createdAtEpoch":1566,"amount":"1500.0"}],"msg":"Reconcile deployment allocations"} {"level":30,"time":1600261679498,"pid":1,"hostname":"1002dadee85d","name":"IndexerAgent","deployment":{"bytes32":"0xe29ee672bec24179e7f5e1163df9e9b6f9194545d974bec220abb4f0099d1dad","ipfsHash":"QmdbHP5ALcHda6UdCtZLYEwQJo7xTKKgUXMwMLLiCspYFE"},"epoch":1569,"allocationAmount":"1200.0","totalActiveAllocationAmount":"1200.0","desiredNumberOfAllocations":1,"activeNumberOfAllocations":1,"activeAllocations":[{"id":"0x71a670cf96cbd040b134e239c3bfb2dc6367161a","createdAtEpoch":1566,"amount":"1200.0"}],"msg":"Reconcile deployment allocations"} {"level":30,"time":1600261679498,"pid":1,"hostname":"1002dadee85d","name":"IndexerAgent","deployment":{"bytes32":"0x0652da44da147270e3800f1d6b8f21a2b70d414f266dec5df0b45e62861c2475","ipfsHash":"QmNmLRx82a8FEvVr3aBahEReAj3fN4JSmHG2ufTEVwVR7z"},"epoch":1569,"allocationAmount":"0.01","totalActiveAllocationAmount":"1.0","desiredNumberOfAllocations":1,"activeNumberOfAllocations":1,"activeAllocations":[{"id":"0x5eec982e287888e71ea01b4341a79f8a88842e0e","createdAtEpoch":1569,"amount":"1.0"}],"msg":"Reconcile deployment allocations"} {"level":30,"time":1600261679498,"pid":1,"hostname":"1002dadee85d","name":"IndexerAgent","deployment":{"bytes32":"0x0652da44da147270e3800f1d6b8f21a2b70d414f266dec5df0b45e62861c2475","ipfsHash":"QmNmLRx82a8FEvVr3aBahEReAj3fN4JSmHG2ufTEVwVR7z"},"epoch":1569,"allocations":["0x5eec982e287888e71ea01b4341a79f8a88842e0e"],"msg":"Deployment is not (or no longer) worth indexing, settle all allocations"} {"level":30,"time":1600261689499,"pid":1,"hostname":"1002dadee85d","name":"IndexerAgent","msg":"Synchronizing subgraphs"}

image

trader-payne commented 3 years ago

@grassets I believe this is somewhat similar to https://github.com/graphprotocol/mission-control-indexer/issues/75, isn't it? I can't repro this in the current environment. Feel free to close the issue if it's solved 🙂

grassets commented 3 years ago

@trader-payne not sure is the issues is the same. however this one can be closed i believe as the issues i haven't experienced issue described here since the beginning of phase2.