Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1387382 - foreman-debug warns the file being collected is the same as an existing file
Summary: foreman-debug warns the file being collected is the same as an existing file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Foreman Debug
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: Unspecified
Assignee: Lukas Zapletal
QA Contact: Chris Roberts
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-20 18:10 UTC by Og Maciel
Modified: 2019-09-25 20:41 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:49:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
foreman-debug (452.39 KB, application/x-xz)
2016-10-20 18:10 UTC, Og Maciel
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 17754 0 None None None 2016-12-19 20:07:35 UTC

Description Og Maciel 2016-10-20 18:10:35 UTC
Created attachment 1212614 [details]
foreman-debug

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.gz


 HOSTNAME: 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 applied
-rw-r--r-- root/root       783 2016-10-20 13:57 foreman-debug-nFgDu/etc/foreman-installer/scenarios.d/foreman-migrations-applied
-rw-r--r-- root/root       291 2016-10-20 13:57 foreman-debug-nFgDu/etc/foreman-installer/scenarios.d/capsule.migrations/.applied
-rw-r--r-- root/root       527 2016-10-20 13:57 foreman-debug-nFgDu/etc/foreman-installer/scenarios.d/katello.migrations/.applied
-rw-r--r-- root/root       613 2016-10-20 13:57 foreman-debug-nFgDu/etc/foreman-installer/scenarios.d/satellite.migrations/.applied

Comment 1 Lukas Zapletal 2016-10-21 12:33:00 UTC
Thanks, weird.

Comment 3 Zach Huntington-Meath 2016-12-19 19:03:30 UTC
Created redmine issue http://projects.theforeman.org/issues/17754 from this bug

Comment 4 Anurag Patel 2017-04-28 14:01:50 UTC
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.

[1] https://github.com/theforeman/foreman/commit/56063713b0044ea7c0f4c18206b6a71c0d922096#diff-530ce7cdbd9b2169eb6a5d364c87b049R126

Comment 5 Satellite Program 2017-04-28 16:18:45 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17754 has been resolved.

Comment 7 Chris Roberts 2017-08-09 18:41:22 UTC
Looks good to me:

[root@sat63-qa-rhel7 ~]# foreman-debug 
Processing... (takes a while)

 HOSTNAME: sat63-qa-rhel7.example.com
       OS: redhat
  RELEASE: Red Hat Enterprise Linux Server release 7.3 (Maipo)
  FOREMAN: 1.15.2
     RUBY: ruby 2.0.0p648 (2015-12-16) [x86_64-linux]
   PUPPET: 3.8.6


A debug file has been created: /tmp/foreman-debug-vKJjD.tar.xz (369420 bytes)

To upload a tarball to our secure site, please use the -u option.

Comment 8 Satellite Program 2018-02-21 16:49:54 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.

For information on the advisory, and where to find the updated files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:0336


Note You need to log in before you can comment on or make changes to this bug.