diff options
| author | Todd Willey <todd@ansolabs.com> | 2010-12-28 17:54:31 -0500 |
|---|---|---|
| committer | Todd Willey <todd@ansolabs.com> | 2010-12-28 17:54:31 -0500 |
| commit | 9da1fcd6eca6f2f88e95242b8d046f4ee11f3761 (patch) | |
| tree | 62df4c7f8b96f0a80c3f14a7bf50c2df8717197e /nova/db | |
| parent | 5a25de893f34cb9b05996406488188b6ed47fca1 (diff) | |
| download | nova-9da1fcd6eca6f2f88e95242b8d046f4ee11f3761.tar.gz nova-9da1fcd6eca6f2f88e95242b8d046f4ee11f3761.tar.xz nova-9da1fcd6eca6f2f88e95242b8d046f4ee11f3761.zip | |
Defualt services to enabled.
Diffstat (limited to 'nova/db')
| -rw-r--r-- | nova/db/api.py | 4 | ||||
| -rw-r--r-- | nova/db/sqlalchemy/api.py | 4 | ||||
| -rw-r--r-- | nova/db/sqlalchemy/models.py | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/nova/db/api.py b/nova/db/api.py index fcb1cc3f9..f32e1e3f5 100644 --- a/nova/db/api.py +++ b/nova/db/api.py @@ -29,7 +29,7 @@ The underlying driver is loaded as a :class:`LazyPluggable`. `sqlite:///var/lib/nova/nova.sqlite`. :enable_new_services: when adding a new service to the database, is it in the - pool of available hardware (Default: False) + pool of available hardware (Default: True) """ from nova import exception @@ -40,7 +40,7 @@ from nova import utils FLAGS = flags.FLAGS flags.DEFINE_string('db_backend', 'sqlalchemy', 'The backend to use for db') -flags.DEFINE_boolean('enable_new_services', False, +flags.DEFINE_boolean('enable_new_services', True, 'Services to be added to the available pool on create') diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index bcc076c5a..9f0597b54 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -236,8 +236,8 @@ def service_get_by_args(context, host, binary): def service_create(context, values): service_ref = models.Service() service_ref.update(values) - if FLAGS.enable_new_services: - service_ref.disabled = False + if not FLAGS.enable_new_services: + service_ref.disabled = True service_ref.save() return service_ref diff --git a/nova/db/sqlalchemy/models.py b/nova/db/sqlalchemy/models.py index 86c24cb90..ca54d4466 100644 --- a/nova/db/sqlalchemy/models.py +++ b/nova/db/sqlalchemy/models.py @@ -148,7 +148,7 @@ class Service(BASE, NovaBase): binary = Column(String(255)) topic = Column(String(255)) report_count = Column(Integer, nullable=False, default=0) - disabled = Column(Boolean, default=True) + disabled = Column(Boolean, default=False) class Certificate(BASE, NovaBase): |
