Skip to content

Fix hostname resolution #739

Merged
PawelPlesniak merged 2 commits intodevelopfrom
wanyunSu/hostname-fix
Feb 16, 2026
Merged

Fix hostname resolution #739
PawelPlesniak merged 2 commits intodevelopfrom
wanyunSu/hostname-fix

Conversation

@wanyunSu
Copy link
Contributor

@wanyunSu wanyunSu commented Dec 9, 2025

Description

Fixes #696
In status table, endpoints IP addresses now resolve to their corresponding hostnames.

Note: In k8s, the root controller displays its pod IP, as pod IPs do not have reverse DNS entries and cannot be resolved to hostnames.

┏━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Name                   ┃ Info ┃ State   ┃ Substate ┃ In error ┃ Included ┃ Endpoint                          ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━╇━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ root-controller        │      │ initial │ initial  │ No       │ Yes      │ grpc://np04-srv-019.cern.ch:31385 │
│   df-controller        │      │ initial │ initial  │ No       │ Yes      │ grpc://np04-srv-019.cern.ch:38835 │
│     df-01              │      │ initial │ idle     │ No       │ Yes      │ rest://np04-srv-019.cern.ch:59007 │
│     dfo-01             │      │ initial │ idle     │ No       │ Yes      │ rest://np04-srv-019.cern.ch:45217 │
│     tp-stream-writer   │      │ initial │ idle     │ No       │ Yes      │ rest://np04-srv-019.cern.ch:51213 │
│   hsi-fake-controller  │      │ initial │ initial  │ No       │ Yes      │ grpc://np04-srv-019.cern.ch:42357 │
│     hsi-fake-01        │      │ initial │ idle     │ No       │ Yes      │ rest://np04-srv-019.cern.ch:48435 │
│     hsi-fake-to-tc-app │      │ initial │ idle     │ No       │ Yes      │ rest://np04-srv-019.cern.ch:52507 │
│   ru-controller        │      │ initial │ initial  │ No       │ Yes      │ grpc://np04-srv-019.cern.ch:38351 │
│     ru-01              │      │ initial │ idle     │ No       │ Yes      │ rest://np04-srv-019.cern.ch:52931 │
│   trg-controller       │      │ initial │ initial  │ No       │ Yes      │ grpc://np04-srv-019.cern.ch:39977 │
│     mlt                │      │ initial │ idle     │ No       │ Yes      │ rest://np04-srv-019.cern.ch:34643 │
│     tc-maker-1         │      │ initial │ idle     │ No       │ Yes      │ rest://np04-srv-019.cern.ch:38079 │
└────────────────────────┴──────┴─────────┴──────────┴──────────┴──────────┴───────────────────────────────────┘

Type of change

  • Documentation (non-breaking change that adds or improves the documentation)
  • New feature (non-breaking change which adds functionality)
  • Optimization (non-breaking, back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (whatever its nature)

Key checklist

  • All tests pass (eg. python -m pytest)
  • Pre-commit hooks run successfully (eg. pre-commit run --all-files)

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added or an issue has been opened to tackle that in the future.
    (Indicate issue here: # (issue))

@wanyunSu wanyunSu marked this pull request as ready for review December 9, 2025 13:45
@wanyunSu wanyunSu self-assigned this Dec 11, 2025
@PawelPlesniak
Copy link
Collaborator

This PR generated the following results with k8s pm

drunc-unified-shell > ps
                                                    Processes running                                                     
┏━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━┓
┃ session ┃ friendly name           ┃ user     ┃ host         ┃ uuid                                 ┃ alive ┃ exit-code ┃
┡━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━┩
│ pawel   │ root-controller         │ pplesnia │ np04-srv-029 │ 6ab19d90-8008-4672-a8c6-9c3d36b36186 │ True  │ 0         │
│ pawel   │   ru-controller         │ pplesnia │ np04-srv-029 │ 1ac06e17-c7b9-45ed-82cb-5326981bd76e │ True  │ 0         │
│ pawel   │     ru-01               │ pplesnia │ np04-srv-029 │ ffb7927d-8725-4e8e-b4c4-76d7615a27f2 │ True  │ 0         │
│ pawel   │   df-controller         │ pplesnia │ np04-srv-029 │ 52703a4e-4e28-4adf-af9b-5856ded51e6c │ True  │ 0         │
│ pawel   │     tp-stream-writer    │ pplesnia │ np04-srv-029 │ f4fec28c-3faa-4484-ad16-c41ec533cbab │ True  │ 0         │
│ pawel   │     dfo-01              │ pplesnia │ np04-srv-029 │ ebc80103-b98b-4379-a054-211a5b1fcb02 │ True  │ 0         │
│ pawel   │     df-01               │ pplesnia │ np04-srv-029 │ 091387fc-2f23-4f2a-8d2e-6c105f86a802 │ True  │ 0         │
│ pawel   │   trg-controller        │ pplesnia │ np04-srv-029 │ 6da0ee54-01eb-432d-8e69-26ba13cf80a2 │ True  │ 0         │
│ pawel   │     tc-maker-1          │ pplesnia │ np04-srv-029 │ e7e8efb0-9e6c-4f37-81fe-ca3dda1025af │ True  │ 0         │
│ pawel   │     mlt                 │ pplesnia │ np04-srv-029 │ 4302e33d-36d6-4266-9f60-871fa3e7ecf8 │ True  │ 0         │
│ pawel   │   hsi-fake-controller   │ pplesnia │ np04-srv-029 │ 84f29954-dfb5-4d3f-8eea-3c0377af31f5 │ True  │ 0         │
│ pawel   │     hsi-fake-01         │ pplesnia │ np04-srv-029 │ 87071080-bba1-44e8-b668-05b7cad59887 │ True  │ 0         │
│ pawel   │     hsi-fake-to-tc-app  │ pplesnia │ np04-srv-029 │ 305ddbd1-adf2-4968-b40d-ae12ced185ac │ True  │ 0         │
│ pawel   │ local-connection-server │ pplesnia │ np04-srv-029 │ bee6ba1d-6e67-4811-b41b-503227c3e652 │ True  │ 0         │
└─────────┴─────────────────────────┴──────────┴──────────────┴──────────────────────────────────────┴───────┴───────────┘
drunc-unified-shell > status
                                                  pawel status                                                  
┏━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Name                   ┃ Info ┃ State   ┃ Substate ┃ In error ┃ Included ┃ Endpoint                          ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━╇━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ root-controller        │      │ initial │ initial  │ No       │ Yes      │ grpc://10.244.12.173:30510        │
│   df-controller        │      │ initial │ initial  │ No       │ Yes      │ grpc://np04-srv-029.cern.ch:43791 │
│     df-01              │      │ initial │ idle     │ No       │ Yes      │ rest://np04-srv-029.cern.ch:43913 │
│     dfo-01             │      │ initial │ idle     │ No       │ Yes      │ rest://np04-srv-029.cern.ch:44049 │
│     tp-stream-writer   │      │ initial │ idle     │ No       │ Yes      │ rest://np04-srv-029.cern.ch:51901 │
│   hsi-fake-controller  │      │ initial │ initial  │ No       │ Yes      │ grpc://np04-srv-029.cern.ch:34943 │
│     hsi-fake-01        │      │ initial │ idle     │ No       │ Yes      │ rest://np04-srv-029.cern.ch:33511 │
│     hsi-fake-to-tc-app │      │ initial │ idle     │ No       │ Yes      │ rest://np04-srv-029.cern.ch:52767 │
│   ru-controller        │      │ initial │ initial  │ No       │ Yes      │ grpc://np04-srv-029.cern.ch:36755 │
│     ru-01              │      │ initial │ idle     │ No       │ Yes      │ rest://np04-srv-029.cern.ch:43503 │
│   trg-controller       │      │ initial │ initial  │ No       │ Yes      │ grpc://np04-srv-029.cern.ch:32799 │
│     mlt                │      │ initial │ idle     │ No       │ Yes      │ rest://np04-srv-029.cern.ch:46195 │
│     tc-maker-1         │      │ initial │ idle     │ No       │ Yes      │ rest://np04-srv-029.cern.ch:53691 │
└────────────────────────┴──────┴─────────┴──────────┴──────────┴──────────┴───────────────────────────────────┘
[2026/02/16 12:54:27 UTC] INFO       shell_utils.py:165                       drunc.utils.ShellContext                           Current FSM status is initial. Available transitions are conf. Available sequence commands are start-run.

and SSH pm

drunc-unified-shell > ps
                                                   Processes running                                                   
┏━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━┓
┃ session ┃ friendly name           ┃ user     ┃ host      ┃ uuid                                 ┃ alive ┃ exit-code ┃
┡━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━┩
│ pawel   │ root-controller         │ pplesnia │ localhost │ 11bb2113-3167-412d-80b3-7e27aeca0a86 │ True  │ 0         │
│ pawel   │   ru-controller         │ pplesnia │ localhost │ 27ac8268-d7c0-47fd-b2cd-dd8b71ab3dec │ True  │ 0         │
│ pawel   │     ru-01               │ pplesnia │ localhost │ 6d9e24b0-dae3-4173-a59b-9de7ef87354e │ True  │ 0         │
│ pawel   │   df-controller         │ pplesnia │ localhost │ a992fcfa-619c-4306-b4f6-c02a3e2c3cc8 │ True  │ 0         │
│ pawel   │     tp-stream-writer    │ pplesnia │ localhost │ 2f6a7788-64b0-4b20-aadd-d64d2641d753 │ True  │ 0         │
│ pawel   │     dfo-01              │ pplesnia │ localhost │ ca45c3f2-2174-4f54-99fa-9d51a629d02e │ True  │ 0         │
│ pawel   │     df-01               │ pplesnia │ localhost │ 987f8ab6-b13c-4656-9eb8-0b998a2af99b │ True  │ 0         │
│ pawel   │   trg-controller        │ pplesnia │ localhost │ d6444195-d131-4862-9805-b070c3554065 │ True  │ 0         │
│ pawel   │     tc-maker-1          │ pplesnia │ localhost │ b3564a97-ebfe-405a-b6ef-3d2046e89394 │ True  │ 0         │
│ pawel   │     mlt                 │ pplesnia │ localhost │ fb4f5fd5-dbef-4040-ad9c-583505d92b35 │ True  │ 0         │
│ pawel   │   hsi-fake-controller   │ pplesnia │ localhost │ 5dde62e4-9319-45e1-aadf-310878fca73f │ True  │ 0         │
│ pawel   │     hsi-fake-01         │ pplesnia │ localhost │ 4657f592-0ea9-4cfb-b6f0-5d88aee5aa74 │ True  │ 0         │
│ pawel   │     hsi-fake-to-tc-app  │ pplesnia │ localhost │ 689cf785-8c20-4431-8e5e-97ba5aa0b793 │ True  │ 0         │
│ pawel   │ local-connection-server │ pplesnia │ localhost │ 841a4de3-c12f-4408-932d-b5718905da18 │ True  │ 0         │
└─────────┴─────────────────────────┴──────────┴───────────┴──────────────────────────────────────┴───────┴───────────┘
drunc-unified-shell > status
                                                  pawel status                                                  
┏━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Name                   ┃ Info ┃ State   ┃ Substate ┃ In error ┃ Included ┃ Endpoint                          ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━╇━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ root-controller        │      │ initial │ initial  │ No       │ Yes      │ grpc://np04-srv-029.cern.ch:30510 │
│   df-controller        │      │ initial │ initial  │ No       │ Yes      │ grpc://np04-srv-029.cern.ch:41087 │
│     df-01              │      │ initial │ idle     │ No       │ Yes      │ rest://np04-srv-029.cern.ch:57197 │
│     dfo-01             │      │ initial │ idle     │ No       │ Yes      │ rest://np04-srv-029.cern.ch:35125 │
│     tp-stream-writer   │      │ initial │ idle     │ No       │ Yes      │ rest://np04-srv-029.cern.ch:36819 │
│   hsi-fake-controller  │      │ initial │ initial  │ No       │ Yes      │ grpc://np04-srv-029.cern.ch:35881 │
│     hsi-fake-01        │      │ initial │ idle     │ No       │ Yes      │ rest://np04-srv-029.cern.ch:34537 │
│     hsi-fake-to-tc-app │      │ initial │ idle     │ No       │ Yes      │ rest://np04-srv-029.cern.ch:43139 │
│   ru-controller        │      │ initial │ initial  │ No       │ Yes      │ grpc://np04-srv-029.cern.ch:39101 │
│     ru-01              │      │ initial │ idle     │ No       │ Yes      │ rest://np04-srv-029.cern.ch:33489 │
│   trg-controller       │      │ initial │ initial  │ No       │ Yes      │ grpc://np04-srv-029.cern.ch:41411 │
│     mlt                │      │ initial │ idle     │ No       │ Yes      │ rest://np04-srv-029.cern.ch:37599 │
│     tc-maker-1         │      │ initial │ idle     │ No       │ Yes      │ rest://np04-srv-029.cern.ch:36603 │
└────────────────────────┴──────┴─────────┴──────────┴──────────┴──────────┴───────────────────────────────────┘

Further manual tests were ran succesfully

drunc-unified-shell k8s config/daqsystemtest/example-configs.data.xml local-1x1-config pawel boot ps start-run --run-number 1 ps status shutdown
drunc-unified-shell ssh-standalone config/daqsystemtest/example-configs.data.xml local-1x1-config pawel boot ps start-run --run-number 1 ps status shutdown

Copy link
Collaborator

@PawelPlesniak PawelPlesniak left a comment

Choose a reason for hiding this comment

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

LGTM, passed MSQT and manual tests

@PawelPlesniak PawelPlesniak merged commit 190b902 into develop Feb 16, 2026
4 checks passed
@PawelPlesniak PawelPlesniak deleted the wanyunSu/hostname-fix branch February 16, 2026 13:24
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.

[Bug]: Hostname resolution is gone

2 participants