Project

General

Profile

Actions

Bug #9090

closed

while defining discovery_rule, user shouldn't be allowed to enter negative value for host limit

Added by Sachin Ghai over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Discovery plugin
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Currently UI accepts the host_limit value as -1 or -2 etc while defining discovery rule. When we apply this rule on some discovered host it production.log says:

Skipping drained rule

However, UI throws error: no matching rule found. This looks misleading as rule was correctly defined, issue was only with host limit. So we should restrict user to define rule with -ve value.

reproducible with:
rubygem-smart_proxy_discovery-1.0.1-1.el6.noarch
ruby193-rubygem-foreman_discovery-2.0.0-0.1.rc1.el6.noarch

foreman-release-1.8.0-0.develop.201501211657git1cf860b.el6.noarch
foreman-1.8.0-0.develop.201501211657git1cf860b.el6.noarch


Files

host_limit.png View host_limit.png 29.9 KB Sachin Ghai, 01/23/2015 07:15 AM
Actions #1

Updated by Sachin Ghai over 10 years ago

what about priority ? can it be in -ve value ?

Actions #2

Updated by Ori Rabin over 10 years ago

  • Status changed from New to Assigned
  • Assignee changed from Lukas Zapletal to Ori Rabin
Actions #3

Updated by The Foreman Bot over 10 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_discovery/pull/137 added
  • Pull request deleted ()
Actions #4

Updated by Ori Rabin over 10 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF