Skip to content

Commit

Permalink
change etcd dir permission if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
MonzElmasry committed Jan 7, 2021
1 parent 6dabf7a commit 150b645
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/etcd/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ func (e *ETCD) Start(ctx context.Context, clientAccessInfo *clientaccess.Info) e
go e.manageLearners(ctx)

if existingCluster {
info, err := os.Stat(etcdDBDir(e.config))
if info.Mode().Perm() != 0700 {
os.Chmod(info.Name(), 0700)
}
opt, err := executor.CurrentETCDOptions()
if err != nil {
return err
Expand Down

0 comments on commit 150b645

Please sign in to comment.