Bug 1350230
| Summary: | Define to long name to the affinity label raise exception under engine.log | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [oVirt] ovirt-engine | Reporter: | Artyom <alukiano> | ||||
| Component: | Backend.Core | Assignee: | Jenny Tokar <jtokar> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Artyom <alukiano> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 4.0.0 | CC: | bugs, mavital, mgoldboi, rgolan, sbonazzo | ||||
| Target Milestone: | ovirt-4.1.0-alpha | Keywords: | Triaged | ||||
| Target Release: | 4.1.0.2 | Flags: | rule-engine:
ovirt-4.1+
mgoldboi: planning_ack+ rgolan: devel_ack+ mavital: testing_ack+ |
||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: |
Cause:
The label length was not checked.
Consequence:
The label save action would fail on the database commit with an unclear error, since the name was too long for what was defined.
Fix:
Add validation for the length in the code.
Result:
When trying to add label with a name that is too long the action fails with a clear error.
|
Story Points: | --- | ||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2017-02-01 14:38:56 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | SLA | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
The fix for this issue should be included in oVirt 4.1.0 beta 1 released on December 1st. If not included please move back to modified. Verified ovirt-engine-4.1.0-0.2.master.20161212172238.gitea103bd.el7.centos.noarch Error message: <fault> <detail>[An affinity label name must be 1-50 characters long., Attribute: label.name]</detail> <reason>Operation Failed</reason> </fault> No exception under the engine log |
Created attachment 1172587 [details] engine log Description of problem: Define to long name to the affinity label raise exception under engine.log Version-Release number of selected component (if applicable): rhevm-4.0.0.6-0.1.el7ev.noarch How reproducible: Always Steps to Reproduce: 1. Create affinity label with name bigger than 50 characters 2. 3. Actual results: [Internal Engine Error] 2016-06-26 11:15:03,301 ERROR [org.ovirt.engine.core.bll.AddLabelCommand] (default task-15) [774b037d] Exception: org.springframework.dao.DataIntegrityViolationException: CallableStatementCallback; SQL [{call createlabel(?, ?, ?, ?, ?)}]; ERROR: value too long for type character varying(50) Expected results: Validation error under engine and no exceptions under engine log Additional info: