Project

General

Profile

Actions

Bug #34448

closed

content-view import fails with Error: PG::StringDataRightTruncation: ERROR: value too long for type character varying(255)

Added by Jeremy Lenz about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Inter Server Sync
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2053329

Description of problem:

Importing a content view with long name + long path into a disconnected Satellite failed with:

Exception:
ActiveRecord::ValueTooLong: PG::StringDataRightTruncation: ERROR: value too long for type character varying(255)
Backtrace:

/opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.9.0/lib/audited/auditor.rb:291:in `block in write_audit'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:112:in `block in run_callbacks'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:139:in `run_callbacks'
/opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.9.0/lib/audited/auditor.rb:290:in `write_audit'
/opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.9.0/lib/audited/auditor.rb:269:in `audit_create'

Version-Release number of selected component (if applicable):

6.10.2

How reproducible:

East

Steps to Reproduce:
1. create a content view with a long name, for example:

XXXX_Red_Hat_Software_Collections_RPMs_for_Red_Hat_Enterprise_Linux_7_Server_x86_64_7Server

2. export and copy the archive to:

/XXX/XXX_Red_Hat_Software_Collections_RPMs_for_Red_Hat_Enterprise_Linux_7_Server_x86_64_7Server/1.0/2022-01-29T02-54-30-10-30/

3. run the import:

hammer content-import version --organization-id 1 --path /var/lib/pulp/imports/XXX/XXXX_Red_Hat_Software_Collections_RPMs_for_Red_Hat_Enterprise_Linux_7_Server_x86_64_7Server/1.0/2022-01-29T02-54-30-10-30/

Actual results:

The import failed with:

ActiveRecord::ValueTooLong: PG::StringDataRightTruncation: ERROR: value too long for type character varying(255)

Expected results:

The import should be successfully.

Additional info:

Actions #1

Updated by The Foreman Bot about 2 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Jeremy Lenz
  • Pull request https://github.com/Katello/katello/pull/9947 added
Actions #2

Updated by Jonathon Turel about 2 years ago

  • Subject changed from content-view import fails with Error: PG::StringDataRightTruncation: ERROR: value too long for type character varying(255) to content-view import fails with Error: PG::StringDataRightTruncation: ERROR: value too long for type character varying(255)
  • Target version changed from Katello 4.4.0 to Katello 4.3.2
  • Triaged changed from No to Yes
Actions #3

Updated by The Foreman Bot about 2 years ago

  • Fixed in Releases Katello 4.5.0 added
Actions #4

Updated by Jeremy Lenz about 2 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF