Project

General

Profile

Actions

Bug #23704

closed

Sorting by network address for subnet doesn't work properly

Added by Ondřej Pražák almost 6 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Network
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Description of problem:
I am trying to sort subnet table by network address in ascending order and get:

101.125.59.0/9
106.119.91.0/22
10.8.211.0/24
109.49.91.0/15
1.120.66.0/28
116.53.130.0/9
119.71.207.0/11
120.248.160.0/22
120.37.106.0/1
124.74.17.0/7
128.253.63.0/6
130.120.157.0/14
13.51.50.0/8
160.17.140.0/26

which is out of any mathematical system

How reproducible:
Always

Steps to Reproduce:
1. Create 20+ subnets
2. Try to sort them by network address
3.

Actual results:
Subnets sorted chaotically

Expected results:
Subnets sorted in proper numeric order like:
1xx.1xx.1xx.1xx
1xx.2xx.1xx.1xx
2xx.1xx.1xx.1xx
...

Additional info:

Actions #1

Updated by Marek Hulán almost 6 years ago

  • Subject changed from Sorting by network address for subnet doesn't work properly to Sorting by network address for subnet doesn't work properly

https://stackoverflow.com/questions/2646710/order-by-in-postgresql-to-sort-ip-address - this would work for postgres, scoped search does not allow this though.

Actions #2

Updated by The Foreman Bot almost 6 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Marek Hulán
  • Pull request https://github.com/theforeman/foreman/pull/5623 added
Actions #3

Updated by The Foreman Bot about 4 years ago

  • Fixed in Releases 2.1.0 added
Actions #4

Updated by Marek Hulán about 4 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF