From 69963c14ddfbf3364b1639526896fa2ce034b881 Mon Sep 17 00:00:00 2001 From: Vladyslav Drok Date: Tue, 3 Mar 2015 12:34:27 +0200 Subject: [PATCH] Fix nits for supporting non-glance images Addresses some comments that were posted in change Iec8e1f862d29639363b71c67d60e711d35d2ed94 on last patch set. Change-Id: Idf35eb1a603714973dd0522f8e1207c8894f349b --- doc/source/deploy/install-guide.rst | 15 +++++++++++++-- ironic/common/images.py | 2 +- ironic/drivers/modules/agent.py | 5 ++++- ironic/drivers/modules/ilo/deploy.py | 7 +++++-- 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/doc/source/deploy/install-guide.rst b/doc/source/deploy/install-guide.rst index 108e84b5bf..dd4496f26b 100644 --- a/doc/source/deploy/install-guide.rst +++ b/doc/source/deploy/install-guide.rst @@ -993,13 +993,13 @@ It's possible to use Ironic without other OpenStack services. You should make the following changes to ``/etc/ironic/ironic.conf``: -#. To disable usage of keystone tokens:: +#. To disable usage of Keystone tokens:: [DEFAULT] ... auth_strategy=none -#. If you want to disable neutron, you should have your network pre-configured +#. If you want to disable Neutron, you should have your network pre-configured to serve DHCP and TFTP for machines that you're deploying. To disable it, change the following lines:: @@ -1007,6 +1007,17 @@ You should make the following changes to ``/etc/ironic/ironic.conf``: ... dhcp_provider=none + .. note:: + If you disabled Neutron and driver that you use is supported by at most + one conductor, PXE boot will still work for your nodes without any + manual config editing. This is because you know all the DHCP options + that will be used for deployment and can set up your DHCP server + appropriately. + + If you have multiple conductors per driver, it would be better to use + Neutron since it will do all the dynamically changing configurations for + you. + If you don't use Glance, it's possible to provide images to Ironic via hrefs. .. note:: diff --git a/ironic/common/images.py b/ironic/common/images.py index d7e534d1c5..5a18edf913 100644 --- a/ironic/common/images.py +++ b/ironic/common/images.py @@ -308,7 +308,7 @@ def converted_size(path): def get_image_properties(context, image_href, properties="all"): - """Returns the values of several properties of a glance image + """Returns the values of several properties of an image :param context: context :param image_href: href of the image diff --git a/ironic/drivers/modules/agent.py b/ironic/drivers/modules/agent.py index d0ca831288..10dbcec773 100644 --- a/ironic/drivers/modules/agent.py +++ b/ironic/drivers/modules/agent.py @@ -171,7 +171,10 @@ def build_instance_info_for_deploy(task): image_service.HttpImageService().validate_href(image_source) except exception.ImageRefValidationFailed: with excutils.save_and_reraise_exception(): - LOG.error(_LE("Agent deploy supports only HTTP(S) URLs.")) + LOG.error(_LE("Agent deploy supports only HTTP(S) URLs as " + "instance_info['image_source']. Either %s " + "is not a valid HTTP(S) URL or " + "is not reachable."), image_source) instance_info['image_url'] = image_source return instance_info diff --git a/ironic/drivers/modules/ilo/deploy.py b/ironic/drivers/modules/ilo/deploy.py index 53c88ac3f7..fd814209a1 100644 --- a/ironic/drivers/modules/ilo/deploy.py +++ b/ironic/drivers/modules/ilo/deploy.py @@ -107,8 +107,11 @@ def _get_boot_iso(task, root_uuid): image_service.HttpImageService().validate_href(boot_iso) except exception.ImageRefValidationFailed: with excutils.save_and_reraise_exception(): - LOG.error(_LE("Ilo can attach only HTTP(S) URL as " - "virtual media.")) + LOG.error(_LE("Virtual media deploy accepts only Glance " + "images or HTTP(S) URLs as " + "instance_info['ilo_boot_iso']. Either %s " + "is not a valid HTTP(S) URL or is " + "not reachable."), boot_iso) return task.node.instance_info['ilo_boot_iso'] # Option 2 - Check if user has provided a boot_iso in Glance. If boot_iso