How to provide files to Red Hat Support (vmcore, rhev logcollector, sosreports, heap dumps, log files, etc.)

Solution Verified - Updated -

Environment

  • Files that needs to be sent to Red Hat Support
  • Red Hat Secure FTP - sftp.access.redhat.com ("User Guide")
  • Note: Do not send files via email attachment to a support case:
    • While the text body of an email reply to a case is captured as a comment within the case, any and all email attachments are stripped and discarded. Instead of email attachments, use one of the methods outlined within the 'Resolutions' section below.

Issue

  • How to provide files to Red Hat Support

    • Production server crashed, how to attach document, screenshot, crashdump(kdump)?
    • After hard reboot, collected data like tcpdump, strace, top, ps, vmstat, iostat and reports for analysis. Whom can I send ?
    • System hang and would like to know the reason behind it, where can I provide data for analysis ?
    • How can I attach a file to a Red Hat support case?
    • Need to upload a file to the support team.
    • Need to attach a file to a Red Hat support case.
  • How to provide large files to Red Hat Support (vmcore, rhev logcollector, large sosreports, heap dumps, large log files, etc.)

    • Customer portal uploader supports uploading of attachments of 250GB each.
    • The redhat-support-tool supports uploading files 1GB or less only, how to upload large files to Red Hat Technical Support?
  • How to upload files to Red Hat's Secure FTP (sftp.access.redhat.com)?

Resolution

Contents

  1. Upload files via Customer Portal
  2. Automatic upload of sos reports during archive creation
  3. Red Hat Support Tool
  4. Secure FTP
  5. Splitting files into parts for upload
  6. Computing file digests

Upload files via Customer Portal

You can now upload files up to 250GB in size directly to the Customer Portal. There is no longer any need to use a separate mechanism for uploading large files. Refer to Attaching files via Portal UI for attaching files via the Red Hat Customer Portal.

There is a known issue with the IE browser timing out with uploads that take longer than 15 minutes. This should only happen with extremely large uploads. If you need to provide very large files, please use Chrome/Firefox or FTP until a fix is available.

Automatic upload of sos reports during archive creation

As of sos-3.9 and later, sos supports the --upload option to automatically upload an archive once it is generated. Note that a local copy of the archive will still exist.

When run on a Red Hat Enterprise Linux system, using the --upload option will prompt the user for their Customer Portal credentials:

# sosreport --upload

sosreport (version 4.2)

[...]

Please enter the case id that you are generating this report for []: 123456
Enter your Red Hat Customer Portal username (empty to use public dropbox): your-username
Please provide the upload password for your-username: 

[...]

Your sosreport has been generated and saved in:
    /var/tmp/sosreport-myhost-123456-2022-08-11-sgczqyo.tar.xz

Attempting upload to Red Hat Customer Portal
Uploaded archive successfully

By providing a case number and login credentials which are capable of accessing the specified case number, sos will upload the resulting archive directly to the case upon completion. If either of these are not provided or are incorrect (e.g. an incorrect case number for the credentials provided), then sos will fallback to uploading the archive to Red Hat's secure FTP server:

# sos report --upload

sosreport (version 4.2)

[...]

Please enter the case id that you are generating this report for []: 123456
Enter your Red Hat Customer Portal username (empty to use public dropbox): incorrect-user
Please provide the upload password for your-username: 

[...]

Your sosreport has been generated and saved in:
    /var/tmp/sosreport-myhost-123456-2022-08-11-hyrtzji.tar.xz

Attempting upload to Red Hat Customer Portal
Upload to Red Hat Customer Portal failed. Trying sftp://sftp.access.redhat.com
Attempting upload to Red Hat Secure FTP
Unable to retrieve Red Hat auth token using provided credentials. Will try anonymous.
User 'xAnrDdnP'used for anonymous upload. Please inform your support engineer so they may retrieve the data.
Uploaded archive successfully

Note: The anonymous user is a temporary user that may not be re-used, and must be provided to your support engineer in the relevant support case so that the engineer will be able to retrieve and review the archive.

The following methods are available for providing --upload credentials:

  1. Use --upload as demonstrated above, and use the interactive prompts
  2. Use the --upload-user and --upload-pass to provide the credentials without a prompt. This may be useful when using --batch to avoid interactive executions of sos report. Note however, that this will result in the plaintext password being captured by various process information collections, such as ps.
  3. Use the SOSUPLOADUSER and/or SOSUPLOADPASSWORD environment variables. If set, the --upload function will not prompt for credentials, and these values will not appear in any collections within the archive.

Red Hat Support Tool

Note: Red Hat Support tool has overcome the restriction of 1GB for each single file upload in the newer versions of the tool (starting from redhat-support-tool >= 0.13.0) for active minor versions of RHEL 7 and RHEL 8. Now, files greater than 1GB also can be directly uploaded to the case. This has been addressed via RHBZ Bug 1765392 and has been fixed with erratum RHBA-2022:0623.

Note: For RHEL 6, there is still a size restriction of 1GB for each single file uploaded, and the RHEL 6 build will soon stop working. For more details see this solution

Note: redhat-support-tool will not be shipped in RHEL 9 onwards

  • To Case directly: To upload files directly from your system, you can also use Red Hat Support Tool (redhat-support-tool). It gives you flexibility and also scripting capabilities. The simplest way to upload files, e.g.: sosreport, is this:

    $ redhat-support-tool addattachment -c CASE_NUMBER /path/to/sosreport
    

For large files, you may add the -s option. This may only be needed in case you have a slow bandwidth or your organization's file transfer connections are timed/capped.

Note: See Red Hat Access: Red Hat Support Tool for more complete information on redhat-support-tool, including installation instructions.

  • To Case via Red Hat Secure FTP:

    • This will upload your file directly to the Customer Portal. If you want to upload to the via the Red Hat Secure FTP, use the "-f" option:

      $ redhat-support-tool addattachment -c CASE_NUMBER -f /path/to/sosreport
      
    • Split Files and upload to Secure FTP: This is no longer supported. Please see the RHEL 8.5 Release Notes for more details.

Secure FTP

Red Hat’s new Secure FTP platform has been made available: sftp.access.redhat.com

The new platform replaces our legacy dropbox.redhat.com file sharing platform and aims to provide a sustainable, cross-platform, command-line accessible endpoint for customers to upload files to Red Hat. The new Secure FTP can be used to attach files to support cases, as well as simply share files with Red Hat outside of support cases. You can learn more about how to use the new Secure FTP platform in the "Red Hat Secure FTP - User Guide".

Splitting files into parts for upload

While some customers have no problem uploading 50GB vmcore files to Red Hat, others have problems with anything over 1-2GB in size. Sometimes large uploads do not complete reliably either due to file size or network congestion or other issues resulting in failure to complete the upload successfully. Failed uploads often must be resumed from the beginning of the file.

If you have had trouble uploading a file in the past to either the portal or via redhat-support-tool (or FTP) due to size, network stability, or other issues, then the file can be split into parts and each smaller part uploaded. The current recommendation when splitting a large file, such as a vmcore, into parts is to break the file into 1GB chunks as a starting point. If that still fails, fallback to 512m size and try again.

  • The splitcommand can be used to break a large file into smaller chunks for upload to dropbox.redhat.com or to the support case within the Red Hat Customer Portal. If a single chunk upload fails, only the upload of that chunk needs to be retried.

    • For example, the following splits a large 8.5GiB vmcore file into 9 smaller files for upload. The -b 1024m command line option limits the split file size to a maximum of 1024MB (1GiB) each.

      # ls -ltrh largefile.tar.xz
      -rw-rw-r--. 1 root    root    8.5G Feb 20 13:54 largefile.tar.xz
      # split -b 1024m -a 2 -d largefile.tar.xz largefile.tar.xz.part
      # ls -ltrh largefile.tar.xz.*
      -rw-rw-r--. 1 root root 1.0G Feb 21 10:01 largefile.tar.xz.part00
      -rw-rw-r--. 1 root root 1.0G Feb 21 10:01 largefile.tar.xz.part01
      -rw-rw-r--. 1 root root 1.0G Feb 21 10:01 largefile.tar.xz.part02
      -rw-rw-r--. 1 root root 1.0G Feb 21 10:01 largefile.tar.xz.part03
      -rw-rw-r--. 1 root root 1.0G Feb 21 10:01 largefile.tar.xz.part04
      -rw-rw-r--. 1 root root 1.0G Feb 21 10:01 largefile.tar.xz.part05
      -rw-rw-r--. 1 root root 1.0G Feb 21 10:01 largefile.tar.xz.part06
      -rw-rw-r--. 1 root root 1.0G Feb 21 10:02 largefile.tar.xz.part07
      -rw-rw-r--. 1 root root 508M Feb 21 10:02 largefile.tar.xz.part08
      
    • The parts can be reassembled using cat command.

      # ls -1c -v largefile.tar.xz.part* | xargs -I {} cat {} >> largefile.tar.xz
      
    • See man split for further information and command options.

Computing file digests

  • To compute the MD5 message digest of the files you uploaded, run

     $ md5sum [filename]
    
  • Or, alternatively, to compute the SHA1 message digest of the files you uploaded, run

     $ sha1sum [filename]
    

Firewall Configuration

In case you're behind a firewall, you might want to allow access to the following:

  • HTTP method [Applicable to methods - Upload files via Customer Portal, Automatic upload of sos reports during archive creation, and Red Hat Support Tool]

    • Host: api.access.redhat.com, rh-case-attachments.redhat.com
    • Protocols: HTTP, HTTPS,
    • Ports: 80, 443
    • HTTP Methods: GET, POST, PUT, DELETE
  • FTP Method

    • Host: sftp.access.redhat.com
    • Protocols: SFTP
    • Ports: 22 (default), 80(needs to be configured)

Footnotes

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments