Project

General

Profile

Actions

Bug #18365

open

foreman-answers.yaml from /usr/share stored instead of /etc/foreman-installer

Added by Dominic Cleal over 7 years ago. Updated almost 7 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
foreman-debug
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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

foreman-debug foreman-debug 12.2 KB foreman-debug (at bed4594) Dominic Cleal, 05/22/2017 04:56 AM
foreman-debug.out foreman-debug.out 18.1 KB output from foreman-debug -v -g -a -d /tmp/fd2 Dominic Cleal, 05/22/2017 04:57 AM

Related issues 1 (0 open1 closed)

Related to Foreman - Bug #17044: foreman-debug to collect whole newest (log)files instead of tailing all (log)filesClosedPavel Moravec09/24/2016Actions
Actions

Also available in: Atom PDF