diff options
author | Anup Navare <anup.d.navare@intel.com> | 2016-12-05 22:50:55 +0000 |
---|---|---|
committer | Anup Navare <anup.d.navare@intel.com> | 2017-04-12 17:21:50 +0000 |
commit | 58b34b0b3002cd5bc355bfb0e6f5406004a4da41 (patch) | |
tree | 544d9674315fa149b22d2e1a713257bc021d7b48 /ironic/conductor/base_manager.py | |
parent | 8aec5fb6a579e1471265beb044fde92755d6e5a1 (diff) | |
download | ironic-58b34b0b3002cd5bc355bfb0e6f5406004a4da41.tar.gz |
Config drive support for ceph radosgw
Currently config drive can be stored in swift with keystone
authentication. This change allows ironic to store the config drive in
ceph radosgw and use radosgw authentication mechanism that is not
currently supported. It uses swift API compatibility for ceph radosgw.
New options:
[deploy]/configdrive_use_object_store
[deploy]/object_store_endpoint_type
Deprecations:
[conductor]/configdrive_use_swift
Replaced by: [deploy]/configdrive_use_object_store
[glance]/temp_url_endpoint_type
Replaced by: [deploy]/object_store_endpoint_type
Change-Id: I9204c718505376cfb73632b0d0f31cea00d5e4d8
Closes-Bug: #1642719
Diffstat (limited to 'ironic/conductor/base_manager.py')
-rw-r--r-- | ironic/conductor/base_manager.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ironic/conductor/base_manager.py b/ironic/conductor/base_manager.py index 90a59d55a..618ffbc70 100644 --- a/ironic/conductor/base_manager.py +++ b/ironic/conductor/base_manager.py @@ -85,6 +85,8 @@ class BaseConductorManager(object): :raises: DriverLoadError if an enabled driver cannot be loaded. :raises: DriverNameConflict if a classic driver and a dynamic driver are both enabled and have the same name. + :raises: ConfigInvalid if required config options for connection with + radosgw are missing while storing config drive. """ if self._started: raise RuntimeError(_('Attempt to start an already running ' @@ -172,6 +174,18 @@ class BaseConductorManager(object): self._periodic_task_callables, executor_factory=periodics.ExistingExecutor(self._executor)) + # Check for required config options if object_store_endpoint_type is + # radosgw + if (CONF.deploy.configdrive_use_object_store and + CONF.deploy.object_store_endpoint_type == "radosgw"): + if (None in (CONF.swift.auth_url, CONF.swift.username, + CONF.swift.password)): + msg = _("Parameters missing to make a connection with " + "radosgw. Ensure that [swift]/auth_url, " + "[swift]/username, and [swift]/password are all " + "configured.") + raise exception.ConfigInvalid(msg) + # clear all target_power_state with locks by this conductor self.dbapi.clear_node_target_power_state(self.host) # clear all locks held by this conductor before registering |