<div dir="ltr"><div><div><div><div><div>Hi folks, <br><br></div>I'm working on the following story [1][2]:<br>API must allow VIP to be manually set to ANY valid IP address. If the IP on<br>update API is a member of any network in this environment then the address<br>should be put in the assignments table so that it can not be used in any other<br>automatic assignment. (This allows the user to override if the automatic<br>allocation doesn't match their needs or in the case that they want to use<br>external LB).<br><br>[1] <a href="https://bugs.launchpad.net/fuel/+bug/1482399">https://bugs.launchpad.net/fuel/+bug/1482399</a><br>[2] <a href="https://review.openstack.org/230943">https://review.openstack.org/230943</a><br><br></div>So, I have the following proposal for now:<br></div>Add new url (e.g. /clusters/<cluster_id>/network_configuration/vips/ ), use GET<br></div>to query current VIPs info, use PUT to change VIPs addresses (set them manually <br>or request to allocate them automatically).<br></div>Now VIPs have the following format in API requests data:<br><div><div><div>vips: [<br>    {<br></div><div>        'network_role': 'management',<br>        'namespace': 'haproxy',<br>        'ipaddr': '10.10.10.10',<br>        'node_roles': ['controller']<br><div>    },...<br>]<br></div><div>So, 'ipaddr' field can be set to any (almost any) user-defined value or to None (null in YAML).<br></div><div>When it is set to None, IP address will be allocated automatically. When the user runs GET <br>request for the first time, all 'ipaddr' fields are equal to None. So, user can set some (or all)<br>of them to desired values and run PUT. When the GET is run after PUT, all addresses will be<br></div><div>filled with values. User can reset some of them to None or change to other IP when required.<br></div><div>So, addresses will be re-allocated on the next PUT requests.<br></div><div>If address given by user overlaps with some of the allocated IPs, PUT request will be rejected.<br></div><div>There is a question, what to do when the given address overlaps with the network from another<br></div><div>environment? overlaps with the network of current environment which does not match the<br></div><div>network role of the VIP?<br></div><div>My opinion that those should pass with a warning message.<br></div><div><br>Please share your proposals and comments on this,<br><div><br></div></div><div></div><div>Thanks, <br></div><div><br><br><div><div>Aleksey Kasatkin
<br><div><div class="gmail_signature"><div dir="ltr"><br></div></div></div>
</div></div></div></div></div></div></div>