-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
skywire-cli log collecting command #1414
skywire-cli log collecting command #1414
Conversation
what is the default log rotation interval? We shouldn't expect very old logs to be there, beyond the default interval. so we could by default fetch yesterday's, and have a flag to be able to get days before that, up to the default log rotation interval
we pull the logs from the server and client, or the visor on both ends of the transport. We compare these to make sure they agree about the data sent and received. In the future we may do a 1-byte hash of the actual data sent and received But so long as the numbers match on both ends of the transport, everything is good if the numbers don't match, then this is indicative of some issue we would need to look into. And its unlikely to be a singular occurrence. If the logs can't be fetched from the client side, which is altogether likely considering skywire or the machine running skywire (i.e. someone's desktop / vpn consumer) may not run continuously; then we can just ignore that or take it as an honest record. Is there no other way to tell that a transport did exist, from the service end? we need to just confirm that if possible rather than allow someone to make false transport logs to be improved upon later
A list of the public keys, ranked by bandwidth handled according to the transport logs is so if there are 10 visors; 3 in the top tier, 3 in the bottom, and 4 in the middle. if there are 11, then the middle tier can contain 5 keys If a visor processed no bandwidth, we can put its public key in the bottom tier. And if some visors have equal bandwidth, according to the transport logs, we should simply randomize the order of those keys which had the same bandwidth. Then divide the list as evenly as possible. If you have objection to this, simply state your alternative idea. I think its better to populate the middle tier rather than overflowing to the top and bottom ones. I've merged your PR here: Please note that the condition for the node-info.json (system survey) to be generated, which may be on my autoconfig PR, is subject to the presence of the reward address being set in the local path as reward.txt additionally
|
Testing this, it runs but isn't collecting very much. It fetched the logs and survey from my machine I know why it isn't collecting very many logs. We are querying visors which are not of a version we should expect to have the dmsghttp log server running. Can you check the versions of the visors before attempting to collect the logs? This also does not seem to implement the ping. That is ok, since we can't ping them yesterday but we are collecting the logs from yesterday. We may not integrate it right here.. If we simply get a list of the keys to be rewarded we could script ping after the fact. I don't see much in terms of log reconciliation either. But since my visor was the only one which logs were collected for, I would not expect that to be done. I recommend further tests after the release. |
Did you run
make format && make check
? YesFixes #_
Changes:
How to test this PR:
node-info.json
andnode-info.sha
skywire-cli log collecting -d <count-of-days-for-getting-logs> -e <environment>
Example:
This command get last 5 days log files and node-info files from test env. Default value for
-e
(env) isprod
and for-d
(duration) is1
.