Fix nits for supporting non-glance images

Addresses some comments that were posted in change
Iec8e1f862d29639363b71c67d60e711d35d2ed94 on last patch set.

Change-Id: Idf35eb1a603714973dd0522f8e1207c8894f349b
This commit is contained in:
Vladyslav Drok 2015-03-03 12:34:27 +02:00
parent 947edccabe
commit 69963c14dd
4 changed files with 23 additions and 6 deletions

View File

@ -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``: You should make the following changes to ``/etc/ironic/ironic.conf``:
#. To disable usage of keystone tokens:: #. To disable usage of Keystone tokens::
[DEFAULT] [DEFAULT]
... ...
auth_strategy=none 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, to serve DHCP and TFTP for machines that you're deploying. To disable it,
change the following lines:: change the following lines::
@ -1007,6 +1007,17 @@ You should make the following changes to ``/etc/ironic/ironic.conf``:
... ...
dhcp_provider=none 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. If you don't use Glance, it's possible to provide images to Ironic via hrefs.
.. note:: .. note::

View File

@ -308,7 +308,7 @@ def converted_size(path):
def get_image_properties(context, image_href, properties="all"): 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 context: context
:param image_href: href of the image :param image_href: href of the image

View File

@ -171,7 +171,10 @@ def build_instance_info_for_deploy(task):
image_service.HttpImageService().validate_href(image_source) image_service.HttpImageService().validate_href(image_source)
except exception.ImageRefValidationFailed: except exception.ImageRefValidationFailed:
with excutils.save_and_reraise_exception(): 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 instance_info['image_url'] = image_source
return instance_info return instance_info

View File

@ -107,8 +107,11 @@ def _get_boot_iso(task, root_uuid):
image_service.HttpImageService().validate_href(boot_iso) image_service.HttpImageService().validate_href(boot_iso)
except exception.ImageRefValidationFailed: except exception.ImageRefValidationFailed:
with excutils.save_and_reraise_exception(): with excutils.save_and_reraise_exception():
LOG.error(_LE("Ilo can attach only HTTP(S) URL as " LOG.error(_LE("Virtual media deploy accepts only Glance "
"virtual media.")) "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'] return task.node.instance_info['ilo_boot_iso']
# Option 2 - Check if user has provided a boot_iso in Glance. If boot_iso # Option 2 - Check if user has provided a boot_iso in Glance. If boot_iso