Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Multiple IPs in hostname

Open Beginner friendly
#233 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
docker, shell, ubuntu

Research direction

Start by locating and reading set_hostname.sh, then reproduce the issue on the ubuntu-noble-24.04-nogui image using the listed Docker and network-interface steps. Verify that the script selects one IP address and that the resulting hostname no longer concatenates multiple addresses.

Written by the indexing model from the issue text.

Description

bug OS Images

Describe the bug
When a VM has multiple interfaces the hostname set merges all of those IPs together. This can be seen when you install docker. Docker create a VLAN on the VM which gives it another interface.

oxg98278@host-172-16-115-102172-17-0-1:~$ hostname
host-172-16-115-102172-17-0-1.nubes.stfc.ac.uk

To Reproduce
Steps to reproduce the behavior:

  1. Build VM with 'ubuntu-noble-24.04-nogui' image
  2. SSH into VM
  3. Install docker
  4. docker network list shows bridge network
  5. ip a shows docker0 interface
  6. hostname -I shows more than one IP address

Expected behavior
The set_hostname.sh script should select one IP address and create the hostname from that.

Screenshots

oxg98278@host-172-16-115-102:~$ docker network ls
NETWORK ID     NAME      DRIVER    SCOPE
5b677cf3c947   bridge    bridge    local
cfd8aef05e32   host      host      local
1ea70f3f0b89   none      null      local
oxg98278@host-172-16-115-102:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute 
       valid_lft forever preferred_lft forever
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether fa:ca:aa:14:99:34 brd ff:ff:ff:ff:ff:ff
    inet 172.16.115.102/24 metric 100 brd 172.16.115.255 scope global dynamic enp3s0
       valid_lft 86320sec preferred_lft 86320sec
    inet6 fe80::f8ca:aaff:fe14:9934/64 scope link 
       valid_lft forever preferred_lft forever
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 76:c9:82:10:82:46 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
oxg98278@host-172-16-115-102:~$ hostname -I
172.16.115.102 172.17.0.1 

Details (please complete the following information):

Additional context
Add any other context about the problem here.

Dominant language
Perl
Stars
0
Forks
3
Avg merge
1d 14h
Merged PRs (30d)
14

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from stfc/cloud-image-builders

All issues in stfc/cloud-image-builders

Similar issues

More Perl issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.