Bug 1270181

Summary: Partition Table entries limited to 4096 chars
Product: Red Hat Satellite Reporter: Evgeni Golov <egolov>
Component: ProvisioningAssignee: Lukas Zapletal <lzap>
Status: CLOSED ERRATA QA Contact: Roman Plevka <rplevka>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1.1CC: andrew.schofield, bbuckingham, kabbott, lzap, rplevka, sthirugn
Target Milestone: UnspecifiedKeywords: Reopened, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/12119
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 08:57:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Evgeni Golov 2015-10-09 08:28:28 UTC
Description of problem:
While creating a Partition Table in Sat 6.1 we stumbled over the limit of 4096 characters for each individual entry. While this is plenty for a basic ptable, we want to use a script for generating the ptable (as described in https://access.redhat.com/documentation/en-US/Red_Hat_Satellite/6.1/html/User_Guide/sect-Red_Hat_Satellite-User_Guide-Configuring_the_Provisioning_Environment-Configuring_Provisioning_Settings.html#sect-Red_Hat_Satellite-User_Guide-Configuring_Provisioning_Settings-Partition_Tables).

The limit seems to be set in the Foreman database migration that is creating the ptables table in PostgreSQL (/usr/share/foreman/migrate/20090730152224_create_ptables.rb).

How reproducible:
always

Steps to Reproduce:
1. create a ptable longer than 4096 chars

Actual results:
not possible

Expected results:
ptable created

Additional info:

Comment 1 Bryan Kearney 2015-10-14 13:20:56 UTC
Upstream bug assigned to lzap@redhat.com

Comment 2 Bryan Kearney 2015-10-14 13:20:58 UTC
Upstream bug component is Provisioning

Comment 4 Lukas Zapletal 2015-10-15 11:51:52 UTC
This was fixed upstream in a different ticket already, we will eventually rebase in 6.2.

Triage notes: This is NOT backportable feature since upstream changed database backend completely for ptables.

Comment 5 Karl Abbott 2015-11-24 16:25:14 UTC
Lukas,

If we closed this bz, how are we ensuring that this gets fixed in 6.2 and properly QA'd etc.? 

Cheers,
Karl

Comment 6 Lukas Zapletal 2015-11-27 13:13:29 UTC
Yeah, I haven't noticed this was acked. It was merged already for upstream, but QA should cover it for sure.

Comment 9 Roman Plevka 2016-04-19 08:15:41 UTC
VERIFIED
sat 6.2.0 snap 8.2

verified on UI, CLI and API:

# tr -dc "[:alpha:]" < /dev/urandom | head -c 5000 > my_pt.txt
# wc my_pt.txt 
   0    1 5000 my_pt.txt
# hammer -u admin -p changeme partition-table create --name cli_pt_1 --file my_pt.txt 
Partition table created
# hammer -u admin -p changeme partition-table dump --name cli_pt_1 | wc
      1       1    5001
(extra character is a newline)


# curl -u admin:changeme https://sat6-server.com/api/v2/ptables -H 'Content-Type: application/json' -d '{"name": "api_pt_1", "template": "my_pt.txt"}'
{"layout":"my_pt.txt","os_family":null,"created_at":"2016-04-19 08:13:33 UTC","updated_at":"2016-04-19 08:13:33 UTC","name":"api_pt_1","id":94,"operatingsystems":[],"locations":[],"organizations":[]}

Comment 11 errata-xmlrpc 2016-07-27 08:57:44 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/RHBA-2016:1500