Hide Forgot
Description of problem: In automation, a test case is failed where we are creating discovery rule >255 characters. Earlier the validation was set but looks like we can create rule with any name length. ]# hammer -u admin -p changeme discovery_rule create --name 'yXFdwjBlopAVqRsOCgsCRRcnkQFbSDlTeaXVdNYxuRFqIHWcKfDhrgxlEfHVZGVKyEQMLmtyVonBcNLzCtIWqgvLvKxdEpZpwCTDMNFJuOQKZWcYtlzWGkOqUCfLfIEBtljlKZdkebrLDdfPQijuJsQtvrRbyFMrEdcXAeuOhEdBoJHZNNdQALIdpTzsFQqLOHHSyClnVwdwWpufuFJfJtAHlvrglersGWORgKvIdpfKnJwcTUBrKfbxAkcgpbRm' --hostgroup test --search='cpu_count = 1' --organization-ids 1 Rule created Version-Release number of selected component (if applicable): Sat6.3 snap2 How reproducible: Steps to Reproduce: 1. create discovery rule with >255 chars in name 2. 3. Actual results: Validation error should be raised if user tries to create rule with more that 255 chars Expected results: Additional info:
Fixed in 6.3: hammer-quick discovery-rule create --name longfsdfdsfdssdfddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddxxxxxxxxxxxxxx --hostgroup "CentOS 7.3" --search='cpu_count = 1' --organization-titles MyOrg --location-titles MyLoc Could not create the rule: Name is too long (maximum is 255 characters)
Created attachment 1311204 [details] Max 255 chars
Verified. Tested on: foreman-1.15.2-1.el7sat.noarch tfm-rubygem-foreman_discovery-9.1.1-1.fm1_15.el7sat.noarch satellite-6.3.0-16.0.beta.el7sat.noarch See the screenshot for proof. Having said that - this should have never been opened as a bug. The search filter should be arbitrarily large so that one could write complex rules if needed, instead of limiting it.
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/RHSA-2018:0336