FreifunkBremen / yanic

Yet another node info collector - for respondd to be used with meshviewer to Grafana (with influxdb or graphite)
https://freifunkbremen.github.io/yanic/
GNU Affero General Public License v3.0
20 stars 40 forks source link

[TASK] add WGPeerselector #193

Closed AiyionPrime closed 3 years ago

AiyionPrime commented 3 years ago

Description

This implements support for wgpeerselector which is available in gluon soon, hopefully.

Motivation and Context

@genofire and me stumbled across leos changes in respondd, to find it behaves differently, than I anticipated.

https://github.com/freifunk-gluon/gluon/pull/2168/files#diff-bc6b601f340438a12155602f6fc524b4a67fd0c7c51c6347ee92ee1e89e7c86a

Originally posted by @AiyionPrime in https://github.com/FreifunkBremen/yanic/issues/183#issuecomment-779373640

This is no solution for wireguard, but resembles part of leos changes in his PR. Whether this PR gets extended later today and the other one deleted or both this and #187 stay valid is clear until midnight.

Checklist:

I'm not sure whether there's a need to provide documention about wgpeerselector. @genofire what do you think?

AiyionPrime commented 3 years ago

fuck.

AiyionPrime commented 3 years ago

This will be blocked by the merge of #192 soon.

AiyionPrime commented 3 years ago

This one and #187 are ready to be merged; @lemoer and me settled on this format:

[...]
      },
      "wireguard": {
        "enabled": true,
        "public_key": "0000000000000000000000000000000000000000000=",
        "version": "v1.0.20210124"
      },
      "wgpeerselector": {
        "enabled": true,
        "version": "v1"
      }
    },
[...]

Originally posted by @aiyion in https://github.com/lemoer/gluon/pull/3#issue-575768577

I patched the two PRs in our yanic and can now show at least one running example:

curl https://harvester.ffh.zone/nodes.json | jq '(.nodes[] | select(.nodeinfo.node_id == "44d1fa59f87d"))' | less

We are currently building a new firmware, that contains our gluon changes; which we'd like to test before we deploy it to the gluon PR, but the format stands.

AiyionPrime commented 3 years ago

We now have got four nodes with the new firmware; all up and well. I'd be fine with merging,.

@corny @genofire Please let me know, whether #192 is expected to be merged in the next days; in that case I'd reformat my PRs according to the proposed changes in 32217db5b243baecfe75557be367d107e35d06a9.

AiyionPrime commented 3 years ago

The changes in #192 are matched now.

AiyionPrime commented 3 years ago

We spoke about this yesterday in hackint#ffhb: This is currently blocked by https://github.com/freifunk-gluon/gluon/pull/2163 and https://github.com/freifunk-gluon/gluon/pull/2168.

AiyionPrime commented 3 years ago

Update: This is currently blocked by freifunk-gluon/gluon#2168.

AiyionPrime commented 3 years ago

WGPeerselector will not be reflected in respondd, but the other PR will be, and contain info of this package in it. https://github.com/freifunk-gluon/gluon/pull/2168#issuecomment-887051572

This PR is outdated and not necessary anymore.