Add support for modifying daemon configuration on-the-fly
This commit is contained in:
@@ -16,6 +16,9 @@ func NewCollection(servers []*Server) *Collection {
|
||||
|
||||
// Return all of the items in the collection.
|
||||
func (c *Collection) All() []*Server {
|
||||
c.RLock()
|
||||
defer c.RUnlock()
|
||||
|
||||
return c.items
|
||||
}
|
||||
|
||||
|
||||
@@ -69,10 +69,6 @@ func (s *Server) UpdateDataStructure(data []byte, background bool) error {
|
||||
s.Allocations.Mappings = src.Allocations.Mappings
|
||||
}
|
||||
|
||||
/*if _, err := s.WriteConfigurationToDisk(); err != nil {
|
||||
return errors.WithStack(err)
|
||||
}*/
|
||||
|
||||
if background {
|
||||
s.runBackgroundActions()
|
||||
}
|
||||
@@ -105,14 +101,6 @@ func (s *Server) runBackgroundActions() {
|
||||
if server.Suspended && server.GetState() != ProcessOfflineState {
|
||||
zap.S().Infow("server suspended with running process state, terminating now", zap.String("server", server.Uuid))
|
||||
|
||||
/*if err := server.Environment.Terminate(os.Kill); err != nil {
|
||||
zap.S().Warnw(
|
||||
"failed to terminate server environment after seeing suspension",
|
||||
zap.String("server", server.Uuid),
|
||||
zap.Error(err),
|
||||
)
|
||||
}*/
|
||||
|
||||
if err := server.Environment.WaitForStop(10, true); err != nil {
|
||||
zap.S().Warnw(
|
||||
"failed to stop server environment after seeing suspension",
|
||||
|
||||
Reference in New Issue
Block a user