Fixing ingress network when upgrading from 17.09 to 17.12.

Signed-off-by: Pradip Dhara <pradipd@microsoft.com>

Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
Upstream-commit: 2d7a50e5855ad0571e76d29cd1ab9f8f3a48433b
Component: engine
This commit is contained in:
Pradip Dhara
2018-01-12 09:27:30 +00:00
parent 4bf05acc16
commit 0986b8a32c

View File

@ -146,6 +146,11 @@ func (e *executor) Configure(ctx context.Context, node *api.Node) error {
attachments[na.Network.ID] = na.Addresses[0]
}
if (ingressNA == nil) && (node.Attachment != nil) {
ingressNA = node.Attachment
attachments[ingressNA.Network.ID] = ingressNA.Addresses[0]
}
if ingressNA == nil {
e.backend.ReleaseIngress()
return e.backend.GetAttachmentStore().ResetAttachments(attachments)