Skip to content

IP's not allocated in numerical order #158

@dronenb

Description

@dronenb

Before you raise a new bug, please ensure you have visited the troubleshooting guide

Setup Details

FIC Version : 0.1.10
CIS Version : 2.17.0
FIC Build: registry.connect.redhat.com/f5networks/f5-ipam-controller@sha256:9cba1d4585d9bb0891362bbff3ac270c0177f4415dc64ca0bbbfe5d13ca629d9
CIS Build: registry.connect.redhat.com/f5networks/cntr-ingress-svcs@sha256:e94b95fe88405435153bd22661d4e08f59ee52b79ef2c12ece2a3684e73656b1

Description

Presently, when using FIC, IP addresses are allocated in ascending order, which does not logically distribute IP's in numerical order (IE, 192.168.1.10 would come before 192.168.1.2, for example). Offending line:

"SELECT ipaddress FROM ipaddress_range where status=%d AND ipam_label=\"%s\" order by ipaddress ASC limit 1",

Not sure the best solution since this is using SQLite, which does not include the inet_aton function, which would make it much easier... Some potential solutions discussed here

Steps To Reproduce

  1. Create an IPAM controller with IP address range
  2. Notice how IP's are handed out

Expected Result

IP addresses are handed out in numerical order, not alphabetical order

Actual Result

IP addresses are handed out in alphabetical order.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions