Initialise MicroStack Failed configuring Neutron

Bug #1950765 reported by Paul Sharpe
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MicroStack
Confirmed
Undecided
Unassigned

Bug Description

pjs:~/Work$ sudo microstack init --auto --control
2021-11-12 08:32:56,471 - microstack_init - INFO - Configuring clustering ...
2021-11-12 08:32:57,254 - microstack_init - INFO - Setting up as a control node.
2021-11-12 08:33:05,987 - microstack_init - INFO - Generating TLS Certificate and Key
2021-11-12 08:33:09,388 - microstack_init - INFO - Configuring networking ...
2021-11-12 08:33:35,272 - microstack_init - INFO - Opening horizon dashboard up to *
2021-11-12 08:33:37,952 - microstack_init - INFO - Waiting for RabbitMQ to start ...
Waiting for 192.168.0.14:5672
2021-11-12 08:33:54,989 - microstack_init - INFO - RabbitMQ started!
2021-11-12 08:33:54,990 - microstack_init - INFO - Configuring RabbitMQ ...
2021-11-12 08:33:58,120 - microstack_init - INFO - RabbitMQ Configured!
2021-11-12 08:33:58,263 - microstack_init - INFO - Waiting for MySQL server to start ...
Waiting for 192.168.0.14:3306
2021-11-12 08:35:54,630 - microstack_init - INFO - Mysql server started! Creating databases ...
2021-11-12 08:36:05,414 - microstack_init - INFO - Configuring Keystone Fernet Keys ...
2021-11-12 08:41:16,004 - microstack_init - INFO - Bootstrapping Keystone ...
2021-11-12 08:41:46,805 - microstack_init - INFO - Creating service project ...
2021-11-12 08:42:00,761 - microstack_init - INFO - Keystone configured!
2021-11-12 08:42:00,904 - microstack_init - INFO - Configuring the Placement service...
2021-11-12 08:42:51,128 - microstack_init - INFO - Running Placement DB migrations...
2021-11-12 08:43:26,121 - microstack_init - INFO - Configuring nova control plane services ...
2021-11-12 08:43:58,837 - microstack_init - INFO - Running Nova API DB migrations (this may take a lot of time)...
2021-11-12 08:47:04,229 - microstack_init - INFO - Running Nova DB migrations (this may take a lot of time)...
Waiting for 192.168.0.14:8774
2021-11-12 09:05:31,150 - microstack_init - INFO - Creating default flavors...
2021-11-12 09:06:34,762 - microstack_init - INFO - Configuring nova compute hypervisor ...
2021-11-12 09:06:34,762 - microstack_init - INFO - Checking virtualization extensions presence on the host
2021-11-12 09:06:34,975 - microstack_init - WARNING - /dev/kvm does not exist
2021-11-12 09:06:34,976 - microstack_init - WARNING - Hardware virtualization is not supported - software emulation will be used for Nova instances
2021-11-12 09:06:45,737 - microstack_init - INFO - Configuring the Spice HTML5 console service...
2021-11-12 09:06:48,059 - microstack_init - INFO - Configuring Neutron
Waiting for 192.168.0.14:9696
Traceback (most recent call last):
  File "/snap/microstack/241/bin/microstack", line 11, in <module>
    load_entry_point('microstack==0.0.1', 'console_scripts', 'microstack')()
  File "/snap/microstack/241/lib/python3.8/site-packages/microstack/main.py", line 44, in main
    cmd()
  File "/snap/microstack/241/lib/python3.8/site-packages/init/main.py", line 60, in wrapper
    return func(*args, **kwargs)
  File "/snap/microstack/241/lib/python3.8/site-packages/init/main.py", line 228, in init
    question.ask()
  File "/snap/microstack/241/lib/python3.8/site-packages/init/questions/question.py", line 210, in ask
    self.yes(awr)
  File "/snap/microstack/241/lib/python3.8/site-packages/init/questions/__init__.py", line 887, in yes
    check('openstack', 'network', 'create', 'test')
  File "/snap/microstack/241/lib/python3.8/site-packages/init/shell.py", line 69, in check
    raise subprocess.CalledProcessError(proc.returncode, " ".join(args))
subprocess.CalledProcessError: Command 'openstack network create test' returned non-zero exit status 1.

-=-=-=-=-=-=-=-=-=-=-=-=-
HP-Pavilion-14-Notebook-PC
Intel® Core™ i3-3217U CPU @ 1.80GHz × 4
Intel® HD Graphics 4000 (IVB GT2)
Disk: 500.1 GB
Ubuntu 20.04.3 LTS 64-bit Gnome: 3.36.8

pjs:~/Work$ sudo snap install microstack --beta --devmode
[sudo] password for pjs:
microstack (beta) ussuri from Canonical✓ installed

Changed in microstack:
status: New → Confirmed
Paul Sharpe (pjs3141)
description: updated
Revision history for this message
Paul Sharpe (pjs3141) wrote :
Download full text (3.3 KiB)

This might simply have been because my Ubuntu version did not by default include installation of the python tool, and Microstack did not check that it was available.

I have since installed python manually, and the init stage now completes successfully:

js:~$ sudo microstack init --auto --control
[sudo] password for pjs:
2021-11-15 16:59:40,844 - microstack_init - INFO - Configuring clustering ...
2021-11-15 16:59:41,355 - microstack_init - INFO - Setting up as a control node.
2021-11-15 16:59:49,774 - microstack_init - INFO - Generating TLS Certificate and Key
2021-11-15 16:59:53,708 - microstack_init - INFO - Configuring networking ...
2021-11-15 17:00:16,440 - microstack_init - INFO - Opening horizon dashboard up to *
2021-11-15 17:00:19,064 - microstack_init - INFO - Waiting for RabbitMQ to start ...
Waiting for 192.168.0.14:5672
2021-11-15 17:00:20,891 - microstack_init - INFO - RabbitMQ started!
2021-11-15 17:00:20,892 - microstack_init - INFO - Configuring RabbitMQ ...
2021-11-15 17:00:23,363 - microstack_init - INFO - RabbitMQ Configured!
2021-11-15 17:00:23,504 - microstack_init - INFO - Waiting for MySQL server to start ...
Waiting for 192.168.0.14:3306
2021-11-15 17:00:25,497 - microstack_init - INFO - Mysql server started! Creating databases ...
2021-11-15 17:00:30,740 - microstack_init - INFO - Configuring Keystone Fernet Keys ...
2021-11-15 17:00:48,404 - microstack_init - INFO - Bootstrapping Keystone ...
2021-11-15 17:00:54,906 - microstack_init - INFO - Creating service project ...
2021-11-15 17:01:00,991 - microstack_init - INFO - Keystone configured!
2021-11-15 17:01:01,137 - microstack_init - INFO - Configuring the Placement service...
2021-11-15 17:01:13,021 - microstack_init - INFO - Running Placement DB migrations...
2021-11-15 17:01:21,137 - microstack_init - INFO - Configuring nova control plane services ...
2021-11-15 17:01:27,266 - microstack_init - INFO - Running Nova API DB migrations (this may take a lot of time)...
2021-11-15 17:01:57,686 - microstack_init - INFO - Running Nova DB migrations (this may take a lot of time)...
Waiting for 192.168.0.14:8774
2021-11-15 17:02:34,263 - microstack_init - INFO - Creating default flavors...
2021-11-15 17:03:09,258 - microstack_init - INFO - Configuring nova compute hypervisor ...
2021-11-15 17:03:09,259 - microstack_init - INFO - Checking virtualization extensions presence on the host
2021-11-15 17:03:09,330 - microstack_init - WARNING - /dev/kvm does not exist
2021-11-15 17:03:09,330 - microstack_init - WARNING - Hardware virtualization is not supported - software emulation will be used for Nova instances
2021-11-15 17:03:19,205 - microstack_init - INFO - Configuring the Spice HTML5 console service...
2021-11-15 17:03:21,894 - microstack_init - INFO - Configuring Neutron
Waiting for 192.168.0.14:9696
2021-11-15 17:04:28,618 - microstack_init - INFO - Configuring Glance ...
Waiting for 192.168.0.14:9292
2021-11-15 17:05:06,479 - microstack_init - INFO - Creating security group rules ...
2021-11-15 17:05:19,444 - microstack_init - INFO - Configuring the Cinder services...
2021-11-15 17:06:39,812 - microstack_init - INFO - Running Cinder DB migrations...
2021-11-15 17:07:...

Read more...

Revision history for this message
Billy Olsen (billy-olsen) wrote :

Paul, which version of Ubuntu did you have installed? Additionally, which python package did you install to resolve this? It's not clear to me how this resolves it since python is included in the snap. Additionally, can you share information regarding how you installed microstack?

Revision history for this message
Paul Sharpe (pjs3141) wrote (last edit ):

From 'settings' this is
    Ubuntu 20.04.3 LTS
    64-bit
    Intel® Core™ i3-3217U CPU @ 1.80GHz × 4
or
pjs:~$ uname -a
Linux pjs-HP-Pavilion-14-Notebook-PC 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Apologies: it seems that it was the pythonpy launcher that I didn't have.

When I ran
    $ py --help
it showed no such command: when I then ran
    $ sudo apt install pythonpy
then the microstack init command seemed to succeed afterwards.

Now I have:

pjs:~$ python --version
Python 2.7.18

pjs:~$ py --version
/usr/bin/py:16: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
  from collections import Iterable
Pythonpy ???
Python 3.8.10

Revision history for this message
Larry Kopenkoskey (ljkopen) wrote :

While running:
sudo microstack init --auto --control

I had the same error:
raise subprocess.CalledProcessError(proc.returncode, " ".join(args))
subprocess.CalledProcessError: Command 'openstack network create test' returned non-zero exit status 1." failure.

This was ran following an install of ubuntu-20.04.3-live-server-amd64.iso w/ only the sshd service getting picked during install.

Post install we also had to:
sudo apt -y install openvswitch-switch-dpdk
To get around an different, earlier MicroStack init failure ( A possible solution was noted here; and it worked: https://stackoverflow.com/questions/61666481/microstack-does-not-start-command-snapctl-start-microstack-nginx-returned-non )

To resolve the Command 'openstack network create test' failure, we installed the python3-neutronclient via:
sudo apt install python3-neutronclient

I'm not familiar with snaps. Are openvswitch-switch-dpdk & python3-neutronclient part of the MicroStack snap. If not, would them being part of the snap resolve the errors generated?

Will any of the other python3 correlated OpenStack packages be needed? I see
python3-openstackclient python3-pymysql python3-oauth2client python3-novaclient
referenced in OpenStack installation documents.

Cheers!
Larry

Revision history for this message
Larry Kopenkoskey (ljkopen) wrote :

Just occurred to me that many python3 packages were installed when python3-neutron was installed... Any of them could be needed.

Here's the stack of things installed when python3-neutronclient was installed:
The following NEW packages will be installed:
  docutils-common ieee-data libimagequant0 libjbig0 libjpeg-turbo8 libjpeg8 liblcms2-2 libpaper-utils libpaper1
  libtiff5 libwebp6 libwebpdemux2 libwebpmux3 python-babel-localedata python3-appdirs python3-babel python3-bs4
  python3-cliff python3-cmd2 python3-dateutil python3-debtcollector python3-decorator python3-deprecation
  python3-docutils python3-dogpile.cache python3-html5lib python3-iso8601 python3-jmespath python3-keystoneauth1
  python3-keystoneclient python3-lxml python3-mako python3-monotonic python3-msgpack python3-munch python3-netaddr
  python3-neutronclient python3-olefile python3-openstacksdk python3-os-client-config python3-os-service-types
  python3-osc-lib python3-oslo.config python3-oslo.context python3-oslo.i18n python3-oslo.log
  python3-oslo.serialization python3-oslo.utils python3-packaging python3-pbr python3-pil python3-prettytable
  python3-pygments python3-pyinotify python3-pyparsing python3-pyperclip python3-requestsexceptions
  python3-rfc3986 python3-roman python3-soupsieve python3-stevedore python3-tz python3-wcwidth
  python3-webencodings python3-wrapt sgml-base xml-core

Revision history for this message
Tim Kahlke (timk0815) wrote :

I had the same problem (Ubuntu 20.04; microstack ussuri 245 latest/beta).

Tried the python3-neutron client option, didn't help.

After reading around I found that the "--devmode" is not recommended anymore. Removed microstack, re-installed without devmode, all good.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.