-
Notifications
You must be signed in to change notification settings - Fork 507
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
[JUJU-163]create openstack FIPs on networks on AZ to match the server's addresses. #13478
Conversation
Choose an external network for a FIP based on the AZ of the instance if an external-network has not been configured.
All Networking related interfaces moved and added to a new file. The networkingBase struct because a wrapper for the Environ and implementer of the new NetworkingBase interface.
Compute and Network AZ are created independently in OpenStack. No guarentee they are called the same. Find the server Addresses, then use the AZ of the networks those Addresses are on to find external networks to create FIPs on.
Related updates to unit tests for fix for LP:1928979.
ca04b61
to
3fad2fd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good.
Canonistack seems to be having some issues at the moment, but I was able to deploy onto my Serverstack bastion.
Works fine for assigning public IPs, but there is only the one AZ.
One suggestion for an extra log line.
netIds = append(netIds, network.Id) | ||
break | ||
} | ||
} | ||
if azName == "" && len(network.AvailabilityZones) == 0 { | ||
if azNames.IsEmpty() || len(network.AvailabilityZones) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's log out that we including this network because of the absence of AZ specificity. Users wondering at this behaviour will have something to go on.
"github.com/juju/juju/core/instance" | ||
) | ||
|
||
type networkingSuite struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice.
Let users know why an external network was included for potential FIP allocation if AZs are not found.
|
Update the Openstack provider to select networks to create a FIP in based on the AZs of networks the server is attached to.
Refactored some and added interfaces to Openstack networking to mock tests.
Drive by adds ProviderNetworkId to SubnetInfo for Openstack subnets.
QA steps
Bootstrap OpenStack clouds. Finding one with multiple AZ configurations would be interesting.
Bug reference
https://bugs.launchpad.net/juju/+bug/1928979