F5Networks / f5-ipam-controller

The F5 IPAM Controller runs in an orchestration environment like Kubernetes to allocate IP addresses from an IPAM system to BIG-IP Virtual Servers. The purpose is to abstract complexity related to setting up BIG-IP from a networking perspective
Apache License 2.0
10 stars 17 forks source link

IP's not allocated in numerical order #158

Open dronenb opened 3 months ago

dronenb commented 3 months ago

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: https://github.com/F5Networks/f5-ipam-controller/blob/23cc3e5e5083498a6f97ff131bb55e8f7f422838/pkg/provider/sqlite/store.go#L200

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.

trinaths commented 3 months ago

@dronenb Please explain the impact of this issue.