Microstack 初始化失败

Microstack 初始化失败

我正在尝试在 20.04.1 LTS (Focal Fossa) 上安装microstack。当我尝试时init,它失败并出现以下错误:

sudo microstack init --auto --control
2021-02-23 03:42:58,127 - microstack_init - INFO - Configuring clustering ...
2021-02-23 03:42:58,254 - microstack_init - INFO - Setting up as a control node.
2021-02-23 03:43:03,025 - microstack_init - INFO - Configuring networking ...
2021-02-23 03:43:10,238 - microstack_init - INFO - Opening horizon dashboard up to *
2021-02-23 03:43:11,968 - microstack_init - INFO - Waiting for RabbitMQ to start ...
Waiting for 10.0.2.15:5672
2021-02-23 03:43:12,562 - microstack_init - INFO - RabbitMQ started!
2021-02-23 03:43:12,562 - microstack_init - INFO - Configuring RabbitMQ ...
2021-02-23 03:43:14,159 - microstack_init - INFO - RabbitMQ Configured!
2021-02-23 03:43:14,190 - microstack_init - INFO - Waiting for MySQL server to start ...
Waiting for 10.0.2.15:3306
2021-02-23 03:43:15,194 - microstack_init - INFO - Mysql server started! Creating databases ...
2021-02-23 03:43:16,218 - microstack_init - INFO - Configuring Keystone Fernet Keys ...
2021-02-23 03:43:27,706 - microstack_init - INFO - Bootstrapping Keystone ...
2021-02-23 03:43:48,805 - microstack_init - INFO - Creating service project ...
Traceback (most recent call last):
  File "/snap/microstack/222/bin/microstack", line 11, in <module>
    load_entry_point('microstack==0.0.1', 'console_scripts', 'microstack')()
  File "/snap/microstack/222/lib/python3.8/site-packages/microstack/main.py", line 44, in main
    cmd()
  File "/snap/microstack/222/lib/python3.8/site-packages/init/main.py", line 58, in wrapper
    return func(*args, **kwargs)
  File "/snap/microstack/222/lib/python3.8/site-packages/init/main.py", line 206, in init
    question.ask()
  File "/snap/microstack/222/lib/python3.8/site-packages/init/questions/question.py", line 210, in ask
    self.yes(awr)
  File "/snap/microstack/222/lib/python3.8/site-packages/init/questions/__init__.py", line 435, in yes
    check('openstack', 'project', 'create', '--domain',
  File "/snap/microstack/222/lib/python3.8/site-packages/init/shell.py", line 69, in check
    raise subprocess.CalledProcessError(proc.returncode, " ".join(args))
subprocess.CalledProcessError: Command 'openstack project create --domain default --description Service Project service' returned non-zero exit status 1.

可能是什么原因?

答案1

我没有lxd安装,通过运行解决了:

sudo snap install lxd && sudo lxd init

此后,只需再次运行以下命令即可完成:

sudo microstack init

答案2

更新:我最终在机器上完全重新安装了 Ubuntu 20.04。我之前将它用作 k8s 节点,停止所有服务 + 使用 kubeadm reset 并没有解决 microstack 安装问题。

全新安装后,我在初始化过程中遇到了这个错误:

subprocess.CalledProcessError: 命令‘openstack network create test’返回非零退出状态 1。

并通过安装 python3-neutronclient 和重新运行 microstack init 解决了这个问题。

sudo apt 安装 python3-neutronclient

之后它终于完成了,没有任何错误!


我遇到了同样的问题,并按照这个答案经过京岳确保我的 Ubuntu 机器已完全更新:

按着这些次序:

  1. 尝试配置未配置的包:

    sudo dpkg --configure -a
    
  2. 更新存储库的内容

    sudo apt-get update
    
  3. 尝试修复缺少的依赖项:

    sudo apt-get -f install
    
  4. 使用可用的新版本更新所有软件包:

    sudo apt-get full-upgrade
    
  5. 重新安装 Ubuntu 桌面:

    sudo apt-get install --reinstall ubuntu-desktop
    
  6. 删除不需要的包:

    sudo apt-get autoremove
    
  7. 删除已下载安装的包:

    sudo apt-get clean
    
  8. 重新启动系统以查看问题是否已解决:

    sudo reboot
    

完成所有更新、升级、清理和重启后,我能够成功运行init您使用的相同命令。

相关内容