使用./stack.sh安装devtsack会在devstack@etcd.service失败

时间:2018-04-26 14:09:41

标签: openstack devstack etcd

我试图使用./stack.sh在Ubuntu 16.04 VM上运行devstack

+lib/etcd3:start_etcd3:61                  sudo systemctl daemon-reload
+lib/etcd3:start_etcd3:62                  sudo systemctl enable devstack@etcd.service
Created symlink from /etc/systemd/system/multi-user.target.wants/devstack@etcd.service to 
/etc/systemd/system/devstack@etcd.service.
+lib/etcd3:start_etcd3:63                  sudo systemctl start devstack@etcd.service
Job for devstack@etcd.service failed because the control process exited with error code. See "systemctl status 
devstack@etcd.service" and "journalctl -xe" for details.
+lib/etcd3:start_etcd3:1                   exit_trap
+./stack.sh:exit_trap:515                  local r=1  
++./stack.sh:exit_trap:516                  jobs -p
+./stack.sh:exit_trap:516                  jobs=
+./stack.sh:exit_trap:519                  [[ -n '' ]]
+./stack.sh:exit_trap:525                  '[' -f /tmp/tmp.0IwC5vOcG5 ']'
+./stack.sh:exit_trap:526                  rm /tmp/tmp.0IwC5vOcG5
+./stack.sh:exit_trap:530                  kill_spinner
+./stack.sh:kill_spinner:425               '[' '!' -z '' ']'
+./stack.sh:exit_trap:532                  [[ 1 -ne 0 ]]
+./stack.sh:exit_trap:533                  echo 'Error on exit'
Error on exit
+./stack.sh:exit_trap:535                  type -p generate-subunit
+./stack.sh:exit_trap:536                  generate-subunit 1524706916 269 fail
+./stack.sh:exit_trap:538                  [[ -z /opt/stack/logs ]]
+./stack.sh:exit_trap:541                  /opt/stack/devstack/tools/worlddump.py -d /opt/stack/logs
World dumping... see /opt/stack/logs/worlddump-2018-04-26-014626.txt for details
+./stack.sh:exit_trap:550                  exit 1

当我运行命令sudo systemctl status devstack@etcd.service时:

stack@openstack-demo-vm:/opt/stack/devstack$ sudo systemctl status devstack@etcd.service
● devstack@etcd.service - Devstack devstack@etcd.service
Loaded: loaded (/etc/systemd/system/devstack@etcd.service; enabled; vendor preset: enabled)
Active: inactive (dead) (Result: exit-code) since Thu 2018-04-26 01:46:27 UTC; 1min 27s ago
Process: 122376 ExecStart=/opt/stack/bin/etcd --name openstack-demo-vm --data-dir /opt/stack/data/etcd --initial- 
cluster-state new --initial-cluster-token etcd-cluster-01 --initial-cluster openst
 Main PID: 122376 (code=exited, status=1/FAILURE)

Apr 26 01:46:26 openstack-demo-vm systemd[1]: devstack@etcd.service: Main process exited, code=exited, status=1/FAILURE
Apr 26 01:46:26 openstack-demo-vm systemd[1]: Failed to start Devstack devstack@etcd.service.
Apr 26 01:46:26 openstack-demo-vm systemd[1]: devstack@etcd.service: Unit entered failed state. 
Apr 26 01:46:26 openstack-demo-vm systemd[1]: devstack@etcd.service: Failed with result 'exit-code'.
Apr 26 01:46:27 openstack-demo-vm systemd[1]: devstack@etcd.service: Service hold-off time over, scheduling restart.
Apr 26 01:46:27 openstack-demo-vm systemd[1]: Stopped Devstack devstack@etcd.service.
Apr 26 01:46:27 openstack-demo-vm systemd[1]: devstack@etcd.service: Start request repeated too quickly.
Apr 26 01:46:27 openstack-demo-vm systemd[1]: Failed to start Devstack devstack@etcd.service.
lines 1-14/14 (END)

在VM上运行etcd时:

stack@openstack-demo-vm:/opt/stack/devstack$ systemctl status etcd
● etcd.service - etcd - highly-available key value store
Loaded: loaded (/lib/systemd/system/etcd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2018-04-26 00:12:18 UTC; 1h 58min ago
 Docs: https://github.com/coreos/etcd
       man:etcd
Main PID: 4425 (etcd)
Tasks: 9
Memory: 9.3M
  CPU: 22.020s
CGroup: /system.slice/etcd.service
       └─4425 /usr/bin/etcd

我缺少什么?

2 个答案:

答案 0 :(得分:1)

在一些研究人员询问Openstack论坛和devstack时,禁用etcd' in stack.sh'有助于解决这个问题。

步骤:

  1. 编辑文件/opt/stack/devstack/stach.sh
  2. 评论以下行(您将在1035行左右找到它们)

    # Start Services # ============== # Dstat # ----- # A better kind of sysstat, with the top process per time slice #start_dstat # Etcd # ----- # etcd is a distributed key value store that provides a reliable way to store data across a cluster of machines #if is_service_enabled etcd3; then # start_etcd3 #fi

  3. 保存上述文件。

  4. 运行./unstack.sh
  5. 运行./stack.sh

答案 1 :(得分:0)

好吧,您只需在local.conf中添加以下内容:

disable_service etcd3

然后运行stack.sh