DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.

DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
Hypervisor resource classes
etc.
To limit the scope of required refactoring work, we still keep legacy VM states as we have before, the difference is that for operations that could cause state transitions, it will always be managed solely from a job and as long as the management server is running, any transition process should either succeed or fail within a certain limit of time period. Following is the guideline to determine any expected system behave.
1) As long as management server is running, no VM should be stuck at a certain transitional state for too long, these transitional states include Starting, Stoppping, Migrating and Expunging.
2) For any transitional process, i.e., transition from Stopped -> Running through Starting state, if during the time there is external changes on the VM (i.e., stop a just started VM from vCenter), it can only affect the result of job, if the transition direction from external side is the same as what the job is expecting, it has no effect to the final result, otherwise, it can eventually cause the job to fail, in any way, upon the completion of the job, VM will be returned to a stationary state.
3) Upon management server restart, any pending un-completed jobs will be failed, related resources in CloudStack should be released and related VMs should be put into the last known stationary state.
4) If host report a out-of-sync power state while there is no pending job that is acting on the VM, for non-HA case, CloudStack will always update VM to be in sync with what it is reported from hypervisor, however, since this state transition is not gone through a normal transitional job, and if VM is put into Running state, VM's network environment will most likely not ready, we will report as an alert about this VM for manual attention from administrator or end-user. However, since the VM has been put into a stationary state that is in-sync with hypervisor, CloudStack or end-user can always issue an correction command to either stop or start the VM through normal process.
5) To support external VM live migration, a host change in host report will always be honored by CloudStack, regardless whether or not if there is a pending job that is acting on the VM. To honor host change of VM, CloudStack updates the VM/host relationship accordingly. Considering a complex migration case as below,
A VM-migrate transition job is trying to lively migrate VM from host 1 to host2, however, during the time, if external manager like vCenter may interrupt it and migrate it from host 1 to host 3 successfully, the VM-migrating job in CloudStack should fail as the end result of the VM state end up at an unexpected host, however, upon completion of this failed job, VM's host change will still be honored so that user can re-perform the migration again, but this time, command will be issued from host 3 to host 2.
| Code Block |
|---|
ALTER TABLE `cloud`.`async_job` DROP COLUMN `session_key`; ALTER TABLE `cloud`.`async_job` DROP COLUMN `job_cmd_originator`; ALTER TABLE `cloud`.`async_job` DROP COLUMN `callback_type`; ALTER TABLE `cloud`.`async_job` DROP COLUMN `callback_address`; ALTER TABLE `cloud`.`async_job` ADD COLUMN `job_type` VARCHAR(32); ALTER TABLE `cloud`.`async_job` ADD COLUMN `job_dispatcher` VARCHAR(64); ALTER TABLE `cloud`.`async_job` ADD COLUMN `job_executing_msid` bigint; ALTER TABLE `cloud`.`async_job` ADD COLUMN `job_pending_signals` int(10) NOT NULL DEFAULT 0; ALTER TABLE `cloud`.`vm_instance` ADD COLUMN `power_state` VARCHAR(64) DEFAULT 'PowerUnknown'; ALTER TABLE `cloud`.`vm_instance` ADD COLUMN `power_state_update_time` DATETIME; ALTER TABLE `cloud`.`vm_instance` ADD COLUMN `power_state_update_count` INT DEFAULT 0; ALTER TABLE `cloud`.`vm_instance` ADD COLUMN `power_host` bigint unsigned; ALTER TABLE `cloud`.`vm_instance` ADD CONSTRAINT `fk_vm_instance__power_host` FOREIGN KEY (`power_host`) REFERENCES `cloud`.`host`(`id`); CREATE TABLE `cloud`.`vm_work_job` ( `id` bigint unsigned UNIQUE NOT NULL, `step` char(32) NOT NULL COMMENT 'state', `vm_type` char(32) NOT NULL COMMENT 'type of vm', `vm_instance_id` bigint unsigned NOT NULL COMMENT 'vm instance', PRIMARY KEY (`id`), CONSTRAINT `fk_vm_work_job__instance_id` FOREIGN KEY (`vm_instance_id`) REFERENCES `vm_instance`(`id`) ON DELETE CASCADE, INDEX `i_vm_work_job__vm`(`vm_type`, `vm_instance_id`), INDEX `i_vm_work_job__step`(`step`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `cloud`.`async_job_journal` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `job_id` bigint unsigned NOT NULL, `journal_type` varchar(32), `journal_text` varchar(1024) COMMENT 'journal descriptive informaton', `journal_obj` varchar(1024) COMMENT 'journal strutural information, JSON encoded object', `created` datetime NOT NULL COMMENT 'date created', PRIMARY KEY (`id`), CONSTRAINT `fk_async_job_journal__job_id` FOREIGN KEY (`job_id`) REFERENCES `async_job`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `cloud`.`async_job_join_map` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `job_id` bigint unsigned NOT NULL, `join_job_id` bigint unsigned NOT NULL, `join_status` int NOT NULL, `join_result` varchar(1024), `join_msid` bigint, `complete_msid` bigint, `sync_source_id` bigint COMMENT 'upper-level job sync source info before join', `wakeup_handler` varchar(64), `wakeup_dispatcher` varchar(64), `wakeup_interval` bigint NOT NULL DEFAULT 3000 COMMENT 'wakeup interval in seconds', `created` datetime NOT NULL, `last_updated` datetime, `next_wakeup` datetime, `expiration` datetime, PRIMARY KEY (`id`), CONSTRAINT `fk_async_job_join_map__job_id` FOREIGN KEY (`job_id`) REFERENCES `async_job`(`id`) ON DELETE CASCADE, CONSTRAINT `fk_async_job_join_map__join_job_id` FOREIGN KEY (`join_job_id`) REFERENCES `async_job`(`id`), CONSTRAINT `fk_async_job_join_map__join` UNIQUE (`job_id`, `join_job_id`), INDEX `i_async_job_join_map__join_job_id`(`join_job_id`), INDEX `i_async_job_join_map__created`(`created`), INDEX `i_async_job_join_map__last_updated`(`last_updated`), INDEX `i_async_job_join_map__next_wakeup`(`next_wakeup`), INDEX `i_async_job_join_map__expiration`(`expiration`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
...