分享

新手需要指导

lz19851224 发表于 2016-5-17 16:57:45 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 2 6030
cinder --debug manage  block1@lvm abcb7477-b823-4acf-b4e4-4f832ef11d6e  --bootable --metadata key=123456  --name test

DEBUG:keystoneclient.session:REQ: curl -g -i -X GET http://controller:5000/v3 -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
DEBUG:keystoneclient.session:RESP: [200] Content-Length: 249 Vary: X-Auth-Token Keep-Alive: timeout=5, max=100 Server: Apache/2.4.6 (CentOS) mod_wsgi/3.4 Python/2.7.5 Connection: Keep-Alive Date: Tue, 17 May 2016 08:51:26 GMT Content-Type: application/json x-openstack-request-id: req-44a9eb3e-b8f7-4c5c-a88c-4a61375b6732
RESP BODY: {"version": {"status": "stable", "updated": "2015-03-30T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.4", "links": [{"href": "http://controller:5000/v3/", "rel": "self"}]}}

DEBUG:keystoneclient.auth.identity.v3.base:Making authentication request to http://controller:5000/v3/auth/tokens
DEBUG:keystoneclient.session:REQ: curl -g -i -X GET http://controller:8776/ -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
DEBUG:keystoneclient.session:RESP: [200] Date: Tue, 17 May 2016 08:51:26 GMT Content-Length: 292 Content-Type: application/json Connection: keep-alive
RESP BODY: {"versions": [{"status": "SUPPORTED", "updated": "2014-06-28T12:20:21Z", "id": "v1.0", "links": [{"href": "http://controller:8776/v1/", "rel": "self"}]}, {"status": "CURRENT", "updated": "2012-11-21T11:33:21Z", "id": "v2.0", "links": [{"href": "http://controller:8776/v2/", "rel": "self"}]}]}

DEBUG:keystoneclient.auth.identity.v3.base:Making authentication request to http://controller:5000/v3/auth/tokens
DEBUG:keystoneclient.session:REQ: curl -g -i -X POST http://controller:8776/v2/70befd77a4414bc48e0382fe740447a1/os-volume-manage -H "User-Agent: python-cinderclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}01016005aedec898b8df521d4e4fb8b1e4c1bee8" -d '{"volume": {"host": "block1@lvm", "name": "test", "availability_zone": null, "bootable": true, "metadata": {"key": "123456"}, "ref": {"source-name": "abcb7477-b823-4acf-b4e4-4f832ef11d6e"}, "volume_type": null, "description": null}}'
DEBUG:keystoneclient.session:RESP:
ERROR: Policy doesn't allow volume_extension:volume_manage to be performed. (HTTP 403) (Request-ID: req-6625b86e-d5f2-46f1-beac-053f034ce173)


已有(2)人评论

跳转到指定楼层
langke93 发表于 2016-5-17 21:43:54
重新生效下环境变量试试
source openrc admin admin


回复

使用道具 举报

lz19851224 发表于 2016-5-18 09:22:24
langke93 发表于 2016-5-17 21:43
重新生效下环境变量试试
source openrc admin admin

恩,更改环境变量就行了,但我管理完之后查看的时候状态是error,大小是0 root@controller ~]# cinder manage block1@lvm ebd1c575-c59e-439d-97d7-0af7f040eb10 --bootable --metadata key=12345 --name test+---------------------------------------+--------------------------------------+
|                Property               |                Value                 |
+---------------------------------------+--------------------------------------+
|              attachments              |                  []                  |
|           availability_zone           |                 nova                 |
|                bootable               |                 true                 |
|          consistencygroup_id          |                 None                 |
|               created_at              |      2016-05-18T01:19:58.000000      |
|              description              |                 None                 |
|               encrypted               |                False                 |
|                   id                  | cc69a513-6688-4f15-84de-1f0d09160aa7 |
|                metadata               |          {u'key': u'12345'}          |
|              multiattach              |                False                 |
|                  name                 |                 test                 |
|         os-vol-host-attr:host         |              block1@lvm              |
|     os-vol-mig-status-attr:migstat    |                 None                 |
|     os-vol-mig-status-attr:name_id    |                 None                 |
|      os-vol-tenant-attr:tenant_id     |   ee594337c40f470eb56228ae15587ac1   |
|   os-volume-replication:driver_data   |                 None                 |
| os-volume-replication:extended_status |                 None                 |
|           replication_status          |                 None                 |
|                  size                 |                  0                   |
|              snapshot_id              |                 None                 |
|              source_volid             |                 None                 |
|                 status                |               creating               |
|                user_id                |   1af76e7eb80a429e945c8a72f90547b4   |
|              volume_type              |                 None                 |
+---------------------------------------+--------------------------------------+
[root@controller ~]# cinder list
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
|                  ID                  |   Status  | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
| cc69a513-6688-4f15-84de-1f0d09160aa7 |   error   | test |  0   |      -      |   true   |             |
| ebd1c575-c59e-439d-97d7-0af7f040eb10 | available |  -   |  1   |      -      |  false   |             |



回复

使用道具 举报

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

本版积分规则

关闭

推荐上一条 /2 下一条