Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instance does not return correct fqdn #3277

Open
gboutry opened this issue Oct 30, 2023 · 6 comments
Open

Instance does not return correct fqdn #3277

gboutry opened this issue Oct 30, 2023 · 6 comments
Labels
Milestone

Comments

@gboutry
Copy link

gboutry commented Oct 30, 2023

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.  hostname --long
     microstack
  3.  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 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:

#cloud-config
fqdn: microstack.multipass

But this is not desirable if an alternative solution is available

@gboutry gboutry added the bug label Oct 30, 2023
@townsend2010
Copy link
Collaborator

Hi @gboutry,

We will give this a think about whether there is a better way to do this. Thanks!

@townsend2010
Copy link
Collaborator

Oh, one thing that is a bit confusing to me is that you are using the qemu driver for Multipass, but you are referencing libvirt and how it is resolving the hostname. Could you please explain how libvirt is playing into this?

@gboutry
Copy link
Author

gboutry commented Nov 16, 2023

@townsend2010 of course.

The nova-compute service in Sunbeam is using Libvirt, which in turns uses QEMU (which in turn uses KVM).

@townsend2010
Copy link
Collaborator

Hi @gboutry,

Thanks for that info. Ah, so Sunbeam, libvirt, et. al. are running inside the Multipass instance in a nested environment, correct?

@gboutry
Copy link
Author

gboutry commented Nov 16, 2023

Yes,

We install sunbeam inside the multipass instance.

Libvirtd is running in a snap openstack-hypervisor installed on that multipass machine.

(Nova-compute is making libvirt calls to Libvirtd, but Nova-compute is inside the same snap)

@BenjaminGittins
Copy link

BenjaminGittins commented Jan 5, 2024

I have the same problem when installing MicroStack on Ubuntu.

I am following the instructions on:
https://microstack.run/#get-started

  1. Install Multipass
    sudo snap install multipass

  2. Get a fresh VM with Ubuntu 22.04 LTS
    multipass launch --name microstack --cpus 4 --memory 16G --disk 50G && multipass shell microstack

3.Install MicroStack
sudo snap install openstack

4.Prepare a machine
sunbeam prepare-node-script | bash -x && newgrp snap_daemon

  1. Bootstrap OpenStack
    sunbeam cluster bootstrap --accept-defaults

resulting in:

Error: Host FQDN and Hypervisor hostname perceived by libvirt are different, check hostname -fand/etc/hosts file

I'm not the first to experience this problem. The issue has persisted for at least ~2 months? :(

@townsend2010 townsend2010 added this to the 1.14.0 milestone Jan 5, 2024
@townsend2010 townsend2010 modified the milestones: 1.14.0, 1.15.0 May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants