Openstack single-node microstack deployment hanging on MicroK8s DNS

Asked by Brian

Hello, I am trying to create a single-node Openstack deployment where Openstack VMs are only accessible through localhost. I have been following: https://ubuntu.com/openstack/install

I am facing two problems when running the Cloud bootstrap command (sunbeam cluster bootstrap --accept-defaults)

Issue 1: If I use the default hostname, I get the error:

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

My host is on a network and is assigned a public ip address with the name hostname.x.y.z, I think this is causing the issues so I changed the hostname to match domain name: hostname.x.y.z and the script technically runs after this change. I am not sure if this is correct to do though.

Issue 2: Now the bootstrap script keeps running until "Deploying MicroK8s...". The script hangs because the MicroK8s DNS addon crashes repeatedly. In particular the calico-node pod errors with "CrashLoopBackoff"

Any help is greatly appreciated! Please let me know if there is any other information I can provide.

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
jhonmartin (jhonmartin61) said :
#1

It seems like you're encountering some issues with your single-node OpenStack deployment. Here are some steps to address the problems you mentioned:

Issue 1:

The error you're seeing about the host FQDN and hypervisor hostname being different can indeed be related to the hostname configuration. Changing your hostname to match the domain name (hostname.x.y.z) is a valid approach.
To ensure your hostname is correctly set, you can use the following commands:
arduino
Copy code
sudo hostnamectl set-hostname your-desired-hostname
sudo nano /etc/hosts
In the /etc/hosts file, make sure it contains an entry like:
Copy code
127.0.0.1 localhost your-desired-hostname
After making these changes, reboot your system.
Issue 2:

The "Deploying MicroK8s..." hang and the calico-node pod CrashLoopBackoff issue might be related to resource constraints or conflicts in your setup.
Ensure that your system meets the hardware and resource requirements for running OpenStack and MicroK8s.
Check if any other services or applications are conflicting with MicroK8s. Sometimes, running multiple network services can cause conflicts.
Review the logs and status of MicroK8s to get more details on what's causing the crash. You can use commands like:
https://raposofrpapk.com/

Revision history for this message
Brian (bsinger98) said (last edit ):
#2

Thank you for the help! It turned out that ufw was causing issues with the DNS. After reading the MicroK8s FAQs (https://microk8s.io/docs/troubleshooting) the following worked:

sudo ufw allow in on vxlan.calico && sudo ufw allow out on vxlan.calico
sudo ufw allow in on cali+ && sudo ufw allow out on cali+

Now, the instance builds but when running the step: "sunbeam launch ubuntu --name test" the command returns

Instance creation request failed: HttpException: 500: Server Error for url: http://10.20.21.10/openstack-nova/v2.1/images?name=ubuntu, Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and
attach the Nova API log if possible.
<class 'nova.exception.NotFound'>
Error: Unable to request new instance. Please run `sunbeam configure` first.

I followed the README and ran "sunbeam configure --accept-defaults --openrc demo-openrc" before the command. Where do I get the Nova API logs? They are not in the standard Openstack install location.

In addition, I ran "sunbeam inspect" to debug but it returns:
Retrieving charm logs for openstack model ... ERROR model sunbeam-controller:x.y.z/40bd3f33-76ac-4b6c-8f8f-a254e43a65b1 not found
Error: Command '['/snap/openstack/247/juju/bin/juju', 'debug-log', '--model', '40bd3f33-76ac-4b6c-8f8f-a254e43a65b1', '--replay', '--no-tail']' returned non-zero exit status 2.

Should I be using "sudo snap install openstack --channel 2023.1" or edge? Is that causing all of these issues?

Revision history for this message
Launchpad Janitor (janitor) said :
#5

This question was expired because it remained in the 'Open' state without activity for the last 15 days.