Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Microstack initialization problem #91

Open
dominiktopyla opened this issue Nov 9, 2021 · 4 comments
Open

Microstack initialization problem #91

dominiktopyla opened this issue Nov 9, 2021 · 4 comments

Comments

@dominiktopyla
Copy link

Summary

I have installed osm charmed and try to set K8s cluster (https://osm.etsi.org/docs/user-guide/15-k8s-installation.html#installation-method-2-local-development-environment ) and I need microstack, connect openstack.
I followed tutorial: https://microstack.run/docs/single-node
and faced errors during initailization

Process

sudo snap install microstack --devmode --beta
sudo microstack init --auto --control

Current and expected result

I expected successful initialization.

Screenshot

**dominik@dominik:$ sudo snap install microstack --devmode --beta
[sudo] password for dominik:
microstack (beta) ussuri from Canonical?? installed
dominik@dominik:
$ snap list microstack
Name Version Rev Tracking Publisher Notes
microstack ussuri 241 latest/beta canonical?? devmode
dominik@dominik:~$ sudo microstack init --auto --control
2021-11-09 22:49:28,819 - microstack_init - INFO - Configuring clustering ...
2021-11-09 22:49:29,105 - microstack_init - INFO - Setting up as a control node.
2021-11-09 22:49:34,510 - microstack_init - INFO - Generating TLS Certificate and Key
2021-11-09 22:49:36,329 - microstack_init - INFO - Configuring networking ...
2021-11-09 22:49:50,817 - microstack_init - INFO - Opening horizon dashboard up to *
2021-11-09 22:49:52,382 - microstack_init - INFO - Waiting for RabbitMQ to start ...
Waiting for 10.140.0.133:5672
2021-11-09 22:50:02,680 - microstack_init - INFO - RabbitMQ started!
2021-11-09 22:50:02,680 - microstack_init - INFO - Configuring RabbitMQ ...
2021-11-09 22:50:04,368 - microstack_init - INFO - RabbitMQ Configured!
2021-11-09 22:50:04,405 - microstack_init - INFO - Waiting for MySQL server to start ...
Waiting for 10.140.0.133:3306
2021-11-09 22:50:12,559 - microstack_init - INFO - Mysql server started! Creating databases ...
Traceback (most recent call last):
File "/snap/microstack/241/bin/microstack", line 11, in
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 476, in yes
enable('nginx')
File "/snap/microstack/241/lib/python3.8/site-packages/init/shell.py", line 162, in enable
check('snapctl', 'start', 'microstack.{}'.format(service), '--enable')
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 'snapctl start microstack.nginx --enable' returned non-zero exit status 1.

Browser details

[Optionally - if you can, copy the report generated by mybrowser.fyi - this might help us debug certain types of issues.]

@chris-asl
Copy link

@dominiktopyla this happens because charmed OSM (its ingress pointing to OSM NBI) uses the same port as microstack.nginx.

As a mitigation:
Before running the microstack init command you can configure MicroStack dashboard port via
sudo snap set microstack config.network.ports.dashboard="${SET_THIS_TO_A_PORT_OF_YOUR_CHOICE}"

@dominiktopyla
Copy link
Author

@chris-asl, I changed OSM version to 10 devops and run suggested command before microstack init but i have heroors during configuration networking.

sudo microstack.init --auto --control
2021-12-02 23:51:22,218 - microstack_init - INFO - Configuring clustering ...
2021-12-02 23:51:22,640 - microstack_init - INFO - Setting up as a control node.
2021-12-02 23:51:27,986 - microstack_init - INFO - Generating TLS Certificate and Key
2021-12-02 23:51:29,692 - microstack_init - INFO - Configuring networking ...
Traceback (most recent call last):
File "/snap/microstack/242/bin/microstack_init", line 11, in
load_entry_point('microstack-init==0.0.1', 'console_scripts', 'microstack_init')()
File "/snap/microstack/242/lib/python3.8/site-packages/init/main.py", line 60, in wrapper
return func(*args, **kwargs)
File "/snap/microstack/242/lib/python3.8/site-packages/init/main.py", line 228, in init
question.ask()
File "/snap/microstack/242/lib/python3.8/site-packages/init/questions/question.py", line 210, in ask
self.yes(awr)
File "/snap/microstack/242/lib/python3.8/site-packages/init/questions/init.py", line 208, in yes
enable('ovs-vswitchd')
File "/snap/microstack/242/lib/python3.8/site-packages/init/shell.py", line 162, in enable
check('snapctl', 'start', 'microstack.{}'.format(service), '--enable')
File "/snap/microstack/242/lib/python3.8/site-packages/init/shell.py", line 69, in check
raise subprocess.CalledProcessError(proc.returncode, " ".join(args))
subprocess.CalledProcessError: Command 'snapctl start microstack.ovs-vswitchd --enable' returned non-zero exit status 1.

@chris-asl
Copy link

I don't know how you did the cleanup for the previous MicroStack instance, but there might be some installation leftovers.
The cleanup to remove everything should be sudo snap remove --purge microstack.

Other than this, you can ask a more specific question here https://discourse.charmhub.io/

@epo35320
Copy link

Same problem :

eric@tpeg-int1:~$ snap list microstack
Name Version Rev Tracking Publisher Notes
microstack ussuri 245 latest/beta canonical✓ devmode

eric@tpeg-int1:~$ sudo microstack init --auto --control
[sudo] password for eric:
2022-06-21 19:27:32,930 - microstack_init - INFO - Configuring clustering ...
2022-06-21 19:27:33,151 - microstack_init - INFO - Setting up as a control node.
2022-06-21 19:27:36,455 - microstack_init - INFO - Generating TLS Certificate and Key
2022-06-21 19:27:37,949 - microstack_init - INFO - Configuring networking ...
2022-06-21 19:27:46,307 - microstack_init - INFO - Opening horizon dashboard up to *
2022-06-21 19:27:47,365 - microstack_init - INFO - Waiting for RabbitMQ to start ...
Waiting for 192.168.1.71:5672
2022-06-21 19:27:55,030 - microstack_init - INFO - RabbitMQ started!
2022-06-21 19:27:55,030 - microstack_init - INFO - Configuring RabbitMQ ...
2022-06-21 19:27:56,363 - microstack_init - INFO - RabbitMQ Configured!
2022-06-21 19:27:56,395 - microstack_init - INFO - Waiting for MySQL server to start ...
Waiting for 192.168.1.71:3306
2022-06-21 19:28:02,018 - microstack_init - INFO - Mysql server started! Creating databases ...
Traceback (most recent call last):
File "/snap/microstack/245/bin/microstack", line 11, in
load_entry_point('microstack==0.0.1', 'console_scripts', 'microstack')()
File "/snap/microstack/245/lib/python3.8/site-packages/microstack/main.py", line 44, in main
cmd()
File "/snap/microstack/245/lib/python3.8/site-packages/init/main.py", line 60, in wrapper
return func(*args, **kwargs)
File "/snap/microstack/245/lib/python3.8/site-packages/init/main.py", line 228, in init
question.ask()
File "/snap/microstack/245/lib/python3.8/site-packages/init/questions/question.py", line 210, in ask
self.yes(awr)
File "/snap/microstack/245/lib/python3.8/site-packages/init/questions/init.py", line 476, in yes
enable('nginx')
File "/snap/microstack/245/lib/python3.8/site-packages/init/shell.py", line 162, in enable
check('snapctl', 'start', 'microstack.{}'.format(service), '--enable')
File "/snap/microstack/245/lib/python3.8/site-packages/init/shell.py", line 69, in check
raise subprocess.CalledProcessError(proc.returncode, " ".join(args))
subprocess.CalledProcessError: Command 'snapctl start microstack.nginx --enable' returned non-zero exit status 1.

looking in logs :

eric@tpeg-int1:~$ journalctl -xe
juin 21 19:33:42 tpeg-int1 ovsdb-server[5210]: ovs|00040|ovsdb_jsonrpc_server|ERR|ptcp:6642:0.0.0.0: listen failed: Add

in use ports :

eric@tpeg-int1:~$ sudo netstat -lp --inet
[sudo] password for eric:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:ssh 0.0.0.0:* LISTEN 1202/sshd: /usr/sbi
tcp 0 0 0.0.0.0:6642 0.0.0.0:* LISTEN 5210/ovsdb-server
tcp 0 0 0.0.0.0:epmd 0.0.0.0:* LISTEN 6336/epmd
tcp 0 0 tpeg-int1:8443 0.0.0.0:* LISTEN 1793/lxd
tcp 0 0 0.0.0.0:11211 0.0.0.0:* LISTEN 1156/memcached
tcp 0 0 localhost:domain 0.0.0.0:* LISTEN 1082/systemd-resolv
tcp 0 0 0.0.0.0:16509 0.0.0.0:* LISTEN 1136/libvirtd
tcp 0 0 tpeg-int1:domain 0.0.0.0:* LISTEN 2264/dnsmasq
tcp 0 0 0.0.0.0:25672 0.0.0.0:* LISTEN 6444/beam.smp
udp 0 0 tpeg-int1:domain 0.0.0.0:* 2264/dnsmasq
udp 0 0 localhost:domain 0.0.0.0:* 1082/systemd-resolv
udp 0 0 0.0.0.0:bootps 0.0.0.0:* 2264/dnsmasq
udp 0 0 tpeg-int1:1053 0.0.0.0:* 2266/lxd
udp 0 0 0.0.0.0:8472 0.0.0.0:* -

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants