Actions
Bug #18365
openforeman-answers.yaml from /usr/share stored instead of /etc/foreman-installer
Description
Since Foreman 1.14, foreman-debug is storing an incorrect version of the file in the tarball at etc/foreman-installer/scenarios.d/foreman-answers.yaml.
Originals:
# ls -l /etc/foreman-installer/scenarios.d/foreman-answers* -rw-------. 1 root root 14016 Feb 2 04:18 /etc/foreman-installer/scenarios.d/foreman-answers.yaml -rw-------. 1 root root 2111 Jan 25 22:30 /etc/foreman-installer/scenarios.d/foreman-answers.yaml.rpmnew
With nightly:
# ls -l /tmp/foreman-debug-Owysl/etc/foreman-installer/scenarios.d/foreman-answers* -rw-r--r--. 1 root root 2111 Feb 2 05:00 /tmp/foreman-debug-Owysl/etc/foreman-installer/scenarios.d/foreman-answers.yaml -rw-r--r--. 1 root root 2111 Feb 2 05:00 /tmp/foreman-debug-Owysl/etc/foreman-installer/scenarios.d/foreman-answers.yaml.rpmnew
With 1.13.4:
# ls -l /tmp/foreman-debug-g68Ro/etc/foreman-installer/scenarios.d/foreman-answers* -rw-r--r--. 1 root root 13959 Feb 2 04:59 /tmp/foreman-debug-g68Ro/etc/foreman-installer/scenarios.d/foreman-answers.yaml -rw-r--r--. 1 root root 2111 Feb 2 04:59 /tmp/foreman-debug-g68Ro/etc/foreman-installer/scenarios.d/foreman-answers.yaml.rpmnew
Debugging shows that the add_files() find command is probably traversing through /etc/foreman-installer/scenarios.d/foreman.migrations/.. as add_files is called with /etc/foreman-installer/scenarios.d/*/.* and foreman.migrations is a symlink to /usr/share/foreman-installer/config/foreman.migrations.
add_files then stores /usr/share/foreman-installer/config/foreman-answers.yaml, replacing the file of the same name.
Files
Actions