Move the http_url and http_root to deploy config
Move the http_url and http_root to the deploy config so that other drivers like ilo drivers may also use the same http web server. Implements : blueprint remove-swift-dependency-for-ilo-drivers Change-Id: I61224f38343d894bb70620fdce51e0cfbd4aff1b
This commit is contained in:
@@ -802,9 +802,6 @@ on the Bare Metal Service node(s) where ``ironic-conductor`` is running.
|
|||||||
|
|
||||||
[pxe]
|
[pxe]
|
||||||
|
|
||||||
# Ironic compute node's http root path. (string value)
|
|
||||||
http_root=/httpboot
|
|
||||||
|
|
||||||
# Ironic compute node's tftp root path. (string value)
|
# Ironic compute node's tftp root path. (string value)
|
||||||
tftp_root=/tftpboot
|
tftp_root=/tftpboot
|
||||||
|
|
||||||
@@ -812,6 +809,10 @@ on the Bare Metal Service node(s) where ``ironic-conductor`` is running.
|
|||||||
# value)
|
# value)
|
||||||
tftp_server=192.168.0.2
|
tftp_server=192.168.0.2
|
||||||
|
|
||||||
|
[deploy]
|
||||||
|
# Ironic compute node's http root path. (string value)
|
||||||
|
http_root=/httpboot
|
||||||
|
|
||||||
# Ironic compute node's HTTP server URL. Example:
|
# Ironic compute node's HTTP server URL. Example:
|
||||||
# http://192.1.2.3:8080 (string value)
|
# http://192.1.2.3:8080 (string value)
|
||||||
http_url=http://192.168.0.2:8080
|
http_url=http://192.168.0.2:8080
|
||||||
|
|||||||
@@ -1,5 +1,106 @@
|
|||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
|
|
||||||
|
#
|
||||||
|
# Options defined in oslo.service.service
|
||||||
|
#
|
||||||
|
|
||||||
|
# Enable eventlet backdoor. Acceptable values are 0, <port>,
|
||||||
|
# and <start>:<end>, where 0 results in listening on a random
|
||||||
|
# tcp port number; <port> results in listening on the
|
||||||
|
# specified port number (and not enabling backdoor if that
|
||||||
|
# port is in use); and <start>:<end> results in listening on
|
||||||
|
# the smallest unused port number within the specified range
|
||||||
|
# of port numbers. The chosen port is displayed in the
|
||||||
|
# service's log file. (string value)
|
||||||
|
#backdoor_port=<None>
|
||||||
|
|
||||||
|
# Enables or disables logging values of all registered options
|
||||||
|
# when starting a service (at DEBUG level). (boolean value)
|
||||||
|
#log_options=true
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Options defined in oslo.service.periodic_task
|
||||||
|
#
|
||||||
|
|
||||||
|
# Some periodic tasks can be run in a separate process. Should
|
||||||
|
# we run them here? (boolean value)
|
||||||
|
#run_external_periodic_tasks=true
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Options defined in oslo.messaging
|
||||||
|
#
|
||||||
|
|
||||||
|
# Size of RPC connection pool. (integer value)
|
||||||
|
#rpc_conn_pool_size=30
|
||||||
|
|
||||||
|
# ZeroMQ bind address. Should be a wildcard (*), an ethernet
|
||||||
|
# interface, or IP. The "host" option should point or resolve
|
||||||
|
# to this address. (string value)
|
||||||
|
#rpc_zmq_bind_address=*
|
||||||
|
|
||||||
|
# MatchMaker driver. (string value)
|
||||||
|
#rpc_zmq_matchmaker=local
|
||||||
|
|
||||||
|
# ZeroMQ receiver listening port. (integer value)
|
||||||
|
#rpc_zmq_port=9501
|
||||||
|
|
||||||
|
# Number of ZeroMQ contexts, defaults to 1. (integer value)
|
||||||
|
#rpc_zmq_contexts=1
|
||||||
|
|
||||||
|
# Maximum number of ingress messages to locally buffer per
|
||||||
|
# topic. Default is unlimited. (integer value)
|
||||||
|
#rpc_zmq_topic_backlog=<None>
|
||||||
|
|
||||||
|
# Directory for holding IPC sockets. (string value)
|
||||||
|
#rpc_zmq_ipc_dir=/var/run/openstack
|
||||||
|
|
||||||
|
# Name of this node. Must be a valid hostname, FQDN, or IP
|
||||||
|
# address. Must match "host" option, if running Nova. (string
|
||||||
|
# value)
|
||||||
|
#rpc_zmq_host=ironic
|
||||||
|
|
||||||
|
# Seconds to wait before a cast expires (TTL). Only supported
|
||||||
|
# by impl_zmq. (integer value)
|
||||||
|
#rpc_cast_timeout=30
|
||||||
|
|
||||||
|
# Heartbeat frequency. (integer value)
|
||||||
|
#matchmaker_heartbeat_freq=300
|
||||||
|
|
||||||
|
# Heartbeat time-to-live. (integer value)
|
||||||
|
#matchmaker_heartbeat_ttl=600
|
||||||
|
|
||||||
|
# Size of RPC thread pool. (integer value)
|
||||||
|
#rpc_thread_pool_size=64
|
||||||
|
|
||||||
|
# The Drivers(s) to handle sending notifications. Possible
|
||||||
|
# values are messaging, messagingv2, routing, log, test, noop
|
||||||
|
# (multi valued)
|
||||||
|
#notification_driver=
|
||||||
|
|
||||||
|
# AMQP topic used for OpenStack notifications. (list value)
|
||||||
|
# Deprecated group/name - [rpc_notifier2]/topics
|
||||||
|
#notification_topics=notifications
|
||||||
|
|
||||||
|
# Seconds to wait for a response from a call. (integer value)
|
||||||
|
#rpc_response_timeout=60
|
||||||
|
|
||||||
|
# A URL representing the messaging driver to use and its full
|
||||||
|
# configuration. If not set, we fall back to the rpc_backend
|
||||||
|
# option and driver specific configuration. (string value)
|
||||||
|
#transport_url=<None>
|
||||||
|
|
||||||
|
# The messaging driver to use, defaults to rabbit. Other
|
||||||
|
# drivers include qpid and zmq. (string value)
|
||||||
|
#rpc_backend=rabbit
|
||||||
|
|
||||||
|
# The default exchange under which topics are scoped. May be
|
||||||
|
# overridden by an exchange name specified in the
|
||||||
|
# transport_url option. (string value)
|
||||||
|
#control_exchange=openstack
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Options defined in oslo.log
|
# Options defined in oslo.log
|
||||||
#
|
#
|
||||||
@@ -41,14 +142,13 @@
|
|||||||
#log_dir=<None>
|
#log_dir=<None>
|
||||||
|
|
||||||
# Use syslog for logging. Existing syslog format is DEPRECATED
|
# Use syslog for logging. Existing syslog format is DEPRECATED
|
||||||
# during I, and will change in J to honor RFC5424. (boolean
|
# and will be changed later to honor RFC5424. (boolean value)
|
||||||
# value)
|
|
||||||
#use_syslog=false
|
#use_syslog=false
|
||||||
|
|
||||||
# (Optional) Enables or disables syslog rfc5424 format for
|
# (Optional) Enables or disables syslog rfc5424 format for
|
||||||
# logging. If enabled, prefixes the MSG part of the syslog
|
# logging. If enabled, prefixes the MSG part of the syslog
|
||||||
# message with APP-NAME (RFC5424). The format without the APP-
|
# message with APP-NAME (RFC5424). The format without the APP-
|
||||||
# NAME is deprecated in K, and will be removed in L, along
|
# NAME is deprecated in K, and will be removed in M, along
|
||||||
# with this option. (boolean value)
|
# with this option. (boolean value)
|
||||||
#use_syslog_rfc_format=true
|
#use_syslog_rfc_format=true
|
||||||
|
|
||||||
@@ -72,7 +172,7 @@
|
|||||||
|
|
||||||
# Prefix each line of exception output with this format.
|
# Prefix each line of exception output with this format.
|
||||||
# (string value)
|
# (string value)
|
||||||
#logging_exception_prefix=%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s
|
#logging_exception_prefix=%(asctime)s.%(msecs)03d %(process)d ERROR %(name)s %(instance)s
|
||||||
|
|
||||||
# List of logger=LEVEL pairs. (list value)
|
# List of logger=LEVEL pairs. (list value)
|
||||||
#default_log_levels=amqp=WARN,amqplib=WARN,boto=WARN,qpid=WARN,sqlalchemy=WARN,suds=INFO,oslo.messaging=INFO,iso8601=WARN,requests.packages.urllib3.connectionpool=WARN,urllib3.connectionpool=WARN,websocket=WARN,requests.packages.urllib3.util.retry=WARN,urllib3.util.retry=WARN,keystonemiddleware=WARN,routes.middleware=WARN,stevedore=WARN
|
#default_log_levels=amqp=WARN,amqplib=WARN,boto=WARN,qpid=WARN,sqlalchemy=WARN,suds=INFO,oslo.messaging=INFO,iso8601=WARN,requests.packages.urllib3.connectionpool=WARN,urllib3.connectionpool=WARN,websocket=WARN,requests.packages.urllib3.util.retry=WARN,urllib3.util.retry=WARN,keystonemiddleware=WARN,routes.middleware=WARN,stevedore=WARN
|
||||||
@@ -81,10 +181,6 @@
|
|||||||
# value)
|
# value)
|
||||||
#publish_errors=false
|
#publish_errors=false
|
||||||
|
|
||||||
# Enables or disables fatal status of deprecations. (boolean
|
|
||||||
# value)
|
|
||||||
#fatal_deprecations=false
|
|
||||||
|
|
||||||
# The format for an instance that is passed with the log
|
# The format for an instance that is passed with the log
|
||||||
# message. (string value)
|
# message. (string value)
|
||||||
#instance_format="[instance: %(uuid)s] "
|
#instance_format="[instance: %(uuid)s] "
|
||||||
@@ -93,103 +189,9 @@
|
|||||||
# message. (string value)
|
# message. (string value)
|
||||||
#instance_uuid_format="[instance: %(uuid)s] "
|
#instance_uuid_format="[instance: %(uuid)s] "
|
||||||
|
|
||||||
|
# Enables or disables fatal status of deprecations. (boolean
|
||||||
#
|
|
||||||
# Options defined in oslo.messaging
|
|
||||||
#
|
|
||||||
|
|
||||||
# ZeroMQ bind address. Should be a wildcard (*), an ethernet
|
|
||||||
# interface, or IP. The "host" option should point or resolve
|
|
||||||
# to this address. (string value)
|
|
||||||
#rpc_zmq_bind_address=*
|
|
||||||
|
|
||||||
# MatchMaker driver. (string value)
|
|
||||||
#rpc_zmq_matchmaker=local
|
|
||||||
|
|
||||||
# ZeroMQ receiver listening port. (integer value)
|
|
||||||
#rpc_zmq_port=9501
|
|
||||||
|
|
||||||
# Number of ZeroMQ contexts, defaults to 1. (integer value)
|
|
||||||
#rpc_zmq_contexts=1
|
|
||||||
|
|
||||||
# Maximum number of ingress messages to locally buffer per
|
|
||||||
# topic. Default is unlimited. (integer value)
|
|
||||||
#rpc_zmq_topic_backlog=<None>
|
|
||||||
|
|
||||||
# Directory for holding IPC sockets. (string value)
|
|
||||||
#rpc_zmq_ipc_dir=/var/run/openstack
|
|
||||||
|
|
||||||
# Name of this node. Must be a valid hostname, FQDN, or IP
|
|
||||||
# address. Must match "host" option, if running Nova. (string
|
|
||||||
# value)
|
# value)
|
||||||
#rpc_zmq_host=ironic
|
#fatal_deprecations=false
|
||||||
|
|
||||||
# Seconds to wait before a cast expires (TTL). Only supported
|
|
||||||
# by impl_zmq. (integer value)
|
|
||||||
#rpc_cast_timeout=30
|
|
||||||
|
|
||||||
# Heartbeat frequency. (integer value)
|
|
||||||
#matchmaker_heartbeat_freq=300
|
|
||||||
|
|
||||||
# Heartbeat time-to-live. (integer value)
|
|
||||||
#matchmaker_heartbeat_ttl=600
|
|
||||||
|
|
||||||
# Size of RPC thread pool. (integer value)
|
|
||||||
#rpc_thread_pool_size=64
|
|
||||||
|
|
||||||
# The Drivers(s) to handle sending notifications. Possible
|
|
||||||
# values are messaging, messagingv2, routing,log, test, noop
|
|
||||||
# (multi valued)
|
|
||||||
#notification_driver=
|
|
||||||
|
|
||||||
# AMQP topic used for OpenStack notifications. (list value)
|
|
||||||
# Deprecated group/name - [rpc_notifier2]/topics
|
|
||||||
#notification_topics=notifications
|
|
||||||
|
|
||||||
# Seconds to wait for a response from a call. (integer value)
|
|
||||||
#rpc_response_timeout=60
|
|
||||||
|
|
||||||
# A URL representing the messaging driver to use and its full
|
|
||||||
# configuration. If not set, we fall back to the rpc_backend
|
|
||||||
# option and driver specific configuration. (string value)
|
|
||||||
#transport_url=<None>
|
|
||||||
|
|
||||||
# The messaging driver to use, defaults to rabbit. Other
|
|
||||||
# drivers include qpid and zmq. (string value)
|
|
||||||
#rpc_backend=rabbit
|
|
||||||
|
|
||||||
# The default exchange under which topics are scoped. May be
|
|
||||||
# overridden by an exchange name specified in the
|
|
||||||
# transport_url option. (string value)
|
|
||||||
#control_exchange=openstack
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Options defined in oslo.service.service
|
|
||||||
#
|
|
||||||
|
|
||||||
# Enable eventlet backdoor. Acceptable values are 0, <port>,
|
|
||||||
# and <start>:<end>, where 0 results in listening on a random
|
|
||||||
# tcp port number; <port> results in listening on the
|
|
||||||
# specified port number (and not enabling backdoor if that
|
|
||||||
# port is in use); and <start>:<end> results in listening on
|
|
||||||
# the smallest unused port number within the specified range
|
|
||||||
# of port numbers. The chosen port is displayed in the
|
|
||||||
# service's log file. (string value)
|
|
||||||
#backdoor_port=<None>
|
|
||||||
|
|
||||||
# Enables or disables logging values of all registered options
|
|
||||||
# when starting a service (at DEBUG level). (boolean value)
|
|
||||||
#log_options=true
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Options defined in oslo.service.periodic_task
|
|
||||||
#
|
|
||||||
|
|
||||||
# Some periodic tasks can be run in a separate process. Should
|
|
||||||
# we run them here? (boolean value)
|
|
||||||
#run_external_periodic_tasks=true
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -329,9 +331,9 @@
|
|||||||
# commands as root. (string value)
|
# commands as root. (string value)
|
||||||
#rootwrap_config=/etc/ironic/rootwrap.conf
|
#rootwrap_config=/etc/ironic/rootwrap.conf
|
||||||
|
|
||||||
# Explicitly specify the temporary working directory. (string
|
# Temporary working directory, default is Python temp dir.
|
||||||
# value)
|
# (string value)
|
||||||
#tempdir=<None>
|
#tempdir=/tmp
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -343,15 +345,6 @@
|
|||||||
#parallel_image_downloads=false
|
#parallel_image_downloads=false
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Options defined in ironic.openstack.common.versionutils
|
|
||||||
#
|
|
||||||
|
|
||||||
# Enables or disables fatal status of deprecations. (boolean
|
|
||||||
# value)
|
|
||||||
#fatal_deprecations=false
|
|
||||||
|
|
||||||
|
|
||||||
[agent]
|
[agent]
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -733,6 +726,13 @@
|
|||||||
# sleeping 1 second between attempts. (integer value)
|
# sleeping 1 second between attempts. (integer value)
|
||||||
#iscsi_verify_attempts=3
|
#iscsi_verify_attempts=3
|
||||||
|
|
||||||
|
# ironic-conductor node's HTTP server URL. Example:
|
||||||
|
# http://192.1.2.3:8080 (string value)
|
||||||
|
#http_url=<None>
|
||||||
|
|
||||||
|
# ironic-conductor node's HTTP root path. (string value)
|
||||||
|
#http_root=/httpboot
|
||||||
|
|
||||||
|
|
||||||
[dhcp]
|
[dhcp]
|
||||||
|
|
||||||
@@ -1364,8 +1364,17 @@
|
|||||||
# Auto-delete queues in AMQP. (boolean value)
|
# Auto-delete queues in AMQP. (boolean value)
|
||||||
#amqp_auto_delete=false
|
#amqp_auto_delete=false
|
||||||
|
|
||||||
# Size of RPC connection pool. (integer value)
|
# Send a single AMQP reply to call message. The current
|
||||||
#rpc_conn_pool_size=30
|
# behaviour since oslo-incubator is to send two AMQP replies -
|
||||||
|
# first one with the payload, a second one to ensure the other
|
||||||
|
# have finish to send the payload. We are going to remove it
|
||||||
|
# in the N release, but we must keep backward compatible at
|
||||||
|
# the same time. This option provides such compatibility - it
|
||||||
|
# defaults to False in Liberty and can be turned on for early
|
||||||
|
# adopters with a new installations or for testing. Please
|
||||||
|
# note, that this option will be removed in M release.
|
||||||
|
# (boolean value)
|
||||||
|
#send_single_reply=false
|
||||||
|
|
||||||
# Qpid broker hostname. (string value)
|
# Qpid broker hostname. (string value)
|
||||||
#qpid_hostname=ironic
|
#qpid_hostname=ironic
|
||||||
@@ -1423,8 +1432,17 @@
|
|||||||
# Auto-delete queues in AMQP. (boolean value)
|
# Auto-delete queues in AMQP. (boolean value)
|
||||||
#amqp_auto_delete=false
|
#amqp_auto_delete=false
|
||||||
|
|
||||||
# Size of RPC connection pool. (integer value)
|
# Send a single AMQP reply to call message. The current
|
||||||
#rpc_conn_pool_size=30
|
# behaviour since oslo-incubator is to send two AMQP replies -
|
||||||
|
# first one with the payload, a second one to ensure the other
|
||||||
|
# have finish to send the payload. We are going to remove it
|
||||||
|
# in the N release, but we must keep backward compatible at
|
||||||
|
# the same time. This option provides such compatibility - it
|
||||||
|
# defaults to False in Liberty and can be turned on for early
|
||||||
|
# adopters with a new installations or for testing. Please
|
||||||
|
# note, that this option will be removed in M release.
|
||||||
|
# (boolean value)
|
||||||
|
#send_single_reply=false
|
||||||
|
|
||||||
# SSL version to use (valid only if SSL enabled). Valid values
|
# SSL version to use (valid only if SSL enabled). Valid values
|
||||||
# are TLSv1 and SSLv23. SSLv2, SSLv3, TLSv1_1, and TLSv1_2 may
|
# are TLSv1 and SSLv23. SSLv2, SSLv3, TLSv1_1, and TLSv1_2 may
|
||||||
@@ -1445,6 +1463,11 @@
|
|||||||
# consumer cancel notification. (floating point value)
|
# consumer cancel notification. (floating point value)
|
||||||
#kombu_reconnect_delay=1.0
|
#kombu_reconnect_delay=1.0
|
||||||
|
|
||||||
|
# How long to wait before considering a reconnect attempt to
|
||||||
|
# have failed. This value should not be longer than
|
||||||
|
# rpc_response_timeout. (integer value)
|
||||||
|
#kombu_reconnect_timeout=60
|
||||||
|
|
||||||
# The RabbitMQ broker address where a single node is used.
|
# The RabbitMQ broker address where a single node is used.
|
||||||
# (string value)
|
# (string value)
|
||||||
#rabbit_host=ironic
|
#rabbit_host=ironic
|
||||||
@@ -1490,7 +1513,7 @@
|
|||||||
|
|
||||||
# Number of seconds after which the Rabbit broker is
|
# Number of seconds after which the Rabbit broker is
|
||||||
# considered down if heartbeat's keep-alive fails (0 disable
|
# considered down if heartbeat's keep-alive fails (0 disable
|
||||||
# the heartbeat). (integer value)
|
# the heartbeat). EXPERIMENTAL (integer value)
|
||||||
#heartbeat_timeout_threshold=60
|
#heartbeat_timeout_threshold=60
|
||||||
|
|
||||||
# How often times during the heartbeat_timeout_threshold we
|
# How often times during the heartbeat_timeout_threshold we
|
||||||
@@ -1588,13 +1611,6 @@
|
|||||||
# Bootfile DHCP parameter for UEFI boot mode. (string value)
|
# Bootfile DHCP parameter for UEFI boot mode. (string value)
|
||||||
#uefi_pxe_bootfile_name=elilo.efi
|
#uefi_pxe_bootfile_name=elilo.efi
|
||||||
|
|
||||||
# ironic-conductor node's HTTP server URL. Example:
|
|
||||||
# http://192.1.2.3:8080 (string value)
|
|
||||||
#http_url=<None>
|
|
||||||
|
|
||||||
# ironic-conductor node's HTTP root path. (string value)
|
|
||||||
#http_root=/httpboot
|
|
||||||
|
|
||||||
# Enable iPXE boot. (boolean value)
|
# Enable iPXE boot. (boolean value)
|
||||||
#ipxe_enabled=false
|
#ipxe_enabled=false
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ PXE_CFG_DIR_NAME = 'pxelinux.cfg'
|
|||||||
def get_root_dir():
|
def get_root_dir():
|
||||||
"""Returns the directory where the config files and images will live."""
|
"""Returns the directory where the config files and images will live."""
|
||||||
if CONF.pxe.ipxe_enabled:
|
if CONF.pxe.ipxe_enabled:
|
||||||
return CONF.pxe.http_root
|
return CONF.deploy.http_root
|
||||||
else:
|
else:
|
||||||
return CONF.pxe.tftp_root
|
return CONF.pxe.tftp_root
|
||||||
|
|
||||||
@@ -251,7 +251,7 @@ def dhcp_options_for_instance(task):
|
|||||||
dhcp_opts = []
|
dhcp_opts = []
|
||||||
if CONF.pxe.ipxe_enabled:
|
if CONF.pxe.ipxe_enabled:
|
||||||
script_name = os.path.basename(CONF.pxe.ipxe_boot_script)
|
script_name = os.path.basename(CONF.pxe.ipxe_boot_script)
|
||||||
ipxe_script_url = '/'.join([CONF.pxe.http_url, script_name])
|
ipxe_script_url = '/'.join([CONF.deploy.http_url, script_name])
|
||||||
dhcp_provider_name = dhcp_factory.CONF.dhcp.dhcp_provider
|
dhcp_provider_name = dhcp_factory.CONF.dhcp.dhcp_provider
|
||||||
# if the request comes from dumb firmware send them the iPXE
|
# if the request comes from dumb firmware send them the iPXE
|
||||||
# boot image.
|
# boot image.
|
||||||
|
|||||||
@@ -63,8 +63,15 @@ deploy_opts = [
|
|||||||
default=3,
|
default=3,
|
||||||
help=_('Maximum attempts to verify an iSCSI connection is '
|
help=_('Maximum attempts to verify an iSCSI connection is '
|
||||||
'active, sleeping 1 second between attempts.')),
|
'active, sleeping 1 second between attempts.')),
|
||||||
|
cfg.StrOpt('http_url',
|
||||||
|
help='ironic-conductor node\'s HTTP server URL. '
|
||||||
|
'Example: http://192.1.2.3:8080',
|
||||||
|
deprecated_group='pxe'),
|
||||||
|
cfg.StrOpt('http_root',
|
||||||
|
default='/httpboot',
|
||||||
|
help='ironic-conductor node\'s HTTP root path.',
|
||||||
|
deprecated_group='pxe'),
|
||||||
]
|
]
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
CONF.register_opts(deploy_opts, group='deploy')
|
CONF.register_opts(deploy_opts, group='deploy')
|
||||||
|
|
||||||
|
|||||||
@@ -75,12 +75,6 @@ pxe_opts = [
|
|||||||
cfg.StrOpt('uefi_pxe_bootfile_name',
|
cfg.StrOpt('uefi_pxe_bootfile_name',
|
||||||
default='elilo.efi',
|
default='elilo.efi',
|
||||||
help=_('Bootfile DHCP parameter for UEFI boot mode.')),
|
help=_('Bootfile DHCP parameter for UEFI boot mode.')),
|
||||||
cfg.StrOpt('http_url',
|
|
||||||
help=_('ironic-conductor node\'s HTTP server URL. '
|
|
||||||
'Example: http://192.1.2.3:8080')),
|
|
||||||
cfg.StrOpt('http_root',
|
|
||||||
default='/httpboot',
|
|
||||||
help=_('ironic-conductor node\'s HTTP root path.')),
|
|
||||||
cfg.BoolOpt('ipxe_enabled',
|
cfg.BoolOpt('ipxe_enabled',
|
||||||
default=False,
|
default=False,
|
||||||
help=_('Enable iPXE boot.')),
|
help=_('Enable iPXE boot.')),
|
||||||
@@ -168,13 +162,15 @@ def _build_pxe_config_options(node, pxe_info, ctx):
|
|||||||
ramdisk = 'no_ramdisk'
|
ramdisk = 'no_ramdisk'
|
||||||
|
|
||||||
if CONF.pxe.ipxe_enabled:
|
if CONF.pxe.ipxe_enabled:
|
||||||
deploy_kernel = '/'.join([CONF.pxe.http_url, node.uuid,
|
deploy_kernel = '/'.join([CONF.deploy.http_url, node.uuid,
|
||||||
'deploy_kernel'])
|
'deploy_kernel'])
|
||||||
deploy_ramdisk = '/'.join([CONF.pxe.http_url, node.uuid,
|
deploy_ramdisk = '/'.join([CONF.deploy.http_url, node.uuid,
|
||||||
'deploy_ramdisk'])
|
'deploy_ramdisk'])
|
||||||
if not is_whole_disk_image:
|
if not is_whole_disk_image:
|
||||||
kernel = '/'.join([CONF.pxe.http_url, node.uuid, 'kernel'])
|
kernel = '/'.join([CONF.deploy.http_url, node.uuid,
|
||||||
ramdisk = '/'.join([CONF.pxe.http_url, node.uuid, 'ramdisk'])
|
'kernel'])
|
||||||
|
ramdisk = '/'.join([CONF.deploy.http_url, node.uuid,
|
||||||
|
'ramdisk'])
|
||||||
else:
|
else:
|
||||||
deploy_kernel = pxe_info['deploy_kernel'][1]
|
deploy_kernel = pxe_info['deploy_kernel'][1]
|
||||||
deploy_ramdisk = pxe_info['deploy_ramdisk'][1]
|
deploy_ramdisk = pxe_info['deploy_ramdisk'][1]
|
||||||
@@ -329,7 +325,8 @@ class PXEDeploy(base.DeployInterface):
|
|||||||
boot_mode = deploy_utils.get_boot_mode_for_deploy(task.node)
|
boot_mode = deploy_utils.get_boot_mode_for_deploy(task.node)
|
||||||
|
|
||||||
if CONF.pxe.ipxe_enabled:
|
if CONF.pxe.ipxe_enabled:
|
||||||
if not CONF.pxe.http_url or not CONF.pxe.http_root:
|
if (not CONF.deploy.http_url or
|
||||||
|
not CONF.deploy.http_root):
|
||||||
raise exception.MissingParameterValue(_(
|
raise exception.MissingParameterValue(_(
|
||||||
"iPXE boot is enabled but no HTTP URL or HTTP "
|
"iPXE boot is enabled but no HTTP URL or HTTP "
|
||||||
"root was specified."))
|
"root was specified."))
|
||||||
@@ -417,7 +414,7 @@ class PXEDeploy(base.DeployInterface):
|
|||||||
if CONF.pxe.ipxe_enabled:
|
if CONF.pxe.ipxe_enabled:
|
||||||
# Copy the iPXE boot script to HTTP root directory
|
# Copy the iPXE boot script to HTTP root directory
|
||||||
bootfile_path = os.path.join(
|
bootfile_path = os.path.join(
|
||||||
CONF.pxe.http_root,
|
CONF.deploy.http_root,
|
||||||
os.path.basename(CONF.pxe.ipxe_boot_script))
|
os.path.basename(CONF.pxe.ipxe_boot_script))
|
||||||
shutil.copyfile(CONF.pxe.ipxe_boot_script, bootfile_path)
|
shutil.copyfile(CONF.pxe.ipxe_boot_script, bootfile_path)
|
||||||
pxe_info = _get_image_info(node, task.context)
|
pxe_info = _get_image_info(node, task.context)
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ class PXEPrivateMethodsTestCase(db_base.DbTestCase):
|
|||||||
if ipxe_enabled:
|
if ipxe_enabled:
|
||||||
http_url = 'http://192.1.2.3:1234'
|
http_url = 'http://192.1.2.3:1234'
|
||||||
self.config(ipxe_enabled=True, group='pxe')
|
self.config(ipxe_enabled=True, group='pxe')
|
||||||
self.config(http_url=http_url, group='pxe')
|
self.config(http_url=http_url, group='deploy')
|
||||||
|
|
||||||
deploy_kernel = os.path.join(http_url, self.node.uuid,
|
deploy_kernel = os.path.join(http_url, self.node.uuid,
|
||||||
'deploy_kernel')
|
'deploy_kernel')
|
||||||
@@ -225,7 +225,7 @@ class PXEPrivateMethodsTestCase(db_base.DbTestCase):
|
|||||||
'deploy_ramdisk')
|
'deploy_ramdisk')
|
||||||
kernel = os.path.join(http_url, self.node.uuid, 'kernel')
|
kernel = os.path.join(http_url, self.node.uuid, 'kernel')
|
||||||
ramdisk = os.path.join(http_url, self.node.uuid, 'ramdisk')
|
ramdisk = os.path.join(http_url, self.node.uuid, 'ramdisk')
|
||||||
root_dir = CONF.pxe.http_root
|
root_dir = CONF.deploy.http_root
|
||||||
else:
|
else:
|
||||||
deploy_kernel = os.path.join(CONF.pxe.tftp_root, self.node.uuid,
|
deploy_kernel = os.path.join(CONF.pxe.tftp_root, self.node.uuid,
|
||||||
'deploy_kernel')
|
'deploy_kernel')
|
||||||
@@ -317,13 +317,13 @@ class PXEPrivateMethodsTestCase(db_base.DbTestCase):
|
|||||||
if ipxe_enabled:
|
if ipxe_enabled:
|
||||||
http_url = 'http://192.1.2.3:1234'
|
http_url = 'http://192.1.2.3:1234'
|
||||||
self.config(ipxe_enabled=True, group='pxe')
|
self.config(ipxe_enabled=True, group='pxe')
|
||||||
self.config(http_url=http_url, group='pxe')
|
self.config(http_url=http_url, group='deploy')
|
||||||
|
|
||||||
deploy_kernel = os.path.join(http_url, self.node.uuid,
|
deploy_kernel = os.path.join(http_url, self.node.uuid,
|
||||||
'deploy_kernel')
|
'deploy_kernel')
|
||||||
deploy_ramdisk = os.path.join(http_url, self.node.uuid,
|
deploy_ramdisk = os.path.join(http_url, self.node.uuid,
|
||||||
'deploy_ramdisk')
|
'deploy_ramdisk')
|
||||||
root_dir = CONF.pxe.http_root
|
root_dir = CONF.deploy.http_root
|
||||||
else:
|
else:
|
||||||
deploy_kernel = os.path.join(CONF.pxe.tftp_root, self.node.uuid,
|
deploy_kernel = os.path.join(CONF.pxe.tftp_root, self.node.uuid,
|
||||||
'deploy_kernel')
|
'deploy_kernel')
|
||||||
@@ -399,7 +399,8 @@ class PXEPrivateMethodsTestCase(db_base.DbTestCase):
|
|||||||
mock_ensure_tree):
|
mock_ensure_tree):
|
||||||
self.config(ipxe_enabled=True, group='pxe')
|
self.config(ipxe_enabled=True, group='pxe')
|
||||||
fake_pxe_info = {'foo': 'bar'}
|
fake_pxe_info = {'foo': 'bar'}
|
||||||
expected_path = os.path.join(CONF.pxe.http_root, self.node.uuid)
|
expected_path = os.path.join(CONF.deploy.http_root,
|
||||||
|
self.node.uuid)
|
||||||
|
|
||||||
pxe._cache_ramdisk_kernel(self.context, self.node, fake_pxe_info)
|
pxe._cache_ramdisk_kernel(self.context, self.node, fake_pxe_info)
|
||||||
mock_ensure_tree.assert_called_with(expected_path)
|
mock_ensure_tree.assert_called_with(expected_path)
|
||||||
@@ -570,7 +571,7 @@ class PXEDriverTestCase(db_base.DbTestCase):
|
|||||||
mock_glance.return_value = {'properties': {'kernel_id': 'fake-kernel',
|
mock_glance.return_value = {'properties': {'kernel_id': 'fake-kernel',
|
||||||
'ramdisk_id': 'fake-initr'}}
|
'ramdisk_id': 'fake-initr'}}
|
||||||
self.config(ipxe_enabled=True, group='pxe')
|
self.config(ipxe_enabled=True, group='pxe')
|
||||||
self.config(http_url='dummy_url', group='pxe')
|
self.config(http_url='dummy_url', group='deploy')
|
||||||
with task_manager.acquire(self.context, self.node.uuid,
|
with task_manager.acquire(self.context, self.node.uuid,
|
||||||
shared=True) as task:
|
shared=True) as task:
|
||||||
task.node.properties = properties
|
task.node.properties = properties
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ class TestPXEUtils(db_base.DbTestCase):
|
|||||||
pxe_config_template='ironic/drivers/modules/ipxe_config.template',
|
pxe_config_template='ironic/drivers/modules/ipxe_config.template',
|
||||||
group='pxe'
|
group='pxe'
|
||||||
)
|
)
|
||||||
self.config(http_url='http://1.2.3.4:1234', group='pxe')
|
self.config(http_url='http://1.2.3.4:1234', group='deploy')
|
||||||
rendered_template = pxe_utils._build_pxe_config(
|
rendered_template = pxe_utils._build_pxe_config(
|
||||||
self.ipxe_options, CONF.pxe.pxe_config_template)
|
self.ipxe_options, CONF.pxe.pxe_config_template)
|
||||||
|
|
||||||
@@ -250,7 +250,7 @@ class TestPXEUtils(db_base.DbTestCase):
|
|||||||
|
|
||||||
def test__get_pxe_mac_path_ipxe(self):
|
def test__get_pxe_mac_path_ipxe(self):
|
||||||
self.config(ipxe_enabled=True, group='pxe')
|
self.config(ipxe_enabled=True, group='pxe')
|
||||||
self.config(http_root='/httpboot', group='pxe')
|
self.config(http_root='/httpboot', group='deploy')
|
||||||
mac = '00:11:22:33:AA:BB:CC'
|
mac = '00:11:22:33:AA:BB:CC'
|
||||||
self.assertEqual('/httpboot/pxelinux.cfg/00-11-22-33-aa-bb-cc',
|
self.assertEqual('/httpboot/pxelinux.cfg/00-11-22-33-aa-bb-cc',
|
||||||
pxe_utils._get_pxe_mac_path(mac))
|
pxe_utils._get_pxe_mac_path(mac))
|
||||||
@@ -269,7 +269,7 @@ class TestPXEUtils(db_base.DbTestCase):
|
|||||||
def test_get_root_dir_ipxe(self):
|
def test_get_root_dir_ipxe(self):
|
||||||
expected_dir = '/httpboot'
|
expected_dir = '/httpboot'
|
||||||
self.config(ipxe_enabled=True, group='pxe')
|
self.config(ipxe_enabled=True, group='pxe')
|
||||||
self.config(http_root=expected_dir, group='pxe')
|
self.config(http_root=expected_dir, group='deploy')
|
||||||
self.assertEqual(expected_dir, pxe_utils.get_root_dir())
|
self.assertEqual(expected_dir, pxe_utils.get_root_dir())
|
||||||
|
|
||||||
def test_get_pxe_config_file_path(self):
|
def test_get_pxe_config_file_path(self):
|
||||||
@@ -317,7 +317,7 @@ class TestPXEUtils(db_base.DbTestCase):
|
|||||||
def test_get_deploy_kr_info_ipxe(self):
|
def test_get_deploy_kr_info_ipxe(self):
|
||||||
expected_dir = '/http'
|
expected_dir = '/http'
|
||||||
self.config(ipxe_enabled=True, group='pxe')
|
self.config(ipxe_enabled=True, group='pxe')
|
||||||
self.config(http_root=expected_dir, group='pxe')
|
self.config(http_root=expected_dir, group='deploy')
|
||||||
self._test_get_deploy_kr_info(expected_dir)
|
self._test_get_deploy_kr_info(expected_dir)
|
||||||
|
|
||||||
def test_get_deploy_kr_info_bad_driver_info(self):
|
def test_get_deploy_kr_info_bad_driver_info(self):
|
||||||
@@ -333,7 +333,7 @@ class TestPXEUtils(db_base.DbTestCase):
|
|||||||
self.config(tftp_server='192.0.2.1', group='pxe')
|
self.config(tftp_server='192.0.2.1', group='pxe')
|
||||||
self.config(pxe_bootfile_name='fake-bootfile', group='pxe')
|
self.config(pxe_bootfile_name='fake-bootfile', group='pxe')
|
||||||
self.config(ipxe_enabled=True, group='pxe')
|
self.config(ipxe_enabled=True, group='pxe')
|
||||||
self.config(http_url='http://192.0.3.2:1234', group='pxe')
|
self.config(http_url='http://192.0.3.2:1234', group='deploy')
|
||||||
self.config(ipxe_boot_script='/test/boot.ipxe', group='pxe')
|
self.config(ipxe_boot_script='/test/boot.ipxe', group='pxe')
|
||||||
|
|
||||||
self.config(dhcp_provider='isc', group='dhcp')
|
self.config(dhcp_provider='isc', group='dhcp')
|
||||||
|
|||||||
Reference in New Issue
Block a user