Add configurable option for Ironic master tftp images path
By design, Ironic will be making hardlinks from /var/lib/ironic/master_images into /httpboot. On a machine where /var is on a separate partition, deployment will succeed but operation will fail with some errors like: OSError: [Errno 18] Invalid cross-device link in ironic conductor logs. This patch adds an extra configuration variable which allows the user to configure the path location properly and to overcome this issue. Change-Id: If90b49c75ff1a224d8d539036b89c1c7ee030bd0
This commit is contained in:
@@ -5,6 +5,6 @@
|
|||||||
become: yes
|
become: yes
|
||||||
gather_facts: yes
|
gather_facts: yes
|
||||||
tasks:
|
tasks:
|
||||||
- file: path=/tftpboot/master_images state=absent
|
- file: path="{{ironic_tftp_master_path}}" state=absent
|
||||||
- file: path="{{ipa_kernel}}" state=absent
|
- file: path="{{ipa_kernel}}" state=absent
|
||||||
- file: path="{{ipa_ramdisk}}" state=absent
|
- file: path="{{ipa_ramdisk}}" state=absent
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
# which causes the nodes to be wiped after deletion.
|
# which causes the nodes to be wiped after deletion.
|
||||||
cleaning: false
|
cleaning: false
|
||||||
http_boot_folder: /httpboot
|
http_boot_folder: /httpboot
|
||||||
|
ironic_tftp_master_path: /var/lib/ironic/master_images
|
||||||
staging_drivers_include: false
|
staging_drivers_include: false
|
||||||
file_url_port: "8080"
|
file_url_port: "8080"
|
||||||
ironicclient_source_install: false
|
ironicclient_source_install: false
|
||||||
|
|||||||
@@ -65,11 +65,11 @@
|
|||||||
|
|
||||||
# Similar logic to below can be utilized to retrieve files
|
# Similar logic to below can be utilized to retrieve files
|
||||||
- name: "Determine if folder exists, else create and populate folder."
|
- name: "Determine if folder exists, else create and populate folder."
|
||||||
stat: path=/tftpboot/master_images
|
stat: path="{{ ironic_tftp_master_path }}"
|
||||||
register: test_master_images
|
register: test_master_images
|
||||||
|
|
||||||
- name: "Create master_images folder"
|
- name: "Create master_images folder"
|
||||||
file: name=/tftpboot/master_images state=directory owner=ironic group=ironic
|
file: name="{{ ironic_tftp_master_path }}" state=directory owner=ironic group=ironic
|
||||||
when: test_master_images.stat.exists == false
|
when: test_master_images.stat.exists == false
|
||||||
|
|
||||||
- name: "Inspector - Place default tftp boot file in {{ http_boot_folder}}/pxelinux.cfg/"
|
- name: "Inspector - Place default tftp boot file in {{ http_boot_folder}}/pxelinux.cfg/"
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ tftp_root = /tftpboot
|
|||||||
pxe_bootfile_name = undionly.kpxe
|
pxe_bootfile_name = undionly.kpxe
|
||||||
ipxe_enabled = true
|
ipxe_enabled = true
|
||||||
ipxe_boot_script = /etc/ironic/boot.ipxe
|
ipxe_boot_script = /etc/ironic/boot.ipxe
|
||||||
tftp_master_path = /var/lib/ironic/master_images
|
tftp_master_path = {{ ironic_tftp_master_path }}
|
||||||
|
|
||||||
[deploy]
|
[deploy]
|
||||||
http_url = http://{{ hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'] }}:{{ file_url_port }}/
|
http_url = http://{{ hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'] }}:{{ file_url_port }}/
|
||||||
|
|||||||
Reference in New Issue
Block a user