Bug #17754
closedforeman-debug warns the file being collected is the same as an existing file
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1387382
Description of problem:
Running foreman-debug on Satellite 6.3.0 SNAP 5.0 shows a message warning that one of the files being collected matches an existing temporary file.
- foreman-debug
Processing... (takes a while)cp: '/etc/foreman-installer/scenarios.d/foreman.migrations/.applied' and '/tmp/foreman-debug-nFgDu/etc/foreman-installer/scenarios.d/foreman.migrations/.applied' are the same file
The foreman-debug artifact is created, however, and upon investigation it seems to contain the correct files in place.
I would like then to request that the warning message be handled so to not confuse the user with information that may be inconsequential to the action being performed.
Version-Release number of selected component (if applicable):
- Satellite 6.3.0 SNAP 5.0
How reproducible:
Steps to Reproduce:
1. run 'foreman-debug'
2.
3.
Actual results:
Artifact is generated but there is a warning message displayed in the output
Expected results:
Artifact is generated and no warning messages about duplicated files from /tmp should be reported in the output
Additional info:
- foreman-debug
Processing... (takes a while)cp: '/etc/foreman-installer/scenarios.d/foreman.migrations/.applied' and '/tmp/foreman-debug-nFgDu/etc/foreman-installer/scenarios.d/foreman.migrations/.applied' are the same file
Exporting tasks, this may take a few minutes.
Copying entire file: /tmp/task-export-1476986282.tar.gzHOSTNAME: ibm-x3250m4-03.lab.eng.rdu2.redhat.com
OS: redhat
RELEASE: Red Hat Enterprise Linux Server release 7.2 (Maipo)
FOREMAN: 1.13.0
RUBY: ruby 2.0.0p598 (2014-11-13) [x86_64-linux]
PUPPET: 3.8.6
DENIALS: 8
A debug file has been created: /tmp/foreman-debug-nFgDu.tar.xz (463252 bytes)
To upload a tarball to our secure site, please use the -u option.
- tar
tvf /tmp/foreman-debug-nFgDu.tar.xz |grep appliedroot/root 783 2016-10-20 13:57 foreman-debug-nFgDu/etc/foreman-installer/scenarios.d/foreman-migrations-applied
-rw-r--r-rw-r--r-root/root 291 2016-10-20 13:57 foreman-debug-nFgDu/etc/foreman-installer/scenarios.d/capsule.migrations/.appliedrw-r--r-root/root 527 2016-10-20 13:57 foreman-debug-nFgDu/etc/foreman-installer/scenarios.d/katello.migrations/.appliedrw-r--r-root/root 613 2016-10-20 13:57 foreman-debug-nFgDu/etc/foreman-installer/scenarios.d/satellite.migrations/.applied
Updated by Anurag Patel almost 7 years ago
Tried replicating this issue
1. When running foreman-debug shipped with foreman-1.13.4-1.fc24.noarch
[anurag@bb8 ~]$ sudo /usr/sbin/foreman-debug Processing... (takes a while)cp: '/etc/foreman-installer/scenarios.d/foreman.migrations/.applied' and '/tmp/foreman-debug-5HcI5/etc/foreman-installer/scenarios.d/foreman.migrations/.applied' are the same file HOSTNAME: bb8.xxxxxx.redhat.com OS: redhat RELEASE: Fedora release 24 (Twenty Four) FOREMAN: 1.13.4 RUBY: ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux] PUPPET: 4.2.1 DENIALS: 91257 A debug file has been created: /tmp/foreman-debug-5HcI5.tar.xz (1280692 bytes) To upload a tarball to our secure site, please use the -u option. [anurag@bb8 ~]$
2. When running foreman-debug on the same host as (1) above, but shipped in upstream Foreman - develop branch
[anurag@bb8 foreman]$ sudo ./script/foreman-debug Processing... (takes a while) HOSTNAME: bb8.xxxxxx.redhat.com OS: redhat RELEASE: Fedora release 24 (Twenty Four) FOREMAN: 1.13.4 RUBY: ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux] PUPPET: 4.2.1 DENIALS: 91257 A debug file has been created: /tmp/foreman-debug-stwhk.tar.xz (2165948 bytes) To upload a tarball to our secure site, please use the -u option. [anurag@bb8 foreman]$
I suspect this issue may have been fixed as a side effect of another commit [1], that switches from add_files to add_file for copying contents of symlinks.
Updated by Dominic Cleal almost 7 years ago
- Status changed from New to Resolved
- Assignee deleted (
Lukas Zapletal)