- Launchpad Entry: NovaSpec:instance-avail-zones
- Created: 2011-01-12
- Contributors: Eldar Nugaev, Ilya Alekseyev
We need the ability to schedule instances by availability zones. Each compute service has its own availability zone.
This set of changes provides to end users ability to choose availability zone when they start instances. Deployment engineers will have an option to run scheduler with availability zones support and could configure availability zones on each compute host.
We should allocate pair of HA servers on different hosts in different power zones or data centers.
The "availability zone" feature of OpenStack allows a user to schedule new instances in defined placement. There are two types of availability zones possible, an "instance availability zone" which defines the placement for allocation virtual machines and "volume availability zone" which defines the placement for allocation block storage devices. Each service in the process of creation gets availability zone from flags (FLAGS.node_availability_zone).
Current blueprint implements scheduling for "instance availability zones". We suppose "volume availability zones" should be implemented similarly as future work.
EC2 API (we replaced faked methods describe_availability zones to real one) Scheduler (we added new scheduler (ZoneScheduler) which makes decision by the availability_zone field) DB db/sqlalchemy/models.py (we added availability_zone field into Service)
Ability to use availability zones for compute service could be achieved using flag scheduler_driver (FLAGS.scheduler_driver) equal to 'nova.scheduler.zone.ZoneScheduler'. Availability zone for each host with compute service could be configured using flag node_availability_zone (FLAGS.node_availability_zone).
Unit tests provided.
We should add availability zones support for volume service.