李成石

导航

 

结论: heat.conf中默认使用的domain和user,在keystone数据库中不存在,导致鉴权401失败,导致创建stack失败。

1.使用模板创建虚拟机

heat_template_version: 2018-09-04
description: Simple template to deploy a virtual machine.
resources:
   my_hello_vm: #资源名
      type: OS::Nova::Server # nova方法
      properties:
         image: cirros  #镜像名
         flavor: m1.small #flavor名
         networks:
            - network: testnet  #网络名

检查创建的stack失败

 检查engine日志,为keystone鉴权失败401:

查询keystone日志

不存在heat_domain_admin用户,在/etc/heat/heat.conf中配置,stack_domain_admin 的user 和stack_user_domain_name的domain,查询不存在。

 

使用命令创建 domain和user:

openstack domain create --description "Stack projects and users" heat_user_domain
openstack user create --domain heat_user_domain --password openstack  heat_domain_admin
openstack role add --domain heat_user_domain --user-domain heat_user_domain --user heat_domain_admin admin 

 创建完成后,重启heat-api和heat-engine服务,重新创建stack,创建成功,如下

posted on 2018-09-05 00:06  李成石  阅读(341)  评论(0编辑  收藏  举报