Guest User

Untitled

a guest
Apr 12th, 2013
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.12 KB | None | 0 0
  1. nova --debug secgroup-add-rule default icmp -1 -1 0.0.0.0/0 | grep REQ
  2.  
  3. REQ: curl -i http://controller:5000/v2.0/tokens -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-novaclient" -d '{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "admin"}}}'
  4.  
  5. RESP:{'date': 'Fri, 12 Apr 2013 22:51:33 GMT', 'vary': 'X-Auth-Token', 'content-length': '1821', 'status': '200', 'content-type': 'application/json'} {"access": {"token": {"expires": "2013-04-13T22:51:33Z", "id": "513c4e0f3eae4da29a3ecca9d6e6d5db", "tenant": {"enabled": true, "description": null, "name": "admin", "id": "411150290c394fa7b7f9d965b6336b4a"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://172.16.42.164:8776/v1/411150290c394fa7b7f9d965b6336b4a", "region": "RegionOne", "internalURL": "http://172.16.42.164:8776/v1/411150290c394fa7b7f9d965b6336b4a", "id": "a0852fbe8315412a880712cb15e51dd3", "publicURL": "http://172.16.42.164:8776/v1/411150290c394fa7b7f9d965b6336b4a"}], "endpoints_links": [], "type": "volume", "name": "volume"}, {"endpoints": [{"adminURL": "http://172.16.42.164:9292/v1", "region": "RegionOne", "internalURL": "http://172.16.42.164:9292/v1", "id": "5e0c804d83ca4760a610cf6aa2d97c70", "publicURL": "http://172.16.42.164:9292/v1"}], "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://172.16.42.164:8774/v2/411150290c394fa7b7f9d965b6336b4a", "region": "RegionOne", "internalURL": "http://172.16.42.164:8774/v2/411150290c394fa7b7f9d965b6336b4a", "id": "6a212e479b714101b06225d524c10b72", "publicURL": "http://172.16.42.164:8774/v2/411150290c394fa7b7f9d965b6336b4a"}], "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://172.16.42.164:35357/v2.0", "region": "RegionOne", "internalURL": "http://172.16.42.164:5000/v2.0", "id": "5a33a14fff204f69bc10ae77008a2842", "publicURL": "http://172.16.42.164:5000/v2.0"}], "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": "admin", "roles_links": [], "id": "97dd9a9e99c5455da22e2b14a1b87333", "roles": [{"name": "admin"}, {"name": "user"}], "name": "admin"}, "metadata": {"is_admin": 0, "roles": ["a0e3c7978d014314b1a75b9fd9d95be9", "bae857cbbdf44ed3a30f2dceaebb9aef"]}}}
  6.  
  7.  
  8. REQ: curl -i http://172.16.42.164:8774/v2/411150290c394fa7b7f9d965b6336b4a/os-security-groups -X GET -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: 513c4e0f3eae4da29a3ecca9d6e6d5db"
  9.  
  10. RESP:{'date': 'Fri, 12 Apr 2013 22:51:33 GMT', 'status': '401', 'content-length': '276', 'content-type': 'text/plain; charset=UTF-8', 'www-authenticate': "Keystone uri='http://controller:5000/'"} 401 Unauthorized
  11.  
  12. This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
  13.  
  14. Authentication required
  15.  
  16.  
  17. REQ: curl -i http://controller:5000/v2.0/tokens -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-novaclient" -d '{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "admin"}}}'
  18.  
  19. RESP:{'date': 'Fri, 12 Apr 2013 22:51:33 GMT', 'vary': 'X-Auth-Token', 'content-length': '1821', 'status': '200', 'content-type': 'application/json'} {"access": {"token": {"expires": "2013-04-13T22:51:33Z", "id": "495a497bfac7412684551847eafc1477", "tenant": {"enabled": true, "description": null, "name": "admin", "id": "411150290c394fa7b7f9d965b6336b4a"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://172.16.42.164:8776/v1/411150290c394fa7b7f9d965b6336b4a", "region": "RegionOne", "internalURL": "http://172.16.42.164:8776/v1/411150290c394fa7b7f9d965b6336b4a", "id": "a0852fbe8315412a880712cb15e51dd3", "publicURL": "http://172.16.42.164:8776/v1/411150290c394fa7b7f9d965b6336b4a"}], "endpoints_links": [], "type": "volume", "name": "volume"}, {"endpoints": [{"adminURL": "http://172.16.42.164:9292/v1", "region": "RegionOne", "internalURL": "http://172.16.42.164:9292/v1", "id": "5e0c804d83ca4760a610cf6aa2d97c70", "publicURL": "http://172.16.42.164:9292/v1"}], "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://172.16.42.164:8774/v2/411150290c394fa7b7f9d965b6336b4a", "region": "RegionOne", "internalURL": "http://172.16.42.164:8774/v2/411150290c394fa7b7f9d965b6336b4a", "id": "6a212e479b714101b06225d524c10b72", "publicURL": "http://172.16.42.164:8774/v2/411150290c394fa7b7f9d965b6336b4a"}], "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://172.16.42.164:35357/v2.0", "region": "RegionOne", "internalURL": "http://172.16.42.164:5000/v2.0", "id": "5a33a14fff204f69bc10ae77008a2842", "publicURL": "http://172.16.42.164:5000/v2.0"}], "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": "admin", "roles_links": [], "id": "97dd9a9e99c5455da22e2b14a1b87333", "roles": [{"name": "admin"}, {"name": "user"}], "name": "admin"}, "metadata": {"is_admin": 0, "roles": ["a0e3c7978d014314b1a75b9fd9d95be9", "bae857cbbdf44ed3a30f2dceaebb9aef"]}}}
  20.  
  21.  
  22. REQ: curl -i http://172.16.42.164:8774/v2/411150290c394fa7b7f9d965b6336b4a/os-security-groups -X GET -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: 495a497bfac7412684551847eafc1477"
  23.  
  24. RESP:{'date': 'Fri, 12 Apr 2013 22:51:33 GMT', 'status': '401', 'content-length': '276', 'content-type': 'text/plain; charset=UTF-8', 'www-authenticate': "Keystone uri='http://controller:5000/'"} 401 Unauthorized
  25.  
  26. This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
  27.  
  28. Authentication required
  29.  
  30. DEBUG (shell:543) n/a (HTTP 401)
  31. Traceback (most recent call last):
  32. File "/usr/lib/python2.6/site-packages/novaclient/shell.py", line 540, in main
  33. OpenStackComputeShell().main(sys.argv[1:])
  34. File "/usr/lib/python2.6/site-packages/novaclient/shell.py", line 476, in main
  35. args.func(self.cs, args)
  36. File "/usr/lib/python2.6/site-packages/novaclient/v1_1/shell.py", line 1555, in do_secgroup_add_rule
  37. secgroup = _get_secgroup(cs, args.secgroup)
  38. File "/usr/lib/python2.6/site-packages/novaclient/v1_1/shell.py", line 1532, in _get_secgroup
  39. for s in cs.security_groups.list():
  40. File "/usr/lib/python2.6/site-packages/novaclient/v1_1/security_groups.py", line 79, in list
  41. 'security_groups')
  42. File "/usr/lib/python2.6/site-packages/novaclient/base.py", line 62, in _list
  43. _resp, body = self.api.client.get(url)
  44. File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 241, in get
  45. return self._cs_request(url, 'GET', **kwargs)
  46. File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 238, in _cs_request
  47. raise ex
  48. Unauthorized: n/a (HTTP 401)
  49.  
  50.  
  51.  
  52. MY KEYSTONE
  53. ---------------------------------
  54.  
  55. [root@MTYMXCOMLIFR03 config]# keystone endpoint-list
  56. +----------------------------------+-----------+--------------------------------------------+--------------------------------------------+--------------------------------------------+----------------------------------+
  57. | id | region | publicurl | internalurl | adminurl | service_id |
  58. +----------------------------------+-----------+--------------------------------------------+--------------------------------------------+--------------------------------------------+----------------------------------+
  59. | 5a33a14fff204f69bc10ae77008a2842 | RegionOne | http://172.16.42.164:5000/v2.0 | http://172.16.42.164:5000/v2.0 | http://172.16.42.164:35357/v2.0 | e88a859249a24b27aace51b893e87d7e |
  60. | 5e0c804d83ca4760a610cf6aa2d97c70 | RegionOne | http://172.16.42.164:9292/v1 | http://172.16.42.164:9292/v1 | http://172.16.42.164:9292/v1 | b382da276f3a430c80f9a07f3072ace3 |
  61. | 6a212e479b714101b06225d524c10b72 | RegionOne | http://172.16.42.164:8774/v2/$(tenant_id)s | http://172.16.42.164:8774/v2/$(tenant_id)s | http://172.16.42.164:8774/v2/$(tenant_id)s | f15bf599ff3247c7934dbda24a1a38df |
  62. | a0852fbe8315412a880712cb15e51dd3 | RegionOne | http://172.16.42.164:8776/v1/$(tenant_id)s | http://172.16.42.164:8776/v1/$(tenant_id)s | http://172.16.42.164:8776/v1/$(tenant_id)s | c6dd6b296f52476888d5139f416ace88 |
  63. +----------------------------------+-----------+--------------------------------------------+--------------------------------------------+--------------------------------------------+----------------------------------+
  64. [root@MTYMXCOMLIFR03 config]# keystone role-list
  65. +----------------------------------+-------+
  66. | id | name |
  67. +----------------------------------+-------+
  68. | a0e3c7978d014314b1a75b9fd9d95be9 | admin |
  69. | bae857cbbdf44ed3a30f2dceaebb9aef | user |
  70. +----------------------------------+-------+
  71. [root@MTYMXCOMLIFR03 config]# keystone tenant-list
  72. +----------------------------------+---------+---------+
  73. | id | name | enabled |
  74. +----------------------------------+---------+---------+
  75. | 354e99346a3d48f4b9c7de89e68fc5e5 | service | True |
  76. | 411150290c394fa7b7f9d965b6336b4a | admin | True |
  77. | e4b2ba45c2134d8bace6a205fe24eca1 | telmex | True |
  78. +----------------------------------+---------+---------+
  79. [root@MTYMXCOMLIFR03 config]# keystone user-list
  80. +----------------------------------+--------+---------+-------+
  81. | id | name | enabled | email |
  82. +----------------------------------+--------+---------+-------+
  83. | 124d8915cc9e4241b0c898d6f4276213 | telmex | True | |
  84. | 97dd9a9e99c5455da22e2b14a1b87333 | admin | True | |
  85. | b613bf6f202e4d838a390bc0779bda74 | glance | True | |
  86. | e906b928ebad46f6b7cece687f1139f4 | nova | True | |
  87. +----------------------------------+--------+---------+-------+
Advertisement
Add Comment
Please, Sign In to add comment