Handles all processes relating to instances (guest vms).
The ComputeManager class is a nova.manager.Manager that
handles RPC calls relating to creating instances. It is responsible for
building a disk image, launching it via the underlying virtualization driver,
responding to calls to check its state, attaching persistent storage, and
terminating it.
Related Flags
-
class nova.compute.manager.ComputeManager(compute_driver=None, *args, **kwargs)
Bases: nova.manager.SchedulerDependentManager
Manages the running instances from creation to destruction.
-
attach_volume(context, instance_id, *args, **kwargs)
Attach a volume to an instance.
-
check_shared_storage_test_file(*args, **kw)
-
cleanup_shared_storage_test_file(*args, **kw)
-
compare_cpu(*args, **kw)
-
confirm_resize(*args, **kw)
-
create_shared_storage_test_file(*args, **kw)
-
detach_volume(*args, **kw)
-
finish_resize(*args, **kw)
-
finish_revert_resize(*args, **kw)
-
get_ajax_console(*args, **kw)
-
get_console_output(*args, **kw)
-
get_console_pool_info(context, console_type)
-
get_console_topic(context, **kwargs)
Retrieves the console host for a project on this host
Currently this is just set in the flags for each compute
host.
-
get_diagnostics(*args, **kw)
-
get_lock(*args, **kw)
-
get_network_topic(context, **kwargs)
Retrieves the network host for a project on this host
-
get_vnc_console(*args, **kw)
-
init_host()
Do any initialization that needs to be run if this is a
standalone service.
-
inject_file(*args, **kw)
-
inject_network_info(context, instance_id, *args, **kwargs)
Inject network info for the instance.
-
live_migration(context, instance_id, dest)
Executing live migration.
Parameters: |
- context – security context
- instance_id – nova.db.sqlalchemy.models.Instance.Id
- dest – destination host
|
-
lock_instance(*args, **kw)
-
pause_instance(*args, **kw)
-
periodic_tasks(context=None)
Tasks to be run at a periodic interval.
-
post_live_migration(ctxt, instance_ref, dest)
Post operations for live migration.
This method is called from live_migration
and mainly updating database record.
Parameters: |
- ctxt – security context
- instance_id – nova.db.sqlalchemy.models.Instance.Id
- dest – destination host
|
-
pre_live_migration(context, instance_id, time=None)
Preparations for live migration at dest host.
Parameters: |
- context – security context
- instance_id – nova.db.sqlalchemy.models.Instance.Id
|
-
prep_resize(*args, **kw)
-
reboot_instance(*args, **kw)
-
recover_live_migration(ctxt, instance_ref, host=None)
Recovers Instance/volume state from migrating -> running.
Parameters: |
- ctxt – security context
- instance_id – nova.db.sqlalchemy.models.Instance.Id
- host – DB column value is updated by this hostname.
if none, the host instance currently running is selected.
|
-
refresh_security_group_members(*args, **kw)
-
refresh_security_group_rules(*args, **kw)
-
rescue_instance(*args, **kw)
-
reset_network(context, instance_id, *args, **kwargs)
Reset networking on the instance.
-
resize_instance(*args, **kw)
-
resume_instance(*args, **kw)
-
revert_resize(*args, **kw)
-
run_instance(*args, **kw)
-
set_admin_password(*args, **kw)
-
snapshot_instance(*args, **kw)
-
suspend_instance(*args, **kw)
-
terminate_instance(*args, **kw)
-
unlock_instance(*args, **kw)
-
unpause_instance(*args, **kw)
-
unrescue_instance(*args, **kw)
-
update_available_resource(*args, **kw)
-
nova.compute.manager.checks_instance_lock(function)
decorator used for preventing action against locked instances
unless, of course, you happen to be admin