Fix rebooting domains problem with new internal memory storage

signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
This commit is contained in:
Tom Wilkie committed 2007-03-23 15:10:46 +00:00
1 parent f38e3b431b
commit ea178f69d5
1 file changed
+8 -6
+8 -6
View File
@@ -269,7 +269,7 @@ class XendConfig(dict):
self.update_with_xenapi_config(xapi)
elif dominfo:
# output from xc.domain_getinfo
self._dominfo_to_xapi(dominfo)
self._dominfo_to_xapi(dominfo, update_mem = True)
log.debug('XendConfig.init: %s' % scrub_password(self))
@@ -405,15 +405,17 @@ class XendConfig(dict):
self._vcpus_sanity_check()
self._platform_sanity_check()
def _dominfo_to_xapi(self, dominfo):
def _dominfo_to_xapi(self, dominfo, update_mem = False):
self['domid'] = dominfo['domid']
self['online_vcpus'] = dominfo['online_vcpus']
self['VCPUs_max'] = dominfo['max_vcpu_id'] + 1
self['memory_dynamic_min'] = dominfo['mem_kb'] * 1024
self['memory_dynamic_max'] = dominfo['mem_kb'] * 1024
self['memory_static_min'] = 0
self['memory_static_max'] = dominfo['maxmem_kb'] * 1024
if update_mem:
self['memory_dynamic_min'] = dominfo['mem_kb'] * 1024
self['memory_dynamic_max'] = dominfo['mem_kb'] * 1024
self['memory_static_min'] = 0
self['memory_static_max'] = dominfo['maxmem_kb'] * 1024
self._memory_sanity_check()
self['cpu_time'] = dominfo['cpu_time']/1e9
# TODO: i don't know what the security stuff expects here
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.