fixed based on reviewer's comment.
1. erase wrapper function(remove/exists/mktempfile) from nova.utils. 2. nova-manage service describeresource(->describe_resource) 3. nova-manage service updateresource(->update_resource) 4. erase "my mistake print" statement Additional changes are made at: 1. nova.image.s3.show 2. nova.compute.api.create that's because instances cannot launched without this changes.
This commit is contained in:
@@ -574,7 +574,7 @@ class ServiceCommands(object):
|
|||||||
return
|
return
|
||||||
db.service_update(ctxt, svc['id'], {'disabled': True})
|
db.service_update(ctxt, svc['id'], {'disabled': True})
|
||||||
|
|
||||||
def describeresource(self, host):
|
def describe_resource(self, host):
|
||||||
"""describe cpu/memory/hdd info for host."""
|
"""describe cpu/memory/hdd info for host."""
|
||||||
|
|
||||||
result = rpc.call(context.get_admin_context(),
|
result = rpc.call(context.get_admin_context(),
|
||||||
@@ -606,7 +606,7 @@ class ServiceCommands(object):
|
|||||||
val['memory_mb'],
|
val['memory_mb'],
|
||||||
val['local_gb'])
|
val['local_gb'])
|
||||||
|
|
||||||
def updateresource(self, host):
|
def update_resource(self, host):
|
||||||
"""update available vcpu/memory/disk info for host."""
|
"""update available vcpu/memory/disk info for host."""
|
||||||
|
|
||||||
ctxt = context.get_admin_context()
|
ctxt = context.get_admin_context()
|
||||||
@@ -618,7 +618,7 @@ class ServiceCommands(object):
|
|||||||
if len(service_refs) <= 0:
|
if len(service_refs) <= 0:
|
||||||
raise exception.Invalid(_('%s is not compute node.') % host)
|
raise exception.Invalid(_('%s is not compute node.') % host)
|
||||||
|
|
||||||
result = rpc.call(ctxt,
|
rpc.call(ctxt,
|
||||||
db.queue_get_for(ctxt, FLAGS.compute_topic, host),
|
db.queue_get_for(ctxt, FLAGS.compute_topic, host),
|
||||||
{"method": "update_available_resource"})
|
{"method": "update_available_resource"})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user