Do not chown files when booting the daemon; avoid massive delays in production environments
This commit is contained in:
11
cmd/root.go
11
cmd/root.go
@@ -170,10 +170,6 @@ func rootCmdRun(*cobra.Command, []string) {
|
||||
log.WithField("server", s.Id()).Info("loaded configuration for server")
|
||||
}
|
||||
|
||||
if !c.System.SetPermissionsOnBoot {
|
||||
log.Warn("server file permission checking is currently disabled on boot!")
|
||||
}
|
||||
|
||||
// Create a new workerpool that limits us to 4 servers being bootstrapped at a time
|
||||
// on Wings. This allows us to ensure the environment exists, write configurations,
|
||||
// and reboot processes without causing a slow-down due to sequential booting.
|
||||
@@ -183,13 +179,6 @@ func rootCmdRun(*cobra.Command, []string) {
|
||||
s := serv
|
||||
|
||||
pool.Submit(func() {
|
||||
if c.System.SetPermissionsOnBoot {
|
||||
s.Log().Info("chowning server data directory")
|
||||
if err := s.Filesystem.Chown("/"); err != nil {
|
||||
s.Log().WithField("error", err).Warn("error during server data directory chown")
|
||||
}
|
||||
}
|
||||
|
||||
s.Log().Info("ensuring server environment exists")
|
||||
// Create a server environment if none exists currently. This allows us to recover from Docker
|
||||
// being reinstalled on the host system for example.
|
||||
|
||||
Reference in New Issue
Block a user