分享

错误:Invalid service catalog service: compute

分生i 发表于 2017-3-28 17:36:32 [显示全部楼层] 只看大图 回帖奖励 阅读模式 关闭右栏 12 30838
http://www.aboutyun.com/thread-14433-1-1.html看到这个说应该是keystone问题,但是日志里面

QQ图片20170328173156.png
QQ图片20170328173202.png
QQ图片20170328173207.png
QQ截图20170328173530.png

已有(12)人评论

跳转到指定楼层
easthome001 发表于 2017-3-28 17:53:12
哪个版本的,楼主列出来endpoint就可以看到是哪的问题了
回复

使用道具 举报

分生i 发表于 2017-3-28 17:58:06
easthome001 发表于 2017-3-28 17:53
哪个版本的,楼主列出来endpoint就可以看到是哪的问题了

L版本的 keystone endpoint-list
/usr/lib/python2.7/site-packages/keystoneclient/shell.py:64: DeprecationWarning: The keystone CLI is deprecated in favor of python-openstackclient. For a Python library, continue using python-keystoneclient.
  'python-keystoneclient.', DeprecationWarning)
WARNING: unsupported identity-api-version 3, falling back to 2.0
/usr/lib/python2.7/site-packages/keystoneclient/v2_0/client.py:145: DeprecationWarning: Constructing an instance of the keystoneclient.v2_0.client.Client class without a session is deprecated as of the 1.7.0 release and may be removed in the 2.0.0 release.
  'the 2.0.0 release.', DeprecationWarning)
/usr/lib/python2.7/site-packages/keystoneclient/v2_0/client.py:147: DeprecationWarning: Using the 'tenant_name' argument is deprecated in version '1.7.0' and will be removed in version '2.0.0', please use the 'project_name' argument instead
  super(Client, self).__init__(**kwargs)
/usr/lib/python2.7/site-packages/debtcollector/renames.py:43: DeprecationWarning: Using the 'tenant_id' argument is deprecated in version '1.7.0' and will be removed in version '2.0.0', please use the 'project_id' argument instead
  return f(*args, **kwargs)
/usr/lib/python2.7/site-packages/keystoneclient/httpclient.py:376: DeprecationWarning: Constructing an HTTPClient instance without using a session is deprecated as of the 1.7.0 release and may be removed in the 2.0.0 release.
  'the 2.0.0 release.', DeprecationWarning)
Authorization Failed: The resource could not be found. (HTTP 404) (Request-ID: req-302a7f45-c574-4ced-9630-1772eaf643c0)

回复

使用道具 举报

langke93 发表于 2017-3-28 18:04:04
分生i 发表于 2017-3-28 17:58
L版本的 keystone endpoint-list
/usr/lib/python2.7/site-packages/keystoneclient/shell.py:64: Depre ...

用这个命令
[mw_shl_code=bash,true]openstack endpoint list [/mw_shl_code]

回复

使用道具 举报

分生i 发表于 2017-3-28 18:05:49

帮忙看看谢谢拉
111.png
回复

使用道具 举报

langke93 发表于 2017-3-28 18:14:44
分生i 发表于 2017-3-28 18:05
帮忙看看谢谢拉

删除Nova和glance的 endpoint,然后重新添加。记得有三种endpoint
[mw_shl_code=bash,true]openstack endpoint-delete[/mw_shl_code]

回复

使用道具 举报

分生i 发表于 2017-3-28 18:28:31
langke93 发表于 2017-3-28 18:14
删除Nova和glance的 endpoint,然后重新添加。记得有三种endpoint
[mw_shl_code=bash,true]openstack en ...

删了创建不起来了 - -
我是个新手 谢谢了
222.png
回复

使用道具 举报

langke93 发表于 2017-3-28 19:55:45
分生i 发表于 2017-3-28 18:28
删了创建不起来了 - -
我是个新手 谢谢了

楼主参考的文档最好贴出来。
首先确保keystone安装是成功的。如果成功了,在验证endpoint。而endpoint需要创建服务实例和API endpoint
推荐参考:
openstack【Kilo】入门 【keystone篇】六:创建服务实例和 API endpoint
http://www.aboutyun.com/forum.php?mod=viewthread&tid=13082
可以根据上面,楼主找到L版对应的内容


回复

使用道具 举报

分生i 发表于 2017-3-29 10:07:55
langke93 发表于 2017-3-28 19:55
楼主参考的文档最好贴出来。
首先确保keystone安装是成功的。如果成功了,在验证endpoint。而endpoint需 ...

http://www.infocool.net/kb/OpenStack/201609/187078.html
嗯 我是按照这个文档安装的
回复

使用道具 举报

分生i 发表于 2017-3-29 10:11:53
langke93 发表于 2017-3-28 19:55
楼主参考的文档最好贴出来。
首先确保keystone安装是成功的。如果成功了,在验证endpoint。而endpoint需 ...

  • http://www.infocool.net/kb/OpenStack/201609/187078.html

  • 为keystone 建一个数据库

    $ mysql -u root -pCREATE DATABASE keystone;GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' \  IDENTIFIED BY 'KEYSTONE_DBPASS';GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' \  IDENTIFIED BY 'KEYSTONE_DBPASS';
  • 安装软件包

    # yum install openstack-keystone httpd mod_wsgi \  memcached python-memcached# systemctl enable memcached.service# systemctl start memcached.service
  • 配置 keystone

    注意:不同版本号的keystone,其默认配置可能会有所不同

    [DEFAULT]admin_token = ADMIN_TOKENverbose = True[database]connection = mysql://keystone:KEYSTONE_DBPASS@controller/keystone[memcache]servers = localhost:11211[token]provider = uuiddriver = memcache[revoke]driver = sql
  • 初始化数据库

    # su -s /bin/sh -c "keystone-manage db_sync" keystone
  • 配置HTTP服务器

    修改服务器名

    # vim /etc/httpd/conf/httpd.confServerName controller

    添加 keystone 的服务

    # vim /etc/httpd/conf.d/wsgi-keystone.confListen 5000Listen 35357<VirtualHost *:5000>    WSGIDaemonProcess keystone-public processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}    WSGIProcessGroup keystone-public    WSGIScriptAlias / /usr/bin/keystone-wsgi-public    WSGIApplicationGroup %{GLOBAL}    WSGIPassAuthorization On    <IfVersion >= 2.4>      ErrorLogFormat "%{cu}t %M"    </IfVersion>    ErrorLog /var/log/httpd/keystone-error.log    CustomLog /var/log/httpd/keystone-access.log combined    <Directory /usr/bin>        <IfVersion >= 2.4>            Require all granted        </IfVersion>        <IfVersion < 2.4>            Order allow,deny            Allow from all        </IfVersion>    </Directory></VirtualHost><VirtualHost *:35357>    WSGIDaemonProcess keystone-admin processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}    WSGIProcessGroup keystone-admin    WSGIScriptAlias / /usr/bin/keystone-wsgi-admin    WSGIApplicationGroup %{GLOBAL}    WSGIPassAuthorization On    <IfVersion >= 2.4>      ErrorLogFormat "%{cu}t %M"    </IfVersion>    ErrorLog /var/log/httpd/keystone-error.log    CustomLog /var/log/httpd/keystone-access.log combined    <Directory /usr/bin>        <IfVersion >= 2.4>            Require all granted        </IfVersion>        <IfVersion < 2.4>            Order allow,deny            Allow from all        </IfVersion>    </Directory></VirtualHost>
  • 启动HTTP服务器

    # systemctl enable httpd.service# systemctl start httpd.service
  • 验证

    [root@controller ~]# ss -ntl | grep -E "5000|35357"LISTEN     0      128         :::35357                   :::*                  LISTEN     0      128         :::5000                    :::*
4.3 注册服务实体及API
  • 配置环境变量

    [root@controller ~]# vim admin.rcexport OS_TOKEN=ADMIN_TOKENexport OS_URL=http://controller:35357/v3export OS_IDENTITY_API_VERSION=3[root@controller ~]# source admin.rc
  • 服务注册

    [root@controller ~]# openstack service create \   --name keystone --description "OpenStack Identity" identity+-------------+----------------------------------+| Field       | Value                            |+-------------+----------------------------------+| description | OpenStack Identity               || enabled     | True                             || id          | c9c8ca22d2a54c9fa1f3c77e1af7037d || name        | keystone                         || type        | identity                         |+-------------+----------------------------------+
  • API注册

    openstack为每一服务提供三种API,admin、public、internal

    [root@controller ~]# openstack endpoint create --region RegionOne \   identity public http://controller:5000/v2.0+--------------+----------------------------------+| Field        | Value                            |+--------------+----------------------------------+| enabled      | True                             || id           | 866c0c3f786c4f8c8c34d47c00ef2851 || interface    | public                           || region       | RegionOne                        || region_id    | RegionOne                        || service_id   | c9c8ca22d2a54c9fa1f3c77e1af7037d || service_name | keystone                         || service_type | identity                         || url          | http://controller:5000/v2.0      |+--------------+----------------------------------+[root@controller ~]# openstack endpoint create --region RegionOne \   identity internal http://controller:5000/v2.0+--------------+----------------------------------+| Field        | Value                            |+--------------+----------------------------------+| enabled      | True                             || id           | e6893e1876ac4eca9e0de360c8ee71cc || interface    | internal                         || region       | RegionOne                        || region_id    | RegionOne                        || service_id   | c9c8ca22d2a54c9fa1f3c77e1af7037d || service_name | keystone                         || service_type | identity                         || url          | http://controller:5000/v2.0      |+--------------+----------------------------------+[root@controller ~]# openstack endpoint create --region RegionOne \   identity admin http://controller:35357/v2.0+--------------+----------------------------------+| Field        | Value                            |+--------------+----------------------------------+| enabled      | True                             || id           | b16d1443007b4d0cb126a354ec70c0f5 || interface    | admin                            || region       | RegionOne                        || region_id    | RegionOne                        || service_id   | c9c8ca22d2a54c9fa1f3c77e1af7037d || service_name | keystone                         || service_type | identity                         || url          | http://controller:35357/v2.0     |+--------------+----------------------------------+

回复

使用道具 举报

12下一页
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条