Bug where GW partner can't be saved
This bug was introduced with the HTTP(s) protocol.
Explanation :
The partner model is not design to fit with every protocol specifications (see #318 (closed) 3.) and so is the form on the UI.
The bug occurs when you tried to update your Gateway information :
- It saves in
PostUpdate
hook the interface's information that derivate from partner model. - The function that rebuild the HTTP(s) interface does not take into account that you are rebuilding from a
TypeGw
or aTypeHttp(s)
so information like the port are not located in the same field for GW or HTTP(s) partners.
To be more precise, there isn’t any field for partner TypeGw
that hold the port for its HTTP(s)
interface, leading to building a nil
interface and then error on the frontend.
Solution :
- Add a condition on partner type HTTP(s) to update the right field (e.g.
Data["port"]
) - Add a condition on partner type GW to update its interfaces with the old information except
HostId