Bug 1494180

Summary: Sorting by network address for subnet doesn't work properly
Product: Red Hat Satellite Reporter: Oleksandr Shtaier <oshtaier>
Component: NetworkingAssignee: Marek Hulan <mhulan>
Status: CLOSED ERRATA QA Contact: Roman Plevka <rplevka>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: egolov, ldelouw, oprazak
Target Milestone: 6.8.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: foreman-2.1.0-0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 12:57:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Oleksandr Shtaier 2017-09-21 15:30:58 UTC
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

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

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:

Comment 2 Ondřej Pražák 2018-05-25 09:36:32 UTC
Created redmine issue http://projects.theforeman.org/issues/23704 from this bug

Comment 3 Satellite Program 2018-05-30 08:05:04 UTC
Upstream bug assigned to mhulan

Comment 4 Satellite Program 2018-05-30 08:05:08 UTC
Upstream bug assigned to mhulan

Comment 5 Marek Hulan 2018-05-30 09:40:31 UTC
*** Bug 1341228 has been marked as a duplicate of this bug. ***

Comment 6 Bryan Kearney 2020-03-04 11:02:29 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/23704 has been resolved.

Comment 7 Roman Plevka 2020-06-17 09:50:03 UTC
VERIFIED
on sat6.8.0-4

```
[root@dhcp-3-165 ~]# hammer subnet list --order network
---|--------------|-----------------|----------------|-----------------|---------|-----------|----------------
ID | NAME         | NETWORK ADDR    | NETWORK PREFIX | NETWORK MASK    | VLAN ID | BOOT MODE | GATEWAY ADDRESS
---|--------------|-----------------|----------------|-----------------|---------|-----------|----------------
36 | LwRVfctbo    | 1.7.93.112      | 26             | 255.255.255.192 |         | DHCP      |                
17 | JEruYSun     | 7.160.237.145   | 19             | 255.255.224.0   |         | DHCP      |                
3  | noXZPDmwqln  | 12.49.62.130    | 26             | 255.255.255.192 |         | DHCP      |                
18 | pagLXLpzSY   | 32.223.10.254   | 30             | 255.255.255.252 |         | DHCP      |                
4  | hfWANfmgWhcV | 33.48.232.58    | 7              | 254.0.0.0       |         | DHCP      |                
40 | SMadJMddcl   | 33.212.52.112   | 14             | 255.252.0.0     |         | DHCP      |                
23 | FNNtRve      | 35.65.139.126   | 24             | 255.255.255.0   |         | DHCP      |                
15 | tLYSULzsO    | 44.72.132.228   | 10             | 255.192.0.0     |         | DHCP      |                
37 | wavHPUCAp    | 44.195.240.163  | 5              | 248.0.0.0       |         | DHCP      |                
50 | TCtjwxwx     | 65.176.54.54    | 6              | 252.0.0.0       |         | DHCP      |                
42 | UJxQpcnN     | 65.234.55.28    | 31             | 255.255.255.254 |         | DHCP      |                
41 | HxrrCtwurOa  | 70.30.84.73     | 7              | 254.0.0.0       |         | DHCP      |                
5  | MFzvmdjg     | 75.129.239.139  | 20             | 255.255.240.0   |         | DHCP      |                
12 | nsfHeja      | 81.183.45.205   | 20             | 255.255.240.0   |         | DHCP      |                
34 | hLnDFomebnk  | 91.150.185.13   | 16             | 255.255.0.0     |         | DHCP      |                
51 | FZbTgMEZnSIh | 94.161.182.76   | 31             | 255.255.255.254 |         | DHCP      |                
45 | LbqwbNzFBXX  | 103.186.145.220 | 19             | 255.255.224.0   |         | DHCP      |                
32 | XMENJqnzcL   | 113.99.77.21    | 13             | 255.248.0.0     |         | DHCP      |                
14 | DJUYMDfoaRS  | 125.103.201.184 | 5              | 248.0.0.0       |         | DHCP      |                
13 | WSCmfpsLVia  | 129.65.153.101  | 21             | 255.255.248.0   |         | DHCP      |                
11 | tFAFso       | 134.41.97.165   | 18             | 255.255.192.0   |         | DHCP      |                
49 | CIBYbx       | 139.74.153.140  | 28             | 255.255.255.240 |         | DHCP      |                
29 | zeUBuVAXkn   | 144.140.144.78  | 5              | 248.0.0.0       |         | DHCP      |                
27 | fFDgvF       | 149.80.191.94   | 14             | 255.252.0.0     |         | DHCP      |                
6  | nzMprBTAlIQv | 156.64.120.63   | 26             | 255.255.255.192 |         | DHCP      |                
35 | hVmyFo       | 156.82.187.62   | 6              | 252.0.0.0       |         | DHCP      |                
20 | WCBSisr      | 159.74.118.108  | 22             | 255.255.252.0   |         | DHCP      |                
46 | hgvRlfBKnmMq | 165.213.113.249 | 26             | 255.255.255.192 |         | DHCP      |                
7  | BQXTJfC      | 168.30.163.8    | 31             | 255.255.255.254 |         | DHCP      |                
2  | dmKPvjZURN   | 172.127.50.130  | 1              | 128.0.0.0       |         | DHCP      |                
28 | mBUjEeSFA    | 177.238.84.247  | 16             | 255.255.0.0     |         | DHCP      |                
21 | LwtXlam      | 182.207.72.61   | 23             | 255.255.254.0   |         | DHCP      |                
26 | htPtVYJG     | 183.214.102.93  | 20             | 255.255.240.0   |         | DHCP      |                
16 | bSLVgA       | 186.138.217.152 | 16             | 255.255.0.0     |         | DHCP      |                
22 | zgaVjGbTxIqS | 193.126.99.51   | 30             | 255.255.255.252 |         | DHCP      |                
25 | wmqEllc      | 193.149.246.246 | 2              | 192.0.0.0       |         | DHCP      |                
19 | tsckIqekH    | 196.66.179.53   | 11             | 255.224.0.0     |         | DHCP      |                
44 | yizrkahYEhR  | 201.229.110.15  | 24             | 255.255.255.0   |         | DHCP      |                
47 | wsjecTxPDel  | 205.129.144.98  | 23             | 255.255.254.0   |         | DHCP      |                
31 | kGmNpl       | 211.227.196.227 | 30             | 255.255.255.252 |         | DHCP      |                
38 | QvoMTda      | 218.29.71.226   | 7              | 254.0.0.0       |         | DHCP      |                
1  | DoRvWhARbB   | 225.141.165.172 | 6              | 252.0.0.0       |         | DHCP      |                
33 | VXqeyacoNxBo | 228.125.22.182  | 16             | 255.255.0.0     |         | DHCP      |                
9  | qArMzWm      | 235.157.173.66  | 30             | 255.255.255.252 |         | DHCP      |                
39 | aKFiOtW      | 236.235.129.134 | 27             | 255.255.255.224 |         | DHCP      |                
10 | xkBVUE       | 240.224.158.98  | 23             | 255.255.254.0   |         | DHCP      |                
30 | mwoxYi       | 241.58.47.20    | 9              | 255.128.0.0     |         | DHCP      |                
8  | obMMzb       | 243.217.148.216 | 15             | 255.254.0.0     |         | DHCP      |                
43 | oRKLkpuyC    | 248.104.121.137 | 23             | 255.255.254.0   |         | DHCP      |                
24 | ujpfZJysm    | 248.200.146.170 | 21             | 255.255.248.0   |         | DHCP      |                
48 | APIfIH       | 253.250.98.128  | 27             | 255.255.255.224 |         | DHCP      |                
---|--------------|-----------------|----------------|-----------------|---------|-----------|----------------
```

Comment 10 errata-xmlrpc 2020-10-27 12:57:21 UTC
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 (Important: Satellite 6.8 release), 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-2020:4366