~ubuntu-branches/ubuntu/quantal/nova/quantal-proposed

« back to all changes in this revision

Viewing changes to nova/compute/aggregate_states.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-08-16 14:04:11 UTC
  • mto: This revision was merged to the branch mainline in revision 84.
  • Revision ID: package-import@ubuntu.com-20120816140411-0mr4n241wmk30t9l
Tags: upstream-2012.2~f3
ImportĀ upstreamĀ versionĀ 2012.2~f3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# vim: tabstop=4 shiftwidth=4 softtabstop=4
2
 
 
3
 
# Copyright 2010 OpenStack LLC.
4
 
# All Rights Reserved.
5
 
#
6
 
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
7
 
#    not use this file except in compliance with the License. You may obtain
8
 
#    a copy of the License at
9
 
#
10
 
#         http://www.apache.org/licenses/LICENSE-2.0
11
 
#
12
 
#    Unless required by applicable law or agreed to in writing, software
13
 
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14
 
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15
 
#    License for the specific language governing permissions and limitations
16
 
#    under the License.
17
 
 
18
 
"""Possible states for host aggregates.
19
 
 
20
 
An aggregate may be 'created', in which case the admin has triggered its
21
 
creation, but the underlying hypervisor pool has not actually being set up
22
 
yet. An aggregate may be 'changing', meaning that the underlying hypervisor
23
 
pool is being setup. An aggregate may be 'active', in which case the underlying
24
 
hypervisor pool is up and running. An aggregate may be 'dismissed' when it has
25
 
no hosts and it has been deleted. An aggregate may be in 'error' in all other
26
 
cases.
27
 
A 'created' aggregate becomes 'changing' during the first request of
28
 
adding a host. During a 'changing' status no other requests will be accepted;
29
 
this is to allow the hypervisor layer to instantiate the underlying pool
30
 
without any potential race condition that may incur in master/slave-based
31
 
configurations. The aggregate goes into the 'active' state when the underlying
32
 
pool has been correctly instantiated.
33
 
All other operations (e.g. add/remove hosts) that succeed will keep the
34
 
aggregate in the 'active' state. If a number of continuous requests fail,
35
 
an 'active' aggregate goes into an 'error' state. To recover from such a state,
36
 
admin intervention is required. Currently an error state is irreversible,
37
 
that is, in order to recover from it an aggregate must be deleted.
38
 
"""
39
 
 
40
 
CREATED = 'created'
41
 
CHANGING = 'changing'
42
 
ACTIVE = 'active'
43
 
ERROR = 'error'
44
 
DISMISSED = 'dismissed'