Disabling/enabling hosts ends with 400 response, but in logs i see 'Setting host cc to disabled' and the request is then forwarded to nova-compute.
Here are the steps.
First I'm making the following request:
PUT os-hosts/cc with body {"status" : "disable"}
In the nova-api.log I see my request
2012-10-03 11:48:59 INFO nova.api.openstack.wsgi [req-66e9dcf9-19c4-41de-8232-32834137f04d 941cdd94696e474a951d5ed112d4d4c9 4674d940971f4532a8747baf1af30d9b] PUT http://localhost:8774/v1.1/4674d940971f4532a8747baf1af30d9b/os-hosts/cc?ignore_awful_caching1349257739
2012-10-03 11:48:59 AUDIT nova.api.openstack.compute.contrib.hosts [req-66e9dcf9-19c4-41de-8232-32834137f04d 941cdd94696e474a951d5ed112d4d4c9 4674d940971f4532a8747baf1af30d9b] Setting host cc to disabled.
2012-10-03 11:48:59 DEBUG nova.rpc.amqp [req-66e9dcf9-19c4-41de-8232-32834137f04d 941cdd94696e474a951d5ed112d4d4c9 4674d940971f4532a8747baf1af30d9b] Making asynchronous call on compute.cc ... from (pid=16703) multicall /usr/lib/python2.7/dist-packages/nova/rpc/amqp.py:326
2012-10-03 11:48:59 DEBUG nova.rpc.amqp [req-66e9dcf9-19c4-41de-8232-32834137f04d 941cdd94696e474a951d5ed112d4d4c9 4674d940971f4532a8747baf1af30d9b] MSG_ID is 2bc447466a644e37bf9ec1c20ac51757 from (pid=16703) multicall /usr/lib/python2.7/dist-packages/nova/rpc/amqp.py:329
2012-10-03 11:49:00 INFO nova.api.openstack.wsgi [req-66e9dcf9-19c4-41de-8232-32834137f04d 941cdd94696e474a951d5ed112d4d4c9 4674d940971f4532a8747baf1af30d9b] HTTP exception thrown: None
2012-10-03 11:49:00 INFO nova.api.openstack.wsgi [req-66e9dcf9-19c4-41de-8232-32834137f04d 941cdd94696e474a951d5ed112d4d4c9 4674d940971f4532a8747baf1af30d9b] http://localhost:8774/v1.1/4674d940971f4532a8747baf1af30d9b/os-hosts/cc?ignore_awful_caching1349257739 returned with HTTP 400
Then in nova-compute.log i see
2012-10-03 11:48:59 DEBUG nova.rpc.amqp [-] received {u'_context_roles': [u'admin'], u'_msg_id': u'2bc447466a644e37bf9ec1c20ac51757', u'_context_read_deleted': u'no', u'_context_request_id': u'req-66e9dcf9-19c4-41de-8232-32834137f04d', u'args': {u'enabled': False}, u'_context_auth_token': '<SANITIZED>', u'_context_is_admin': True, u'_context_project_id': u'4674d940971f4532a8747baf1af30d9b', u'_context_timestamp': u'2012-10-03T09:48:59.977461', u'_context_user_id': u'941cdd94696e474a951d5ed112d4d4c9', u'method': u'set_host_enabled', u'_context_remote_address': u'127.0.0.1'} from (pid=17768) _safe_log /usr/lib/python2.7/dist-packages/nova/rpc/common.py:160
2012-10-03 11:48:59 DEBUG nova.rpc.amqp [req-66e9dcf9-19c4-41de-8232-32834137f04d 941cdd94696e474a951d5ed112d4d4c9 4674d940971f4532a8747baf1af30d9b] unpacked context: {'user_id': u'941cdd94696e474a951d5ed112d4d4c9', 'roles': [u'admin'], 'timestamp': '2012-10-03T09:48:59.977461', 'auth_token': '<SANITIZED>', 'remote_address': u'127.0.0.1', 'is_admin': True, 'request_id': u'req-66e9dcf9-19c4-41de-8232-32834137f04d', 'project_id': u'4674d940971f4532a8747baf1af30d9b', 'read_deleted': u'no'} from (pid=17768) _safe_log /usr/lib/python2.7/dist-packages/nova/rpc/common.py:160
but host's status doesn't get changed.
My version is 2012.1.1-9
bug #1086798 needs to be fixed first