Project

General

Profile

Bug #26816

Filter by os_minor includes unexpected values

Added by Marek Hulán about 1 year ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Search
Target version:
-
Difficulty:
easy
Triaged:
No
Bugzilla link:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1710511

Description of problem:

Filter by os_minor includes unexpected values.

Version-Release number of selected component (if applicable):

How reproducible:

To reproduce:

1. navigate to Hosts => All Hosts
2. enter the following filter: "os_major = 6 and os_minor < 4" and click Search

If version 6.10 is included in the search results, even though 10 is not < than 4.

Notice in the other attached that 6.2 and 6.3 servers are also mentioned, and no 6.4 through 6.9 servers are in the results. However, 6.10 should also not show

Expected: only 6.0, 6.1, 6.2 and 6.3 servers should show

Associated revisions

Revision 153a3310 (diff)
Added by yifat makias 6 months ago

Fixes #26816 - fixed bug in major, minor filtering

History

#1 Updated by Marek Hulán about 1 year ago

  • Difficulty set to easy
  • Category changed from Inventory to Search
  • Subject changed from Filter by os_minor includes unexpected values on the Satellite web UI. to Filter by os_minor includes unexpected values on the Satellite web UI.

The reason is that minor version of OS is treated as a string, because it can contain non numerical characters, e.g. 2.1511 in case of CentOS. Therefore we can only compare these value lexically. And 10 is lexically lower than 6, since 1 is earlier in alphabet than 6. For search purposes we could break all numbers apart and store them in DB as integers.

An easy workaround is to query it like "os_major = 6 and os_minor ^ (1,2,3,4)".

#2 Updated by yifat makias 9 months ago

  • Assignee set to yifat makias
  • Status changed from New to Assigned

#3 Updated by The Foreman Bot 8 months ago

  • Pull request https://github.com/theforeman/foreman/pull/7056 added

#4 Updated by The Foreman Bot 8 months ago

  • Status changed from Assigned to Ready For Testing

#5 Updated by The Foreman Bot 8 months ago

  • Pull request https://github.com/theforeman/foreman/pull/7065 added

#6 Updated by The Foreman Bot 6 months ago

  • Fixed in Releases 2.0.0 added

#7 Updated by yifat makias 6 months ago

  • Status changed from Ready For Testing to Closed

#8 Updated by Tomer Brisker 3 months ago

  • Subject changed from Filter by os_minor includes unexpected values on the Satellite web UI. to Filter by os_minor includes unexpected values

Also available in: Atom PDF