[PR #2760] [CLOSED] fix: node list-routes output formatting #2841

Closed
opened 2025-12-29 04:19:16 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2760
Author: @YouSysAdmin
Created: 9/5/2025
Status: Closed

Base: mainHead: fix/routess-list-output


📝 Commits (1)

  • c38a20a fix: node lisst-routes output format

📊 Changes

1 file changed (+3 additions, -3 deletions)

View changed files

📝 cmd/headscale/cli/nodes.go (+3 -3)

📄 Description

Small fix for node list-routes formatting.

Problem:

If you have many routes for one node, this will result in incorrect output that will be unusable.

ID | Hostname                     | Approved                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Available                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Serving (Primary)
2  | vpn-router           | 0.0.0.0/0, 234.2.0.0/16, 234.3.0.0/16, 234.4.0.0/16, 234.5.0.0/16, 234.6.0.0/16, 234.7.0.0/16, 234.9.0.0/16, 234.234.0.0/16, 234.12.0.0/16, 234.14.0.0/16, 234.16.0.0/16, 234.17.0.0/16, 234.18.0.0/16, 234.19.0.0/16, 234.21.0.0/16, 234.23.0.0/16, 234.24.0.0/16, 234.25.0.0/16, 234.26.0.0/16, 234.27.0.0/16, 234.28.0.0/16, 234.29.0.0/16, 234.34.0.0/16, 234.35.0.0/16, 234.37.0.0/16, 234.38.0.0/16, 234.40.0.0/16, 234.205.0.0/16, 234.252.16.0/23, 234.31.0.0/24, ....

Fix:

This fix propagates a change to replace the comma-separated list with a list separated by line breaks.
Plus it makes routes analysis much easier.

ID | Hostname     | Approved.       | Available       | Serving (Primary)
2  | vpn-router   | 0.0.0.0/0       | 0.0.0.0/0       | 234.2.0.0/16
   |              | 234.2.0.0/16    | 234.2.0.0/16    | 234.3.0.0/16
   |              | 234.3.0.0/16    | 234.3.0.0/16    | 234.4.0.0/16
   |              | 234.4.0.0/16    | 234.4.0.0/16    | 234.5.0.0/16
   |              | 234.5.0.0/16    | 234.5.0.0/16    | 234.6.0.0/16
   |              | 234.6.0.0/16    | 234.6.0.0/16    | 234.7.0.0/16
   |              | 234.7.0.0/16    | 234.7.0.0/16    | 234.9.0.0/16
   |              | 234.9.0.0/16    | 234.9.0.0/16    | 234.234.0.0/16
   |              | 234.234.0.0/16  | 234.234.0.0/16  | 234.12.0.0/16
   |              | 234.12.0.0/16   | 234.12.0.0/16   | 234.14.0.0/16
   |              | 234.14.0.0/16   | 234.14.0.0/16   | 234.16.0.0/16
   |              | 234.16.0.0/16   | 234.16.0.0/16   | 234.17.0.0/16
   |              | 234.17.0.0/16   | 234.17.0.0/16   | 234.18.0.0/16
   |              | 234.18.0.0/16   | 234.18.0.0/16   | 234.19.0.0/16
   |              | 234.19.0.0/16   | 234.19.0.0/16   | 234.21.0.0/16
   |              | 234.21.0.0/16   | 234.21.0.0/16   | 234.23.0.0/16

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/2760 **Author:** [@YouSysAdmin](https://github.com/YouSysAdmin) **Created:** 9/5/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/routess-list-output` --- ### 📝 Commits (1) - [`c38a20a`](https://github.com/juanfont/headscale/commit/c38a20abf855e726d44892f323cd29a9e358a34c) fix: node lisst-routes output format ### 📊 Changes **1 file changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `cmd/headscale/cli/nodes.go` (+3 -3) </details> ### 📄 Description Small fix for `node list-routes` formatting. ### Problem: If you have many routes for one node, this will result in incorrect output that will be unusable. ``` ID | Hostname | Approved | Available | Serving (Primary) 2 | vpn-router | 0.0.0.0/0, 234.2.0.0/16, 234.3.0.0/16, 234.4.0.0/16, 234.5.0.0/16, 234.6.0.0/16, 234.7.0.0/16, 234.9.0.0/16, 234.234.0.0/16, 234.12.0.0/16, 234.14.0.0/16, 234.16.0.0/16, 234.17.0.0/16, 234.18.0.0/16, 234.19.0.0/16, 234.21.0.0/16, 234.23.0.0/16, 234.24.0.0/16, 234.25.0.0/16, 234.26.0.0/16, 234.27.0.0/16, 234.28.0.0/16, 234.29.0.0/16, 234.34.0.0/16, 234.35.0.0/16, 234.37.0.0/16, 234.38.0.0/16, 234.40.0.0/16, 234.205.0.0/16, 234.252.16.0/23, 234.31.0.0/24, .... ``` ### Fix: This fix propagates a change to replace the comma-separated list with a list separated by line breaks. Plus it makes routes analysis much easier. ``` ID | Hostname | Approved. | Available | Serving (Primary) 2 | vpn-router | 0.0.0.0/0 | 0.0.0.0/0 | 234.2.0.0/16 | | 234.2.0.0/16 | 234.2.0.0/16 | 234.3.0.0/16 | | 234.3.0.0/16 | 234.3.0.0/16 | 234.4.0.0/16 | | 234.4.0.0/16 | 234.4.0.0/16 | 234.5.0.0/16 | | 234.5.0.0/16 | 234.5.0.0/16 | 234.6.0.0/16 | | 234.6.0.0/16 | 234.6.0.0/16 | 234.7.0.0/16 | | 234.7.0.0/16 | 234.7.0.0/16 | 234.9.0.0/16 | | 234.9.0.0/16 | 234.9.0.0/16 | 234.234.0.0/16 | | 234.234.0.0/16 | 234.234.0.0/16 | 234.12.0.0/16 | | 234.12.0.0/16 | 234.12.0.0/16 | 234.14.0.0/16 | | 234.14.0.0/16 | 234.14.0.0/16 | 234.16.0.0/16 | | 234.16.0.0/16 | 234.16.0.0/16 | 234.17.0.0/16 | | 234.17.0.0/16 | 234.17.0.0/16 | 234.18.0.0/16 | | 234.18.0.0/16 | 234.18.0.0/16 | 234.19.0.0/16 | | 234.19.0.0/16 | 234.19.0.0/16 | 234.21.0.0/16 | | 234.21.0.0/16 | 234.21.0.0/16 | 234.23.0.0/16 ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 04:19:16 +01:00
adam closed this issue 2025-12-29 04:19:16 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2841