mirror of
https://github.com/gluster/glusterd2.git
synced 2026-02-05 12:45:38 +01:00
volgen: quota support for volgen changes
Fixes: #1111 and #1190 Signed-off-by: Aravinda VK <avishwan@redhat.com>
This commit is contained in:
committed by
Atin Mukherjee
parent
f704fc87f0
commit
341e02a0df
@@ -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")
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user