redhat-cop/infra.osbuild

Builder role kickstart ISO inject fails from duplicate error

Closed this issue · 1 comments

When using builder_compose_type=edge-installer, I get a failure from mkksiso that the ISO already exists:

ERROR: Command 'mkksiso /var/www/html/ansible_edge/kickstart.ks /tmp/ansible_edge/ansible_edge-0.0.1.iso /tmp/ansible_edge/ansible_edge-0.0.1.iso' failed with return code: 1 and error message, 'ERROR:/tmp/ansible_edge/ansible_edge-0.0.1.iso already exists\nERROR:Problems running /bin/mkksiso\n'"

If I change the role code here:

- name: Inject kickstart into iso
infra.osbuild.inject_ks:
kickstart: "/var/www/html/{{ builder_blueprint_name }}/kickstart.ks"
src_iso: "/tmp/{{ builder_blueprint_name }}/{{ builder_blueprint_name }}-{{ blueprint_output['current_version'] }}.{{ compose_start_out['result']['output_type'] }}" # noqa yaml[line-length]
dest_iso: "/tmp/{{ builder_blueprint_name }}/{{ builder_blueprint_name }}-{{ blueprint_output['current_version'] }}.{{ compose_start_out['result']['output_type'] }}" # noqa yaml[line-length]
- name: Copy installer to web dir
ansible.builtin.copy:
src: "/tmp/{{ builder_blueprint_name }}/{{ builder_blueprint_name }}-{{ blueprint_output['current_version'] }}.{{ compose_start_out['result']['output_type'] }}" # noqa yaml[line-length]
dest: "/var/www/html/{{ builder_blueprint_name }}/images/{{ builder_blueprint_name }}_{{ _builder_compose_type }}.{{ compose_start_out['result']['output_type'] }}"

using a different temporary filename on lines 215 and 219 (I just put a _ks at the end) then it succeeds. Should lines 214 and 215 really be identical?

@zjpeterson We are having trouble reproducing this issue. Do you have anymore information on how to reproduce this issue?