Bug 998369
| Summary: | Add unique constraint to Tasks' RPM name | ||
|---|---|---|---|
| Product: | [Retired] Beaker | Reporter: | Amit Saha <asaha> |
| Component: | scheduler | Assignee: | Amit Saha <asaha> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | tools-bugs <tools-bugs> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 0.14 | CC: | aigao, asaha, dcallagh, ebaak, llim, qwan, rmancy, xjia |
| Target Milestone: | 0.15 | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-10-03 02:28:19 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: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 994789 | ||
|
Description
Amit Saha
2013-08-19 07:31:49 UTC
Adding a unique key constraint and considering that we are using unicode limits us to 255 characters for the RPM name[1]. I will do a check to see how many of the production RPMs exceed that. [1] https://drupal.org/node/554820 (In reply to Amit Saha from comment #2) > Adding a unique key constraint and considering that we are using unicode > limits us to 255 characters for the RPM name[1]. I will do a check to see > how many of the production RPMs exceed that. Hmm i was obviously not thinking of file system limits there, which makes that a 0 percent probability of finding one. On Gerrit: http://gerrit.beaker-project.org/#/c/2191/ Verify:
The length of rpm's name should not be large than 256. That's linux limited. And upload different tasks with same rpm package name, it will fail.
[root@beaker-client-rhel6 jiaxuan]# pwd
/root/haha/Sanity/jiaxuan
[root@beaker-client-rhel6 jiaxuan]# bkr task-add jiaxuan-1.0-1.noarch.rpm
jiaxuan-1.0-1.noarch.rpm
Success
[root@beaker-client-rhel6 jiaxuan]# cd /root/haha2/Sanity/jiaxuan1/
[root@beaker-client-rhel6 jiaxuan1]# ls
jiaxuan-1.0-1.noarch.rpm Makefile PURPOSE runtest.sh
[root@beaker-client-rhel6 jiaxuan1]# bkr task-add jiaxuan-1.0-1.noarch.rpm
jiaxuan-1.0-1.noarch.rpm
Exception: <Fault 1: <class 'bkr.common.bexceptions.BX'>:Cannot import duplicate task jiaxuan-1.0-1.noarch.rpm>
[root@beaker-client-rhel6 jiaxuan1]# vim
jiaxuan-1.0-1.noarch.rpm Makefile PURPOSE runtest.sh
[root@beaker-client-rhel6 jiaxuan1]# vim Makefile
[root@beaker-client-rhel6 jiaxuan1]# vim runtest.sh
[root@beaker-client-rhel6 jiaxuan1]# rm -rf jiaxuan-1.0-1.noarch.rpm
[root@beaker-client-rhel6 jiaxuan1]# cat Makefile | grep PACKAGE_NAME
export PACKAGE_NAME=jiaxuan
[root@beaker-client-rhel6 jiaxuan1]# vim Makefile
[root@beaker-client-rhel6 jiaxuan1]# make package
rhts-mk-build-package
CURRENT_TAG: 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890-1_0-1
NAME: 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
VERSION: 1.0
RELEASE: 1
SOURCE_DIR: /root/haha2/Sanity/jiaxuan1
TMP_DIR: /mnt/testarea/rhts-build-qWczWpH3
BUILD_DIR: /mnt/testarea/rhts-build-qWczWpH3/rpm-build
GENERATED_SOURCE_DIR: /mnt/testarea/rhts-build-qWczWpH3/build
INSTALL_DIR: /mnt/testarea/rhts-build-qWczWpH3/install
Creating tarball: /mnt/testarea/rhts-build-qWczWpH3/build/1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890-1.0-1.tar.gz
tar (child): /mnt/testarea/rhts-build-qWczWpH3/build/1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890-1.0-1.tar.gz: Cannot open./
./PURPOSE
: File name too long
./runtest.sh
tar (child): Error is not recoverable: exiting now
./Makefile
tar: Child returned status 2
tar: Error is not recoverable: exiting now
make: *** [noarch-rpm] Error 1
Beaker 0.15 has been released. |