Skip to content

Conversation

qdii
Copy link

@qdii qdii commented Mar 15, 2025

Description is not a supported field from systemd netdev (https://www.freedesktop.org/software/systemd/man/latest/systemd.netdev.html\#%5BWireGuardPeer%5D%20Section%20Options). friendly_name makes the Wireguard config compatible with prometheus_wireguard_exporter

Fix #127
Fix #123

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

Description is not a supported field from systemd netdev (https://www.freedesktop.org/software/systemd/man/latest/systemd.netdev.html\#%5BWireGuardPeer%5D%20Section%20Options).
friendly_name makes the Wireguard config compatible with prometheus_wireguard_exporter

Fix voxpupuli#127
Fix voxpupuli#123
Copy link

@fetzerms fetzerms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently the tests are failing (because the tests expect Description= in the unit tests). Can you also enhance the tests?


[WireGuardPeer]
<% if $peer['description'] { -%>
Description=<%= $peer['description'] %>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing description for peers looks good to me, but it might actually be useful to keep including it as comments (so it can be seen when looking at the config file).

[Peer]
<% if $peer['description'] { -%>
# <%= $peer['description'] %>
# friendly_name = <%= $peer['description'] %>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of building compatibility for the prometheus exporter. Is friendly_name documented somewhere?

<% if $peer['description'] { -%>
# <%= $peer['description'] %>
# friendly_name = <%= $peer['description'] %>
Description=

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think Description is a valid field in wireguard configuration files, no?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Description is not a valid field for WireGuardPeer Unknown key 'Description' in section [WireGuardPeer]
2 participants