Permalink
Browse files

overlord/ifacestate: rename clashing plugs on core snap

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
  • Loading branch information...
1 parent c52febb commit 59ae873d82883f8887ac7c55bead62e60ab749f6 @zyga zyga committed Apr 7, 2017
Showing with 10 additions and 0 deletions.
  1. +10 −0 overlord/ifacestate/helpers.go
@@ -90,6 +90,16 @@ func (m *InterfaceManager) addSnaps() error {
return err
}
for _, snapInfo := range snaps {
+ if snap.Name() == "core" {
+ // Some released core snaps had explicitly defined plugs
+ // "network-bind" and "core-support" that clashed with implicit
+ // slots with the same names but this was not validated before. To
+ // avoid a flag day and any potential issues, transparently rename
+ // the two clashing plugs by appending the "-plug" suffix.
+ for plugName := range []string{"network-bind", "core-support"} {
+ snap.RenamePlug(plugName, plugName+"-plug")
+ }
+ }
snap.AddImplicitSlots(snapInfo)
if err := m.repo.AddSnap(snapInfo); err != nil {
logger.Noticef("%s", err)

0 comments on commit 59ae873

Please sign in to comment.