Skip to content

Commit 40797fe

Browse files
Make sure keys are checked before discarding (#77)
It is required to check keys before discarding servers, as there is a new check to validate spread is efectively connected with openstack.
1 parent 475d502 commit 40797fe

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spread/openstack.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,9 @@ func (p *openstackProvider) Allocate(ctx context.Context, system *System) (Serve
240240
}
241241

242242
func (s *openstackServer) Discard(ctx context.Context) error {
243+
if err := s.p.checkKey(); err != nil {
244+
return err
245+
}
243246
return s.p.removeMachine(ctx, s)
244247
}
245248

0 commit comments

Comments
 (0)