Skip to content
This repository has been archived by the owner on Mar 26, 2020. It is now read-only.

Commit

Permalink
volgen: Load default volfiles on Glusterd2 start
Browse files Browse the repository at this point in the history
Also generates default templates if not exists

Fixes: #1111 and #1190
Signed-off-by: Aravinda VK <avishwan@redhat.com>
  • Loading branch information
aravindavk authored and Atin Mukherjee committed Nov 9, 2018
1 parent bdce260 commit e686775
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions glusterd2/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/gluster/glusterd2/glusterd2/servers"
"github.com/gluster/glusterd2/glusterd2/store"
gdutils "github.com/gluster/glusterd2/glusterd2/utils"
"github.com/gluster/glusterd2/glusterd2/volgen"
"github.com/gluster/glusterd2/glusterd2/xlator"
"github.com/gluster/glusterd2/pkg/errors"
"github.com/gluster/glusterd2/pkg/firewalld"
Expand Down Expand Up @@ -127,6 +128,11 @@ func main() {
defer exporter.Flush()
}

// Load default volfile templates
if err := volgen.LoadDefaultTemplates(); err != nil {
log.WithError(err).Fatal("Failed to load Volgen templates")
}

// Start all servers (rest, peerrpc, sunrpc) managed by suture supervisor
super := initGD2Supervisor()
super.ServeBackground()
Expand Down

0 comments on commit e686775

Please sign in to comment.