diff --git a/plugins/quota/actor.go b/plugins/quota/actor.go index ca7c7cc4..5bb2557d 100644 --- a/plugins/quota/actor.go +++ b/plugins/quota/actor.go @@ -6,6 +6,7 @@ import ( "path" "github.com/gluster/glusterd2/glusterd2/daemon" + "github.com/gluster/glusterd2/glusterd2/volgen" "github.com/gluster/glusterd2/glusterd2/volume" "github.com/gluster/glusterd2/glusterd2/xlator" "github.com/gluster/glusterd2/pkg/errors" @@ -80,6 +81,10 @@ func (actor *quotadActor) Do(v *volume.Volinfo, key, value string, volOp xlator. } else { logger.Info("quotad stopped for restart") } + err = volgen.ClusterVolfileToFile(v, quotadDaemon.VolfileID, "quotad") + if err != nil { + return err + } if err = daemon.Start(quotadDaemon, true, logger); err != nil { logger.WithError(err).Error("quotad start failed") } diff --git a/plugins/quota/quotad.go b/plugins/quota/quotad.go index 15cbef19..9cacd872 100644 --- a/plugins/quota/quotad.go +++ b/plugins/quota/quotad.go @@ -24,7 +24,7 @@ type Quotad struct { pidfilepath string logfilepath string volname string - volFileID string + VolfileID string // For internal use } @@ -46,11 +46,9 @@ func (q *Quotad) Args() []string { if shost == "" { shost = "127.0.0.1" } - q.volFileID = "gluster/quotad" - q.args = []string{} q.args = append(q.args, "-s", shost) - q.args = append(q.args, "--volfile-id", q.volFileID) + q.args = append(q.args, "--volfile-id", q.VolfileID) q.args = append(q.args, "-p", q.PidFile()) q.args = append(q.args, "-S", q.SocketFile()) q.args = append(q.args, "-l", q.logfilepath) @@ -95,7 +93,7 @@ func NewQuotad() (*Quotad, error) { ) return &Quotad{binarypath: binarypath, pidfilepath: pidfilepath, - logfilepath: logfilepath}, nil + logfilepath: logfilepath, VolfileID: "gluster/quotad"}, nil } // ID returns the unique identifier of the quota.