canonical / canonical/multipass
Instance does not return correct fqdn
- Dominant language
- C++
- Stars
- 9.2k
- Forks
- 828
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 44
Description
**Describe the bug**
Running `hostname --long` does not return the instance fqdn.
**To Reproduce**
My commands:
1. `multipass launch --name microstack --cpus 4 --memory 16G --disk 50G`
2. ```shell
hostname --long
microstack
```
3. ```shell
hostname -A
microstack.multipass
```
**Expected behavior**
I expect `hostname --long` to return the instance fqdn
**Logs**
Please provide logs from the daemon, see [accessing logs](https://multipass.run/docs/accessing-logs) on where to find them on your platform.
**Additional info**
- OS: Ubuntu 23.10
- multipass 1.12.2
multipassd 1.12.2
- Name: microstack
State: Running
IPv4: 10.137.160.124
Release: Ubuntu 22.04.3 LTS
Image hash: 054db2d88c45 (Ubuntu 22.04 LTS)
CPU(s): 4
Load: 0.00 0.02 0.00
Disk usage: 1.4GiB out of 48.4GiB
Memory usage: 198.6MiB out of 15.6GiB
Mounts: --
- `multipass get local.driver`
qemu
**Additional context**
We expose multipass to try sunbeam: https://microstack.run/
But the FQDN setup is not what libvirt is expecting. Libvirt will return `microstack` https://github.com/libvirt/libvirt/blob/a5bf2c4bf962cfb32f9137be5f0ba61cdd14b0e7/src/util/virutil.c#L406 .
This can be solved by using a cloud-init:
```yaml
#cloud-config
fqdn: microstack.multipass
```
But this is not desirable if an alternative solution is available
Contributor guide
Research direction
Start by reproducing the hostname behavior with the listed multipass launch command and compare `hostname --long` with `hostname -A`. Read the linked libvirt `virutil.c` reference and the cloud-init FQDN example to understand the expected naming behavior. Done means the running instance reports its FQDN without requiring an undesirable per-instance cloud-init override.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100