diff --git a/overlord/ifacestate/helpers.go b/overlord/ifacestate/helpers.go
index c20a83e1c..bf4625939 100644
--- a/overlord/ifacestate/helpers.go
+++ b/overlord/ifacestate/helpers.go
@@ -300,6 +300,18 @@ func (m *InterfaceManager) autoConnect(task *state.Task, snapName string, blackl
continue
}
candidates := m.repo.AutoConnectCandidateSlots(snapName, plug.Name, autochecker.check)
+ // If we are in a core transition we may have both the old ubuntu-core
+ // snap and the new core snap providing the same interface. In that
+ // situation we want to ignore any candidates in ubuntu-core and simply
+ // go with those from the new core snap.
+ if len(candidates) == 2 {
+ switch {
+ case candidates[0].Snap.Name() == "ubuntu-core" && candidates[1].Snap.Name() == "core":
+ candidates = candidates[1:2]
+ case candidates[1].Snap.Name() == "ubuntu-core" && candidates[0].Snap.Name() == "core":
+ candidates = candidates[0:1]
+ }
+ }
if len(candidates) != 1 {
continue
}