Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address LP#2033710 by improving the IP address parsing #37

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

addyess
Copy link
Member

@addyess addyess commented Sep 1, 2023

LP#2033710

When one configs the charm with a single ip address such as iprange=192.168.0.1 rather than iprange=192.168.0.1/32 -- the charm fails to deal with this config and attempts to set the bare address in the spec.addresses of metallb.io/v1beta1/IPaddressPool

this causes an API error 403 forbidden because values of spec.addresses must either be an address range or a cidr subnet, not a single value

A worse situation is the charm cannot recover because it retries forever rather than stopping with an eventual error.

Comment on lines +193 to +194
wait=wait_exponential(multiplier=1, min=2, max=15),
stop=stop_after_delay(60 * 5),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So long as the ApiError exception occurs, wait seconds (2, 4, 8, 15 .. 15 ... 15 ) for a maximum of 5m

@addyess addyess force-pushed the akd/lp2033710/ipaddress-validation branch from ae40b5b to d6ca786 Compare September 1, 2023 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant