Follow-up to PXE substrate support

Update to address review comments including rename of the pxe_drivers
setting to enabled_pxe_drivers, and re-use of the variable name for
a list of known pxe drivers that updates the enabled_drivers list.

Change-Id: I85c573a1909ada50c422c0accede056755bd9ce5
This commit is contained in:
Julia Kreger 2015-12-21 15:05:52 -05:00
parent 68a41a97d1
commit bfb26a8d6c
5 changed files with 23 additions and 11 deletions

View File

@ -87,10 +87,10 @@ variable which defaults to: "agent_ipmitool,pxe_amt,agent_ilo,agent_ucs"
By default, PXE driver baseline support, in terms of installation of the By default, PXE driver baseline support, in terms of installation of the
iSCSI client and configuration of sudoers and rootwrap configuration is iSCSI client and configuration of sudoers and rootwrap configuration is
enabled. If you wish to disable this functionality, set ``pxe_drivers`` enabled. If you wish to disable this functionality, set
to a value of ``false``. ``enable_pxe_drivers`` to a value of ``false``.
pxe_drivers: false enable_pxe_drivers: false
In the event of an external DHCP server being used, the user will need to In the event of an external DHCP server being used, the user will need to
configure their DHCP server such that PXE, and iPXE chain loading occurs. configure their DHCP server such that PXE, and iPXE chain loading occurs.

View File

@ -49,8 +49,11 @@ ironic_git_folder: /opt/stack/ironic
ironicclient_git_folder: /opt/stack/python-ironicclient ironicclient_git_folder: /opt/stack/python-ironicclient
shade_git_folder: /opt/stack/shade shade_git_folder: /opt/stack/shade
dib_git_folder: /opt/stack/diskimage-builder dib_git_folder: /opt/stack/diskimage-builder
# Comma-separated list, in the format of a string, of drivers that are enabled. # Comma-separated list, in the format of a string, of drivers that are enabled
enabled_drivers: "agent_ipmitool,pxe_amt,agent_ilo,agent_ucs" # by default. This is intended to be a list of agent based drivers.
# PXE drivers can be found in the setting pxe_drivers that can be found below.
enabled_drivers: "agent_ipmitool,agent_ilo,agent_ucs"
# DHCP pool for requests -- ignored if inventory_dhcp is set to True # DHCP pool for requests -- ignored if inventory_dhcp is set to True
# since IP allocation will be static. # since IP allocation will be static.
dhcp_pool_start: 192.168.1.200 dhcp_pool_start: 192.168.1.200
@ -89,4 +92,9 @@ inspector_port_addition: "pxe"
# Note: inspector_keep_ports has three valid values: all, present, added # Note: inspector_keep_ports has three valid values: all, present, added
inspector_keep_ports: "present" inspector_keep_ports: "present"
pxe_drivers: true
# This enables installation of substrate for PXE driver support
enable_pxe_drivers: true
# Comma-separated list of PXE drivers to enable when
# enable_pxe_drivers is set to true
pxe_drivers: "pxe_amt,pxe_ssh,pxe_ipmitool,pxe_ilo"

View File

@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
--- ---
- name: "Update driver list if PXE drivers are enabled"
set_fact:
enabled_drivers: "{{ enabled_drivers }},{{ pxe_drivers }}"
when: enable_pxe_drivers | bool == true
- name: "Determine if ironic.conf needs to be put in place." - name: "Determine if ironic.conf needs to be put in place."
stat: path=/etc/ironic/ironic.conf stat: path=/etc/ironic/ironic.conf
register: test_place_ironic_config register: test_place_ironic_config
@ -182,4 +186,4 @@
dest: /etc/sudoers dest: /etc/sudoers
regexp: '^ironic(.*)/etc/ironic/rootwrap.conf(.*)' regexp: '^ironic(.*)/etc/ironic/rootwrap.conf(.*)'
line: "ironic ALL = (root) NOPASSWD: /usr/local/bin/ironic-rootwrap /etc/ironic/rootwrap.conf *" line: "ironic ALL = (root) NOPASSWD: /usr/local/bin/ironic-rootwrap /etc/ironic/rootwrap.conf *"
when: pxe_drivers | bool == true when: enable_pxe_drivers | bool == true

View File

@ -68,7 +68,7 @@
package: package:
name: "{{ iscsi_client_package }}" name: "{{ iscsi_client_package }}"
state: present state: present
when: skip_install is not defined and pxe_drivers | bool == true when: skip_install is not defined and enable_pxe_drivers | bool == true
- name: "Shade - Install" - name: "Shade - Install"
include: pip_install.yml include: pip_install.yml
package=shade package=shade
@ -146,7 +146,7 @@
mode: 0644 mode: 0644
owner: root owner: root
group: root group: root
when: skip_install is not defined and pxe_drivers | bool == true when: skip_install is not defined and enable_pxe_drivers | bool == true
- name: "Copy rootwrap.d contents from ironic source folder" - name: "Copy rootwrap.d contents from ironic source folder"
copy: copy:
src: "{{ ironic_git_folder }}/etc/ironic/rootwrap.d/" src: "{{ ironic_git_folder }}/etc/ironic/rootwrap.d/"
@ -155,7 +155,7 @@
owner: root owner: root
group: root group: root
directory_mode: yes directory_mode: yes
when: skip_install is not defined and pxe_drivers | bool == true when: skip_install is not defined and enable_pxe_drivers | bool == true
- name: "Generate ironic Configuration" - name: "Generate ironic Configuration"
include: ironic_config.yml include: ironic_config.yml
- name: "Copy policy.json to /etc/ironic" - name: "Copy policy.json to /etc/ironic"

View File

@ -5,7 +5,7 @@ features:
target node. By default, this support is enabled. target node. By default, this support is enabled.
upgrade: upgrade:
- PXE driver substrate support is now enabled by default. - PXE driver substrate support is now enabled by default.
If a user wishes to prevent this, the ``pxe_drivers`` If a user wishes to prevent this, the ``enable_pxe_drivers``
setting should be set to ``false``. setting should be set to ``false``.
security: security:
- PXE driver support substrate has been added, however - PXE driver support substrate has been added, however