Red Hat Bugzilla – Bug 498467
Cloned channel generated name is longer than limit
Last modified: 2009-09-10 16:36:19 EDT
Description of problem:
When cloning some channels -- for example, the RHEL 5 RHN Tools channel for x86_64 -- the channel name field is prepopulated using characters that are not accepted input. We shouldn't be prepopulating fields with data that the user cannot, by default, submit/accept.
Version-Release number of selected component (if applicable):
Satellite-5.3.0-RHEL5-re20090422.2-i386.iso but probably earlier.
Steps to Reproduce:
1. sync your RHEL5 x86_64 channel and associated RHN Tools channel.
2. (=) clone channel > Clone from: Red Hat Network Tools for RHEL Server (v.5 64-bit x86_64)
3. View populated fields on resulting page, and submit.
Form is submitted with value of "Clone of Red Hat Network Tools for RHEL Server (v.5 64-bit x86_64)" in the Channel Name field, and thus channel creation fails with the following error:
Invalid channel name 'Clone of Red Hat Network Tools for RHEL Server (v.5 64-bit x86_64)' - must be at least 6 characters long and no longer than 64 characters, begin with a letter, and contain only letters, digits, spaces, '-', ' / ', '_' and '.'
Default values pre-populated in fields should, by default, be valid data.
Changed summary to "Parenthesis are not respected as a valid character when cloning channels." The real issue is that Red Hat and all versions of Satellite have always respected parenthesis as a valid character in channel names. So we should allow this to work as we have in all previous versions of Satellite. That makes this a regression that we don't allow parenthesis anymore.
I'm not sure the parenthesis is the issue. I was able to clone a channel successfully with parentheses. The message is incorrect; it doesn't indicate parentheses are valid.
The example in this description fails because the name is too long (67 characters v. the maximum of 64). We need to either truncate when we generate the name or expand the name's possible length.
FWIW, also had this issue in RHS 5.2. Limiting the name length did the trick. Same for Description IIRC.
After some back and forth on the mailing list, we came up with the following:
- Increase the size of the channel name column to 256. If the Red Hat channels are already coming close to this, it's likely that the limit is too short for our needs.
- If the generated name is still too long, show a UI error about the length. This is already in place. There is an annoying amount of logic involved in the truncation and reverification that the name is unique, and it's a much more unlikely scenario with the column name increase.
Also, this is basically a duplicate of 459827.
Increased size of channel name column
No, it was just fixed back in January and will be in 5.3.
(In reply to comment #6)
> commit c80bcc63b7b067b59692bc9332e0416699caab94
> tree ddf5fc4cf05fbd66fb0c208e576c2423adc830ac
> commit 8537a8bd39324939affc4aaef040957ed503bbbb
> tree 50023111d6686fc9876cd3f51c06d7cb770f6c59
> Increased size of channel name column
You still need to change the definition of rhnChannel table (name column) in
rhnsat/tables/rhnChannel.sql for new installations.
Thanks Milan, good pickup.
Tested with: Satellite-5.3.0-RHEL5-re20090520.0-i386-embedded-oracle.iso
Followed reproducer in comment #1, received error:
Invalid channel name 'Clone 2 of Red Hat Network Tools for RHEL Server (v.5 64-bit x86_64)' - must be at least 6 characters long and no longer than 64 characters, begin with a letter, and contain only letters, digits, spaces, '-', ' / ', '_' and '.'
If I shorten the name a little it works. From comment #4 I'm assuming the intent is to raise the limit to 256 characters? It seems like 64 is still the limit.
I verified that the change noted in comment #10 is present on the ISO I'm using.
NAME NOT NULL VARCHAR2(256)
Ah, ok. The clone channel workflow ends on the network/software/channels/manage/edit.pxt?clone_from=102&clone_type=original page. I'm guessing that page is doing its own validation of the name before hitting the DB that needs to be updated.
A few changes related to the channel name limit increase.
- Increased max length of create channel name text field
- Clone channel destination page updated with correct new length
- Stored proc changed; increased size of channel_name variable
- Update script for stored proc created
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.