openstack-install:单元 postgresql 钩子失败 db-admin-relation-changed

openstack-install:单元 postgresql 钩子失败 db-admin-relation-changed

背景:我正在关注http://www.ubuntu.com/download/cloud/install-ubuntu-openstack我有一台 PM(16 核,48GB RAM),运行 7 台(最初为空)虚拟机,这些虚拟机是使用 virt-install 创建的。我使用 virt-install 创建了两个 NAT 网络:“私有”网络,所有 7 台虚拟机都连接到该网络,“公共”网络,只有 2 台虚拟机连接到该网络。PM 运行 MAAS 并仅在“私有”网络上提供 DHCP 和 DNS。(我选择名称“私有”和“公共”是因为我假设其中一个所需网络将用于执行 MAAS/openstack-y 操作,另一个将用于访问最终部署在最终将创建的(嵌套)虚拟机上的任何服务)。系统已登记并投入使用,因此,在 Ubuntu 程序的第 3 步结束时,我有 7 个节点,所有节点都标记为“就绪”。

问题:按照 Ubuntu 程序中的第 4 步,我运行openstack-install,提供 MAAS 密钥,将 MAAS 服务器指定为“私有”网络上的 PM 的 IP,大约 15 分钟后失败。

其他信息:openstack-install 的 TUI 的状态行显示“正在下载最新的 Landscape Autopilot 包...”;~root/.cloud-install/commands.log 的底部显示:

[ERROR • 06-30 13:23:40] • cloudinstall.multi_install • (multi_install.py, run_deployer, 770)]
   Problem deploying Landscape: {'status': 1, 'output': '2015-06-30 13:09:11 [DEBUG] deployer.cli: Using runtime GoEnvironment on maas\n2015-06-30 13:09:11 [INFO] deployer.cli: Starting deployment of landscape-dense-maas\n2015-06-30 13:09:11 [DEBUG] deployer.import: Getting charms...\n2015-06-30 13:09:11 [DEBUG] deployer.charm: Cache dir /root/.cloud-install/juju/.deployer-store-cache/cs_trusty_haproxy-4\n2015-06-30 13:09:11 [DEBUG] deployer.charm: Retrieving store charm cs:trusty/haproxy-4\n2015-06-30 13:09:11 [DEBUG] deployer.charm: Cache dir /root/.cloud-install/juju/.deployer-store-cache/cs_trusty_rabbitmq-server-26\n2015-06-30 13:09:11 [DEBUG] deployer.charm: Retrieving store charm cs:trusty/rabbitmq-server-26\n2015-06-30 13:09:11 [DEBUG] deployer.charm: Cache dir /root/.cloud-install/juju/.deployer-store-cache/cs_trusty_postgresql-15\n2015-06-30 13:09:11 [DEBUG] deployer.charm: Retrieving store charm cs:trusty/postgresql-15\n2015-06-30 13:09:12 [DEBUG] deployer.charm: Cache dir /root/.cloud-install/juju/.deployer-store-cache/cs_trusty_landscape-server\n2015-06-30 13:09:12 [DEBUG] deployer.charm: Retrieving store charm cs:trusty/landscape-server-10\n2015-06-30 13:09:12 [DEBUG] deployer.charm: Cache dir /root/.cloud-install/juju/.deployer-store-cache/cs_trusty_landscape-server\n2015-06-30 13:09:12 [DEBUG] deployer.charm: Cache dir /root/.cloud-install/juju/.deployer-store-cache/cs_trusty_apache2-10\n2015-06-30 13:09:12 [DEBUG] deployer.charm: Retrieving store charm cs:trusty/apache2-10\n2015-06-30 13:09:12 [DEBUG] deployer.deploy: Resolving configuration\n2015-06-30 13:09:12 [DEBUG] deployer.env: Connecting to environment...\n2015-06-30 13:09:13 [DEBUG] deployer.env: Connected to environment\n2015-06-30 13:09:13 [INFO] deployer.import: Deploying services...\n2015-06-30 13:09:13 [DEBUG] deployer.import: <deployer.env.go.GoEnvironment object at 0x7f20266b4c50>\n2015-06-30 13:09:13 [INFO] deployer.import:  Deploying service apache2 using cs:trusty/apache2-10\n2015-06-30 13:09:13 [DEBUG] deployer.import:  Refetching status for placement deploys\n2015-06-30 13:09:24 [DEBUG] deployer.import:  Setting annotations\n2015-06-30 13:09:25 [INFO] deployer.import:  Deploying service haproxy using cs:trusty/haproxy-4\n2015-06-30 13:09:32 [DEBUG] deployer.import:  Setting annotations\n2015-06-30 13:09:32 [INFO] deployer.import:  Deploying service landscape using cs:trusty/landscape-server\n2015-06-30 13:09:40 [DEBUG] deployer.import:  Setting annotations\n2015-06-30 13:09:41 [INFO] deployer.import:  Deploying service landscape-msg using cs:trusty/landscape-server\n2015-06-30 13:09:45 [DEBUG] deployer.import:  Setting annotations\n2015-06-30 13:09:46 [INFO] deployer.import:  Deploying service postgresql using cs:trusty/postgresql-15\n2015-06-30 13:09:53 [DEBUG] deployer.import:  Setting annotations\n2015-06-30 13:09:53 [INFO] deployer.import:  Deploying service rabbitmq-server using cs:trusty/rabbitmq-server-26\n2015-06-30 13:09:59 [DEBUG] deployer.import:  Setting annotations\n2015-06-30 13:10:05 [DEBUG] deployer.import: Adding units...\n2015-06-30 13:10:05 [DEBUG] deployer.import:  Service \'apache2\' does not need any more units added.\n2015-06-30 13:10:05 [DEBUG] deployer.import:  Service \'haproxy\' does not need any more units added.\n2015-06-30 13:10:05 [DEBUG] deployer.import:  Service \'landscape\' does not need any more units added.\n2015-06-30 13:10:05 [DEBUG] deployer.import:  Service \'landscape-msg\' does not need any more units added.\n2015-06-30 13:10:05 [DEBUG] deployer.import:  Service \'postgresql\' does not need any more units added.\n2015-06-30 13:10:05 [DEBUG] deployer.import:  Service \'rabbitmq-server\' does not need any more units added.\n2015-06-30 13:10:05 [DEBUG] deployer.import: Waiting for units before adding relations\n2015-06-30 13:11:51 [DEBUG] deployer.env:  Delta machine: 0/lxc/0 change:pending\n2015-06-30 13:12:01 [DEBUG] deployer.env:  Delta machine: 0/lxc/1 change:pending\n2015-06-30 13:12:16 [DEBUG] deployer.env:  Delta machine: 0/lxc/2 change:pending\n2015-06-30 13:12:16 [DEBUG] deployer.env:  Delta machine: 0/lxc/0 change:started\n2015-06-30 13:12:16 [DEBUG] deployer.env:  Delta unit: apache2/0 change:pending\n2015-06-30 13:12:21 [DEBUG] deployer.env:  Delta service: apache2 change:{u\'Err\': None, u\'Since\': u\'2015-06-30T11:12:16Z\', u\'Current\': u\'maintenance\', u\'Version\': u\'\', u\'Message\': u\'installing charm software\', u\'Data\': {}}\n2015-06-30 13:12:21 [DEBUG] deployer.env:  Delta unit: apache2/0 change:pending\n2015-06-30 13:12:26 [DEBUG] deployer.env:  Delta machine: 0/lxc/3 change:pending\n2015-06-30 13:12:26 [DEBUG] deployer.env:  Delta unit: apache2/0 change:pending\n2015-06-30 13:12:46 [DEBUG] deployer.env:  Delta machine: 0/lxc/4 change:pending\n2015-06-30 13:12:51 [DEBUG] deployer.env:  Delta machine: 0/lxc/2 change:pending\n2015-06-30 13:12:51 [DEBUG] deployer.env:  Delta machine: 0/lxc/1 change:started\n2015-06-30 13:12:51 [DEBUG] deployer.env:  Delta machine: 0/lxc/2 change:started\n2015-06-30 13:12:51 [DEBUG] deployer.env:  Delta unit: landscape/0 change:pending\n2015-06-30 13:12:51 [DEBUG] deployer.env:  Delta unit: haproxy/0 change:pending\n2015-06-30 13:12:51 [DEBUG] deployer.env:  Delta service: landscape change:{u\'Err\': None, u\'Since\': u\'2015-06-30T11:12:49Z\', u\'Current\': u\'maintenance\', u\'Version\': u\'\', u\'Message\': u\'installing charm software\', u\'Data\': {}}\n2015-06-30 13:12:51 [DEBUG] deployer.env:  Delta unit: landscape/0 change:pending\n2015-06-30 13:12:51 [DEBUG] deployer.env:  Delta service: haproxy change:{u\'Err\': None, u\'Since\': u\'2015-06-30T11:12:49Z\', u\'Current\': u\'maintenance\', u\'Version\': u\'\', u\'Message\': u\'installing charm software\', u\'Data\': {}}\n2015-06-30 13:12:51 [DEBUG] deployer.env:  Delta unit: haproxy/0 change:pending\n2015-06-30 13:12:51 [DEBUG] deployer.env:  Delta unit: landscape/0 change:pending\n2015-06-30 13:12:51 [DEBUG] deployer.env:  Delta unit: haproxy/0 change:pending\n2015-06-30 13:13:01 [DEBUG] deployer.env:  Delta machine: 0/lxc/5 change:pending\n2015-06-30 13:13:21 [DEBUG] deployer.env:  Delta machine: 0/lxc/3 change:pending\n2015-06-30 13:13:21 [DEBUG] deployer.env:  Delta machine: 0/lxc/4 change:pending\n2015-06-30 13:13:21 [DEBUG] deployer.env:  Delta machine: 0/lxc/3 change:started\n2015-06-30 13:13:21 [DEBUG] deployer.env:  Delta unit: landscape-msg/0 change:pending\n2015-06-30 13:13:26 [DEBUG] deployer.env:  Delta machine: 0/lxc/4 change:started\n2015-06-30 13:13:26 [DEBUG] deployer.env:  Delta unit: landscape-msg/0 change:pending\n2015-06-30 13:13:26 [DEBUG] deployer.env:  Delta unit: postgresql/0 change:pending\n2015-06-30 13:13:26 [DEBUG] deployer.env:  Delta service: landscape-msg change:{u\'Err\': None, u\'Since\': u\'2015-06-30T11:13:24Z\', u\'Current\': u\'maintenance\', u\'Version\': u\'\', u\'Message\': u\'installing charm software\', u\'Data\': {}}\n2015-06-30 13:13:26 [DEBUG] deployer.env:  Delta unit: landscape-msg/0 change:pending\n2015-06-30 13:13:26 [DEBUG] deployer.env:  Delta service: postgresql change:{u\'Err\': None, u\'Since\': u\'2015-06-30T11:13:24Z\', u\'Current\': u\'maintenance\', u\'Version\': u\'\', u\'Message\': u\'installing charm software\', u\'Data\': {}}\n2015-06-30 13:13:26 [DEBUG] deployer.env:  Delta unit: postgresql/0 change:pending\n2015-06-30 13:13:26 [DEBUG] deployer.env:  Delta unit: landscape-msg/0 change:pending\n2015-06-30 13:13:26 [DEBUG] deployer.env:  Delta unit: postgresql/0 change:pending\n2015-06-30 13:13:36 [DEBUG] deployer.env:  Delta machine: 0/lxc/5 change:pending\n2015-06-30 13:13:36 [DEBUG] deployer.env:  Delta unit: haproxy/0 change:pending\n2015-06-30 13:13:36 [DEBUG] deployer.env:  Delta machine: 0/lxc/5 change:started\n2015-06-30 13:13:36 [DEBUG] deployer.env:  Delta unit: rabbitmq-server/0 change:pending\n2015-06-30 13:13:41 [DEBUG] deployer.env:  Delta unit: rabbitmq-server/0 change:pending\n2015-06-30 13:13:46 [DEBUG] deployer.env:  Delta service: rabbitmq-server change:{u\'Err\': None, u\'Since\': u\'2015-06-30T11:13:41Z\', u\'Current\': u\'maintenance\', u\'Version\': u\'\', u\'Message\': u\'installing charm software\', u\'Data\': {}}\n2015-06-30 13:13:46 [DEBUG] deployer.env:  Delta unit: rabbitmq-server/0 change:pending\n2015-06-30 13:13:46 [DEBUG] deployer.env:  Delta unit: rabbitmq-server/0 change:pending\n2015-06-30 13:13:51 [DEBUG] deployer.env:  Delta service: haproxy change:{u\'Err\': None, u\'Since\': u\'2015-06-30T11:13:49Z\', u\'Current\': u\'unknown\', u\'Version\': u\'\', u\'Message\': u\'\', u\'Data\': {}}\n2015-06-30 13:13:51 [DEBUG] deployer.env:  Delta unit: haproxy/0 change:pending\n2015-06-30 13:13:51 [DEBUG] deployer.env:  Delta unit: haproxy/0 change:started\n2015-06-30 13:13:56 [DEBUG] deployer.env:  Delta unit: haproxy/0 change:started\n2015-06-30 13:14:06 [DEBUG] deployer.env:  Delta unit: apache2/0 change:pending\n2015-06-30 13:14:11 [DEBUG] deployer.env:  Delta unit: apache2/0 change:pending\n2015-06-30 13:14:21 [DEBUG] deployer.env:  Delta service: apache2 change:{u\'Err\': None, u\'Since\': u\'2015-06-30T11:14:20Z\', u\'Current\': u\'unknown\', u\'Version\': u\'\', u\'Message\': u\'\', u\'Data\': {}}\n2015-06-30 13:14:21 [DEBUG] deployer.env:  Delta unit: apache2/0 change:pending\n2015-06-30 13:14:21 [DEBUG] deployer.env:  Delta unit: apache2/0 change:started\n2015-06-30 13:14:26 [DEBUG] deployer.env:  Delta unit: apache2/0 change:started\n2015-06-30 13:14:46 [DEBUG] deployer.env:  Delta unit: postgresql/0 change:pending\n2015-06-30 13:14:46 [DEBUG] deployer.env:  Delta unit: postgresql/0 change:pending\n2015-06-30 13:14:51 [DEBUG] deployer.env:  Delta unit: postgresql/0 change:pending\n2015-06-30 13:14:56 [DEBUG] deployer.env:  Delta service: postgresql change:{u\'Err\': None, u\'Since\': u\'2015-06-30T11:14:51Z\', u\'Current\': u\'unknown\', u\'Version\': u\'\', u\'Message\': u\'\', u\'Data\': {}}\n2015-06-30 13:14:56 [DEBUG] deployer.env:  Delta unit: postgresql/0 change:started\n2015-06-30 13:14:56 [DEBUG] deployer.env:  Delta unit: postgresql/0 change:started\n2015-06-30 13:15:21 [DEBUG] deployer.env:  Delta unit: rabbitmq-server/0 change:pending\n2015-06-30 13:16:46 [DEBUG] deployer.env:  Delta unit: rabbitmq-server/0 change:pending\n2015-06-30 13:16:46 [DEBUG] deployer.env:  Delta service: rabbitmq-server change:{u\'Err\': None, u\'Since\': u\'2015-06-30T11:16:45Z\', u\'Current\': u\'unknown\', u\'Version\': u\'\', u\'Message\': u\'\', u\'Data\': {}}\n2015-06-30 13:16:46 [DEBUG] deployer.env:  Delta unit: rabbitmq-server/0 change:pending\n2015-06-30 13:16:46 [DEBUG] deployer.env:  Delta unit: rabbitmq-server/0 change:started\n2015-06-30 13:16:51 [DEBUG] deployer.env:  Delta unit: rabbitmq-server/0 change:started\n2015-06-30 13:20:26 [DEBUG] deployer.env:  Delta unit: landscape-msg/0 change:pending\n2015-06-30 13:20:31 [DEBUG] deployer.env:  Delta service: landscape-msg change:{u\'Err\': None, u\'Since\': u\'2015-06-30T11:20:29Z\', u\'Current\': u\'unknown\', u\'Version\': u\'\', u\'Message\': u\'\', u\'Data\': {}}\n2015-06-30 13:20:31 [DEBUG] deployer.env:  Delta unit: landscape-msg/0 change:pending\n2015-06-30 13:20:31 [DEBUG] deployer.env:  Delta unit: landscape-msg/0 change:started\n2015-06-30 13:20:31 [DEBUG] deployer.env:  Delta unit: landscape/0 change:pending\n2015-06-30 13:20:36 [DEBUG] deployer.env:  Delta unit: landscape-msg/0 change:started\n2015-06-30 13:20:36 [DEBUG] deployer.env:  Delta service: landscape change:{u\'Err\': None, u\'Since\': u\'2015-06-30T11:20:34Z\', u\'Current\': u\'unknown\', u\'Version\': u\'\', u\'Message\': u\'\', u\'Data\': {}}\n2015-06-30 13:20:36 [DEBUG] deployer.env:  Delta unit: landscape/0 change:started\n2015-06-30 13:20:36 [DEBUG] deployer.env: Connecting to environment...\n2015-06-30 13:20:37 [DEBUG] deployer.env: Connected to environment\n2015-06-30 13:20:37 [INFO] deployer.import: Adding relations...\n2015-06-30 13:20:37 [INFO] deployer.import:  Adding relation landscape <-> rabbitmq-server\n2015-06-30 13:20:37 [INFO] deployer.import:  Adding relation landscape <-> haproxy\n2015-06-30 13:20:38 [INFO] deployer.import:  Adding relation landscape:vhost-config <-> apache2:vhost-config\n2015-06-30 13:20:38 [INFO] deployer.import:  Adding relation landscape:db-admin <-> postgresql:db-admin\n2015-06-30 13:20:38 [INFO] deployer.import:  Adding relation haproxy:website <-> apache2:reverseproxy\n2015-06-30 13:20:39 [INFO] deployer.import:  Adding relation landscape-msg <-> rabbitmq-server\n2015-06-30 13:20:39 [INFO] deployer.import:  Adding relation landscape-msg <-> haproxy\n2015-06-30 13:20:40 [INFO] deployer.import:  Adding relation landscape-msg:db-admin <-> postgresql:db-admin\n2015-06-30 13:20:40 [DEBUG] deployer.import: Waiting for relation convergence 180s\n2015-06-30 13:23:40 [ERROR] deployer.env: The following units had errors:\n   unit: postgresql/0: machine: 0/lxc/4 agent-state: error details: hook failed: "db-admin-relation-changed"\n2015-06-30 13:23:40 [INFO] deployer.cli: Deployment stopped. run time: 869.59\n'}
[DEBUG • 06-30 13:23:40] • cloudinstall.utils • (utils.py, global_exchandler, 63)]
   Traceback (most recent call last):
  File "/usr/share/openstack/cloudinstall/utils.py", line 78, in run
    super().run()
  File "/usr/lib/python3.4/threading.py", line 868, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/share/openstack/cloudinstall/machinewait.py", line 127, in do_continue
    self.installer.do_install()
  File "/usr/share/openstack/cloudinstall/multi_install.py", line 177, in do_install
    self.loop).run()
  File "/usr/share/openstack/cloudinstall/multi_install.py", line 708, in run
    self.deploy_landscape()
  File "/usr/share/openstack/cloudinstall/multi_install.py", line 731, in deploy_landscape
    self.run_deployer()
  File "/usr/share/openstack/cloudinstall/multi_install.py", line 771, in run_deployer
    raise Exception("Error deploying Landscape.")
Exception: Error deploying Landscape.

[INFO  • 06-30 13:24:50] • cloudinstall.utils • (utils.py, cleanup, 91)]
   Cleanup, saving latest config object.
[DEBUG • 06-30 13:24:50] • cloudinstall.utils • (utils.py, cleanup, 97)]
   Attempting to reset the terminal

(完整日志位于http://pastebin.com/raw.php?i=Nr1qy50j

我注意到 MAAS 在发生此错误之前的相当长一段时间内将一个节点标记为“已部署”,并且该节点已打开电源;其他节点保持“就绪”状态并已关闭电源。

救命!:我在谷歌上搜索了很多次,找到了很多关于 juju 和其他东西的参考资料,我希望不必这么快就熟悉它们,但没有找到适合这个特定错误的好东西。有什么想法吗?谢谢!

答案1

确保您已在 MAAS UI 中设置了电源管理,以便 MAAS 知道如何打开/关闭虚拟机。有关更多信息,请参阅此处:如何配置 MAAS 以便能够启动虚拟机

我看到的另一个问题是,您似乎以 root 身份运行安装程序。根据我们的文档,您需要以普通非 root 用户身份运行安装程序。有关运行安装程序的更多信息,请参见此处:http://ubuntu-cloud-installer.readthedocs.org/en/latest/multi-installer.guide.html

如果您已完成这两项操作,请将完整的commands.log粘贴到粘贴箱中。

相关内容