All,
I have successfully setup a multi node Openstack folsom
environment with Nova compute running on a secondary node. I am using
Cinder for storage. I am able to create VMs in both the Controller Node and
Compute Node. Also, I am able to create and attach cinder volumes to the VMs on
the controller node. However, I could not do the same with the VMs running on
Compute node. I get a bad request error in compute.log. I need some help here
as I got struck here.
So far, I have configured Cinder-Api, Cinder-Volume and
Cinder-Scheduler on the controller node. I have only Nova compute running on
the compute node. I have also installed the cinder-client on the compute node.
The configuration files are below.
Any help you can provide is highly appreciated.
Thanks
Ak Sathiyamoorthy
ON Controller Node
#############
# Openstack api-paste.ini #
#############
[composite:osapi_volume]
use = call:cinder.api.openstack.urlmap:urlmap_factory
/: osvolumeversions
/v1: openstack_volume_api_v1
[composite:openstack_volume_api_v1]
use = call:cinder.api.auth:pipeline_factory
noauth = faultwrap sizelimit noauth osapi_volume_app_v1
keystone = faultwrap sizelimit authtoken keystonecontext
osapi_volume_app_v1
keystone_nolimit = faultwrap sizelimit authtoken
keystonecontext osapi_volume_app_v1
[filter:faultwrap]
paste.filter_factory =
cinder.api.openstack:FaultWrapper.factory
[filter:noauth]
paste.filter_factory =
cinder.api.openstack.auth:NoAuthMiddleware.factory
[filter:sizelimit]
paste.filter_factory =
cinder.api.sizelimit:RequestBodySizeLimiter.factory
[app:osapi_volume_app_v1]
paste.app_factory = cinder.api.openstack.volume:APIRouter.factory
[pipeline:osvolumeversions]
pipeline = faultwrap osvolumeversionapp
[app:osvolumeversionapp]
paste.app_factory =
cinder.api.openstack.volume.versions:Versions.factory
##########
# Shared #
##########
[filter:keystonecontext]
paste.filter_factory =
cinder.api.auth:CinderKeystoneContext.factory
[filter:authtoken]
paste.filter_factory =
keystone.middleware.auth_token:filter_factory
service_protocol = http
service_host = abnstak1.usa.hp.com
service_port = 5000
Cinder.conf
[DEFAULT]
logdir = /var/log/cinder
state_path = /var/lib/cinder
lock_path = /var/lib/cinder/tmp
volumes_dir = /etc/cinder/volumes
iscsi_helper = tgtadm
sql_connection = mysql://cinder:cinder@16.120.128.124/cinder
rpc_backend = cinder.openstack.common.rpc.impl_qpid
rootwrap_config = /etc/cinder/rootwrap.conf
auth_strategy = keystone
qpid_hostname=abnstak1.usa.hp.com
[keystone_authtoken]
admin_tenant_name = service
admin_user = cinder
admin_password = servicepass
auth_host = 16.120.128.124
auth_port = 35357
auth_protocol = http
signing_dirname = /tmp/keystone-signing-cinder
[aks@abnstak1 ~]$ keystone service-list
+----------------------------------+-------------+--------------+---------------------------+
|
id
| name |
type |
description |
+----------------------------------+-------------+--------------+---------------------------+
| 222c381921864214a7c90917294291db |
swift | object-store |
Swift Service |
| 3d164461f42b40cc9e1380f698c66036 |
glance | image
| Glance Image Service |
| 5f2cceed8e2344beb61b5ee24e2798d0 |
horizon | dashboard | OpenStack
Dashboard |
| 6ee7416bf37b4f9990dd064c74b306ef |
ec2 |
ec2 | EC2 Compatibility Layer |
| 737eacfa7640406f9c99240ebef0235b |
cinder | volume
| Cinder
Service |
| 7fc84ed3ca1249058792b8d52511f68a |
nova | compute
| Nova Compute Service |
| 9fde5a260ed34df4bfcc9b7be432fddf |
keystone | identity | Keystone Identity Service |
| a7b12da26eb149d2a59b0c2750815b92 | nova-volume
| volume | Nova Volume
Service |
+----------------------------------+-------------+--------------+---------------------------+
[aks@abnstak1 ~]$ keystone endpoint-list
+----------------------------------+-----------+------------------------------------------------------+------------------------------------------------------+------------------------------------------------------+----------------------------------+
|
id
| region
|
publicurl
|
internalurl
|
adminurl
|
service_id |
+----------------------------------+-----------+------------------------------------------------------+------------------------------------------------------+------------------------------------------------------+----------------------------------+
| 208f7983617a4c2ab62b586fb68db5de | regionOne
| http://127.0.0.1:8080/v1/AUTH_$(tenant_id)s
| http://127.0.0.1:8080/v1/AUTH_$(tenant_id)s
| http://127.0.0.1:8080/v1/AUTH_$(tenant_id)s
| 222c381921864214a7c90917294291db |
| 4a8e41974d2446a6ba65481583232278 | RegionOne
|
http://localhost:9292/v1
|
http://localhost:9292/v1
|
http://localhost:9292/v1
| 3d164461f42b40cc9e1380f698c66036 |
| 67eb265457ae428abb16b0e09ea57e68 | regionOne |
http://abnstak1.usa.hp.com:8776/v1/$(tenant_id)s
| http://abnstak1.usa.hp.com:8776/v1/$(tenant_id)s
| http://abnstak1.usa.hp.com:8776/v1/$(tenant_id)s
| 737eacfa7640406f9c99240ebef0235b |
| 7a48e7710ec749739930307a5455461a | RegionOne
| http://localhost:$(public_port)s/v2.0
| http://localhost:$(public_port)s/v2.0
| http://localhost:$(admin_port)s/v2.0
| 9fde5a260ed34df4bfcc9b7be432fddf |
| d25151c6ff2e47658fd6a72c5c6c3a64 | RegionOne | http://localhost:$(compute_port)s/v1.1/$(tenant_id)s
| http://localhost:$(compute_port)s/v1.1/$(tenant_id)s
| http://localhost:$(compute_port)s/v1.1/$(tenant_id)s
| 7fc84ed3ca1249058792b8d52511f68a |
| e97a47847b80412aa015c50d9df4ae8a | RegionOne
| http://localhost:8080/v1/AUTH_$(tenant_id)s
| http://localhost:8080/v1/AUTH_$(tenant_id)s
| http://localhost:8080/v1/AUTH_$(tenant_id)s
| 222c381921864214a7c90917294291db |
| fa394cc937d7438a8202f90040af7759 | RegionOne
| http://localhost:8773/services/Cloud
| http://localhost:8773/services/Cloud
| http://localhost:8773/services/Admin
| 6ee7416bf37b4f9990dd064c74b306ef |
+----------------------------------+-----------+------------------------------------------------------+------------------------------------------------------+------------------------------------------------------+----------------------------------+
NOVA.conf
[DEFAULT]
#Logs and State
verbose=True
logdir = /var/log/nova
state_path = /var/lib/nova
lock_path = /var/lib/nova/tmp
rootwrap_config = /etc/nova/rootwrap.conf
instances_path=/home/nova/instance
base_dir_name=/home/nova/_base
#volumes
iscsi_helper = tgtadm
volumes_dir = /etc/nova/volumes
volume_api_class = nova.volume.cinder.API
cinder_endpoint_template=http://16.120.128.124:8776/v1/$(tenant_id)s
#Network
network_manager = nova.network.manager.FlatDHCPManager
force_dhcp_release = True
dhcpbridge = /usr/bin/nova-dhcpbridge
dhcpbridge_flagfile = /etc/nova/nova.conf
firewall_driver =
nova.virt.libvirt.firewall.IptablesFirewallDriver
flat_network_bridge = br100
flat_interface = eth0
injected_network_template =
/usr/share/nova/interfaces.template
libvirt_nonblocking = True
libvirt_inject_partition = -1
#Database
sql_connection = mysql://nova:nova@16.120.128.124/nova
#Glance
image_service=nova.image.glance.GlanceImageService
glance_api_servers=16.120.128.124:9292
#Compute
qpid_hostname = 16.120.128.124
compute_driver = libvirt.LibvirtDriver
api_paste_config=/etc/nova/api-paste.ini
rpc_backend = nova.openstack.common.rpc.impl_qpid
enabled_apis = ec2,osapi_compute,metadata
#Authentication
auth_strategy = keystone
[keystone_authtoken]
admin_tenant_name = service
admin_user = nova
admin_password = servicepass
auth_host = 16.120.128.124
auth_port = 35357
auth_protocol = http
signing_dir = /tmp/keystone-signing-nova
On the compute Node
NOVA.Conf
[DEFAULT]
#Logs and State
verbose=True
logdir = /var/log/nova
state_path = /var/lib/nova
lock_path = /var/lib/nova/tmp
rootwrap_config = /etc/nova/rootwrap.conf
instances_path=/var/lib/nova/instances
#instances_path=/home/nova/instance
base_dir_name=/home/nova/_base
#volumes
iscsi_helper = tgtadm
volumes_dir = /etc/nova/volumes
volume_api_class = nova.volume.cinder.API
cinder_endpoint_template=http://16.120.128.124:8776/v1/$(project_id)s
#Network
network_manager = nova.network.manager.FlatDHCPManager
force_dhcp_release = True
dhcpbridge = /usr/bin/nova-dhcpbridge
dhcpbridge_flagfile = /etc/nova/nova.conf
firewall_driver =
nova.virt.libvirt.firewall.IptablesFirewallDriver
flat_network_bridge = br100
flat_interface = eth0
injected_network_template =
/usr/share/nova/interfaces.template
libvirt_nonblocking = True
libvirt_inject_partition = -1
#Database
sql_connection = mysql://nova:nova@16.120.128.124/nova
#Glance
image_service=nova.image.glance.GlanceImageService
glance_api_servers=16.120.128.124:9292
#Compute
qpid_hostname = 16.120.128.124
compute_driver = libvirt.LibvirtDriver
api_paste_config=/etc/nova/api-paste.ini
rpc_backend = nova.openstack.common.rpc.impl_qpid
enabled_apis = ec2,osapi_compute,metadata
#Authentication
auth_strategy = keystone
[keystone_authtoken]
admin_tenant_name = service
admin_user = nova
admin_password = servicepass
auth_host = 16.120.128.124
auth_port = 35357
auth_protocol = http
signing_dir = /tmp/keystone-signing-nova
the Error Message
[aks@abnstak1 ~]$ nova --debug volume-attach
abd7e40d-75a3-44f1-a4f3-8aaa2af2b172 155e78b7-8ebc-4721-99b4-a92d58e3ec1c
/dev/vdf
REQ: curl -i http://127.0.0.1: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": "verybadpass"}}}'
connect: (127.0.0.1, 5000) ************
send: 'POST /v2.0/tokens HTTP/1.1\r\nHost:
127.0.0.1:5000\r\nContent-Length: 106\r\ncontent-type:
application/json\r\naccept-encoding: gzip, deflate\r\naccept:
application/json\r\nuser-agent: python-novaclient\r\n\r\n'
send: '{"auth": {"tenantName":
"admin", "passwordCredentials": {"username":
"admin", "password": "verybadpass"}}}'
reply: 'HTTP/1.1 200 OK\r\n'
header: Vary: X-Auth-Token
header: Content-Type: application/json
header: Content-Length: 2876
header: Date: Wed, 13 Mar 2013 16:40:54 GMT
RESP:{'date': 'Wed, 13 Mar 2013 16:40:54 GMT', 'vary':
'X-Auth-Token', 'content-length': '2876', 'status': '200', 'content-type':
'application/json'} {"access": {"token":
{"expires": "2013-03-14T16:40:54Z", "id":
"8436d045c4cd4b42ab97f59b8fa23b98", "tenant": {"enabled":
true, "description": null, "name": "admin",
"id": "22a9872c93a74677ac5766560ca33842"}},
"serviceCatalog": [{"endpoints": [{"adminURL":
"http://localhost:8774/v1.1/22a9872c93a74677ac5766560ca33842",
"region": "RegionOne", "internalURL": "http://localhost:8774/v1.1/22a9872c93a74677ac5766560ca33842",
"id": "d25151c6ff2e47658fd6a72c5c6c3a64",
"publicURL": "http://localhost:8774/v1.1/22a9872c93a74677ac5766560ca33842"}],
"endpoints_links": [], "type": "compute",
"name": "nova"}, {"endpoints":
[{"adminURL": "http://localhost:9292/v1",
"region": "RegionOne", "internalURL": "http://localhost:9292/v1",
"id": "4a8e41974d2446a6ba65481583232278",
"publicURL": "http://localhost:9292/v1"}],
"endpoints_links": [], "type": "image",
"name": "glance"}, {"endpoints":
[{"adminURL": "http://abnstak1.usa.hp.com:8776/v1/22a9872c93a74677ac5766560ca33842",
"region": "regionOne", "internalURL": "http://abnstak1.usa.hp.com:8776/v1/22a9872c93a74677ac5766560ca33842",
"id": "67eb265457ae428abb16b0e09ea57e68",
"publicURL": "http://abnstak1.usa.hp.com:8776/v1/22a9872c93a74677ac5766560ca33842"}],
"endpoints_links": [], "type": "volume",
"name": "cinder"}, {"endpoints":
[{"adminURL": "http://localhost:8773/services/Admin",
"region": "RegionOne", "internalURL": "http://localhost:8773/services/Cloud",
"id": "fa394cc937d7438a8202f90040af7759",
"publicURL": "http://localhost:8773/services/Cloud"}],
"endpoints_links": [], "type": "ec2",
"name": "ec2"}, {"endpoints":
[{"adminURL": "http://localhost:8080/v1/AUTH_22a9872c93a74677ac5766560ca33842",
"region": "RegionOne", "internalURL": "http://localhost:8080/v1/AUTH_22a9872c93a74677ac5766560ca33842",
"id": "e97a47847b80412aa015c50d9df4ae8a",
"publicURL": "http://localhost:8080/v1/AUTH_22a9872c93a74677ac5766560ca33842"},
{"adminURL": "http://127.0.0.1:8080/v1/AUTH_22a9872c93a74677ac5766560ca33842",
"region": "regionOne", "internalURL": "http://127.0.0.1:8080/v1/AUTH_22a9872c93a74677ac5766560ca33842",
"id": "208f7983617a4c2ab62b586fb68db5de",
"publicURL": "http://127.0.0.1:8080/v1/AUTH_22a9872c93a74677ac5766560ca33842"}],
"endpoints_links": [], "type": "object-store",
"name": "swift"}, {"endpoints":
[{"adminURL": "http://localhost:35357/v2.0",
"region": "RegionOne", "internalURL": "http://localhost:5000/v2.0",
"id": "7a48e7710ec749739930307a5455461a",
"publicURL": "http://localhost:5000/v2.0"}],
"endpoints_links": [], "type": "identity",
"name": "keystone"}], "user":
{"username": "admin", "roles_links": [],
"id": "a94bfd23fba648458cfaca5c328e4eaa",
"roles": [{"name": "KeystoneServiceAdmin"},
{"name": "KeystoneAdmin"}, {"name":
"admin"}], "name": "admin"},
"metadata": {"is_admin": 0, "roles":
["341a039a819340ee9b586b6f2806d14a",
"d8e08f37d15848a78d0bdb3fef7abfde",
"b11ddd34265340c281b41cfad0a96b07"]}}}
REQ: curl -i http://localhost:8774/v1.1/22a9872c93a74677ac5766560ca33842/servers/abd7e40d-75a3-44f1-a4f3-8aaa2af2b172
-X GET -H "X-Auth-Project-Id: admin" -H "User-Agent:
python-novaclient" -H "Accept: application/json" -H
"X-Auth-Token: 8436d045c4cd4b42ab97f59b8fa23b98"
connect: (localhost, 8774) ************
connect fail: (localhost, 8774)
connect: (localhost, 8774) ************
send: u'GET
/v1.1/22a9872c93a74677ac5766560ca33842/servers/abd7e40d-75a3-44f1-a4f3-8aaa2af2b172
HTTP/1.1\r\nHost: localhost:8774\r\nx-auth-project-id: admin\r\nx-auth-token:
8436d045c4cd4b42ab97f59b8fa23b98\r\naccept-encoding: gzip, deflate\r\naccept:
application/json\r\nuser-agent: python-novaclient\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: X-Compute-Request-Id:
req-6db6c82f-5c60-41ce-ba34-19e17d6df61c
header: Content-Type: application/json
header: Content-Length: 1424
header: Date: Wed, 13 Mar 2013 16:40:54 GMT
RESP:{'status': '200', 'content-length': '1424',
'content-location':
u'http://localhost:8774/v1.1/22a9872c93a74677ac5766560ca33842/servers/abd7e40d-75a3-44f1-a4f3-8aaa2af2b172',
'x-compute-request-id': 'req-6db6c82f-5c60-41ce-ba34-19e17d6df61c', 'date':
'Wed, 13 Mar 2013 16:40:54 GMT', 'content-type': 'application/json'}
{"server": {"status": "ACTIVE",
"updated": "2013-03-11T16:37:17Z", "hostId":
"c3d469054b761f7fd801e4460403037fe70d415a66d3c11cef544719",
"OS-EXT-SRV-ATTR:host": "bay10", "addresses":
{"demonet": [{"version": 4, "addr":
"192.168.40.3"}]}, "links": [{"href": "http://localhost:8774/v1.1/22a9872c93a74677ac5766560ca33842/servers/abd7e40d-75a3-44f1-a4f3-8aaa2af2b172",
"rel": "self"}, {"href": "http://localhost:8774/22a9872c93a74677ac5766560ca33842/servers/abd7e40d-75a3-44f1-a4f3-8aaa2af2b172",
"rel": "bookmark"}], "key_name":
"mykey", "image": {"id":
"ea21e0c9-cb86-4254-bb74-217cbc2b44f1", "links":
[{"href": "http://localhost:8774/22a9872c93a74677ac5766560ca33842/images/ea21e0c9-cb86-4254-bb74-217cbc2b44f1",
"rel": "bookmark"}]}, "OS-EXT-STS:task_state":
null, "OS-EXT-STS:vm_state": "active",
"OS-EXT-SRV-ATTR:instance_name": "instance-00000005",
"OS-EXT-SRV-ATTR:hypervisor_hostname": "bay10",
"flavor": {"id": "2", "links":
[{"href": "http://localhost:8774/22a9872c93a74677ac5766560ca33842/flavors/2",
"rel": "bookmark"}]}, "id":
"abd7e40d-75a3-44f1-a4f3-8aaa2af2b172", "security_groups":
[{"name": "default"}], "user_id":
"a94bfd23fba648458cfaca5c328e4eaa", "name":
"os2-myserveron2", "created":
"2013-03-11T16:30:11Z", "tenant_id":
"22a9872c93a74677ac5766560ca33842", "OS-DCF:diskConfig":
"MANUAL", "accessIPv4": "",
"accessIPv6": "", "progress": 0,
"OS-EXT-STS:power_state": 1, "config_drive": "",
"metadata": {}}}
REQ: curl -i http://localhost:8774/v1.1/22a9872c93a74677ac5766560ca33842/servers/abd7e40d-75a3-44f1-a4f3-8aaa2af2b172/os-volume_attachments
-X POST -H "X-Auth-Project-Id: admin" -H "User-Agent:
python-novaclient" -H "Content-Type: application/json" -H
"Accept: application/json" -H "X-Auth-Token:
8436d045c4cd4b42ab97f59b8fa23b98" -d '{"volumeAttachment":
{"device": "/dev/vdf", "volumeId":
"155e78b7-8ebc-4721-99b4-a92d58e3ec1c"}}'
send: u'POST
/v1.1/22a9872c93a74677ac5766560ca33842/servers/abd7e40d-75a3-44f1-a4f3-8aaa2af2b172/os-volume_attachments
HTTP/1.1\r\nHost: localhost:8774\r\nContent-Length: 96\r\nx-auth-project-id:
admin\r\naccept-encoding: gzip, deflate\r\naccept:
application/json\r\nx-auth-token:
8436d045c4cd4b42ab97f59b8fa23b98\r\nuser-agent: python-novaclient\r\ncontent-type:
application/json\r\n\r\n'
send: '{"volumeAttachment": {"device":
"/dev/vdf", "volumeId":
"155e78b7-8ebc-4721-99b4-a92d58e3ec1c"}}'
reply: 'HTTP/1.1 400 Bad Request\r\n'
header: Content-Length: 141
header: Content-Type: application/json; charset=UTF-8
header: X-Compute-Request-Id:
req-e388e35b-a762-4145-b3da-a6277ede45a4
header: Date: Wed, 13 Mar 2013 16:40:54 GMT
RESP:{'date': 'Wed, 13 Mar 2013 16:40:54 GMT', 'status':
'400', 'content-length': '141', 'content-type': 'application/json;
charset=UTF-8', 'x-compute-request-id':
'req-e388e35b-a762-4145-b3da-a6277ede45a4'} {"badRequest":
{"message": "The server could not comply with the request since
it is either malformed or otherwise incorrect.", "code": 400}}
DEBUG (shell:543) The server could not comply with the
request since it is either malformed or otherwise incorrect. (HTTP 400)
(Request-ID: req-e388e35b-a762-4145-b3da-a6277ede45a4)
Traceback (most recent call last):
File
"/usr/lib/python2.6/site-packages/novaclient/shell.py", line 540, in
main
OpenStackComputeShell().main(sys.argv[1:])
File
"/usr/lib/python2.6/site-packages/novaclient/shell.py", line 476, in
main
args.func(self.cs, args)
File
"/usr/lib/python2.6/site-packages/novaclient/v1_1/shell.py", line
1230, in do_volume_attach
args.device)
File
"/usr/lib/python2.6/site-packages/novaclient/v1_1/volumes.py", line
118, in create_server_volume
body, "volumeAttachment")
File
"/usr/lib/python2.6/site-packages/novaclient/base.py", line 148, in
_create
_resp, body = self.api.client.post(url,
body=body)
File
"/usr/lib/python2.6/site-packages/novaclient/client.py", line 244, in
post
return self._cs_request(url, 'POST',
**kwargs)
File
"/usr/lib/python2.6/site-packages/novaclient/client.py", line 228, in
_cs_request
**kwargs)
File
"/usr/lib/python2.6/site-packages/novaclient/client.py", line 210, in
_time_request
resp, body = self.request(url, method,
**kwargs)
File
"/usr/lib/python2.6/site-packages/novaclient/client.py", line 204, in
request
raise exceptions.from_response(resp,
body)
BadRequest: The server could not comply with the request
since it is either malformed or otherwise incorrect. (HTTP 400) (Request-ID:
req-e388e35b-a762-4145-b3da-a6277ede45a4)
ERROR: The server could not comply with the request since it
is either malformed or otherwise incorrect. (HTTP 400) (Request-ID:
req-e388e35b-a762-4145-b3da-a6277ede45a4)
_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp