Project

General

Profile

Actions

Bug #26816

closed

Filter by os_minor includes unexpected values

Added by Marek Hulán almost 5 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Search
Target version:
-
Fixed in Releases:
Found in Releases:

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

Actions #1

Updated by Marek Hulán almost 5 years ago

  • 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.
  • Category changed from Inventory to Search
  • Difficulty set to easy

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)".

Actions #2

Updated by yifat makias over 4 years ago

  • Status changed from New to Assigned
  • Assignee set to yifat makias
Actions #3

Updated by The Foreman Bot over 4 years ago

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

Updated by The Foreman Bot over 4 years ago

  • Status changed from Assigned to Ready For Testing
Actions #5

Updated by The Foreman Bot over 4 years ago

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

Updated by The Foreman Bot over 4 years ago

  • Fixed in Releases 2.0.0 added
Actions #7

Updated by yifat makias over 4 years ago

  • Status changed from Ready For Testing to Closed
Actions #8

Updated by Tomer Brisker about 4 years ago

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

Also available in: Atom PDF