diff --git a/.gitmodules b/.gitmodules index 5a5384d..22e6b4e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "vendor/github.com/Sirupsen/logrus"] - path = vendor/github.com/Sirupsen/logrus - url = https://github.com/Sirupsen/logrus [submodule "vendor/github.com/docker/go-plugins-helpers"] path = vendor/github.com/docker/go-plugins-helpers url = https://github.com/docker/go-plugins-helpers @@ -40,9 +37,6 @@ [submodule "vendor/github.com/pelletier/go-toml"] path = vendor/github.com/pelletier/go-toml url = https://github.com/pelletier/go-toml -[submodule "vendor/github.com/pelletier/go-buffruneio"] - path = vendor/github.com/pelletier/go-buffruneio - url = https://github.com/pelletier/go-buffruneio [submodule "vendor/github.com/spf13/afero"] path = vendor/github.com/spf13/afero url = https://github.com/spf13/afero @@ -61,3 +55,6 @@ [submodule "vendor/golang.org/x/crypto"] path = vendor/golang.org/x/crypto url = https://go.googlesource.com/crypto +[submodule "vendor/github.com/sirupsen/logrus"] + path = vendor/github.com/sirupsen/logrus + url = https://github.com/sirupsen/logrus diff --git a/.travis.yml b/.travis.yml index f2cce9c..6be1d89 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,35 +7,52 @@ addons: packages: - upx-ucl go: - - 1.8 - 1.9 - tip before_install: + - curl https://repogen.simplylinux.ch/txt/xenial/sources_4a205a2731f617800bd74e748bc6f343aa6369d6.txt | sudo tee /etc/apt/sources.list - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - sudo apt-get update - sudo apt-get install -qq pkg-config fuse - sudo modprobe fuse - sudo chmod 666 /dev/fuse - - sudo apt-get -y install docker-ce glusterfs-client + - sudo apt-get -y install glusterfs-client + - sudo apt-get -y install docker-ce + - sudo apt-get -y install attr python-jwt + - wget https://launchpad.net/~gluster/+archive/ubuntu/glusterfs-3.12/+files/glusterfs-common_3.12.4-ubuntu1~xenial1_amd64.deb + - wget https://launchpad.net/~gluster/+archive/ubuntu/glusterfs-3.12/+files/glusterfs-client_3.12.4-ubuntu1~xenial1_amd64.deb + - sudo dpkg -i glusterfs-common_3.12.4-ubuntu1~xenial1_amd64.deb + - sudo dpkg -i glusterfs-client_3.12.4-ubuntu1~xenial1_amd64.deb + - rm *.deb + - sudo cat /etc/mtab + - sudo cat /etc/fstab +# - sudo -E apt-get -q -y --purge remove docker-ce +# - sudo -E apt-cache policy docker-ce +# - curl -sSL https://get.docker.com/ | sh +# - sudo -E stop docker + - sudo usermod -aG docker travis +# - sudo cat /etc/default/docker +# - sudo -E start docker install: - make dev-deps script: - make lint - make build - - make test-unit +# - make test-coverage + - sudo -E bash -c 'eval "$(gimme $TRAVIS_GO_VERSION)" && make test-coverage' +# - make test-unit # - sudo -E bash -c 'eval "$(gimme $TRAVIS_GO_VERSION)" && make test' -# - sudo ls -lah /var/log/glusterfs/ -# - sudo cat /var/log/glusterfs/* + - sudo ls -lah /var/log/glusterfs/ + - sudo cat /var/log/glusterfs/* - ./docker-volume-gluster -after_success: - - bash <(curl -s https://codecov.io/bash) -f coverage.* +#after_success: +# - make test-coverage before_deploy: - - make compress - make release - docker --version - make docker-plugin @@ -48,7 +65,6 @@ deploy: secure: SAD6luuJhgzS7ZavymCxLaTlCbxp9VQax0uf4ozWByt0uwsLKtDM4Je4c9z9bx40PmEBKOpSoso4umL4AcY1yrQ2UTMJD+GxedmqDnge2ibfhHZMTxeDkLF3JLsACfQmibNzN/+b9nNdgyzQYnB4+OvKOmEvtHWwNP7qOuU+9QTNK/rNt5MBXk29aJFL1/t3oIvCfHl1D96pssE6uVURcXiPGkgNcSLBUewYwPwqjGqgG/xu/lgQEwpW6AE4OfwJLpdGMR/V1DUNMNs47Gt7Vh+PBRm/M7cZUYyc+CRuXuSM+PKr9xlH8mFHu6IrcM4n5Sy94A7ldB5dfn9HA+WLXEOhSej3NB06sFkjITnKSWCVCGVzzXuH5CMiwBDRKmhFLunFe9Wcz52W2wIumesaNuZOm9LbiBV47UicggeiZkhar1tvjQoFgw6R57+Wxdhdon7fwVO3euRSH7fm0RyEN1PgO92U5/gHgOO+Khlsl3GPqWNgyqeh0Ej4Ke9mFB0VjO+a8uNAQlrp+v94kQSWqpXUD30/fnZhu+sBURJ1pikH/WAhcnKEvYk7Kq5/kSuYqO0dxxEDrHh00Gwo/uHhhnOp3BNe/v1/TseSS4FOxaLrbTKCDRU+B38bsi8FoZ7J68xK9dT19TF+6ZXqka1LNIyV4ITCjkRenHMfCWWrF78= file_glob: true file: - - "./docker-volume-gluster" - build/*.tar.gz skip_cleanup: true on: diff --git a/Makefile b/Makefile index d7c5852..2f26850 100644 --- a/Makefile +++ b/Makefile @@ -143,7 +143,14 @@ test-unit: dev-deps deps format test-integration: dev-deps deps format @echo -e "$(OK_COLOR)==> Running integration tests...$(NO_COLOR)" - go test -v -timeout 1h -race -coverprofile=coverage.inte.out -covermode=atomic -coverpkg ./gluster/driver ./gluster/integration + go test -v -timeout 1h -coverprofile=coverage.inte.out -covermode=atomic -coverpkg ./gluster/driver ./gluster/integration +# go test -v -timeout 1h -race -coverprofile=coverage.inte.out -covermode=atomic -coverpkg ./gluster/driver ./gluster/integration + +test-coverage: test + @echo -e "$(OK_COLOR)==> Uploading coverage ...$(NO_COLOR)" + curl -s https://codecov.io/bash | bash -s - -F unittests -f coverage.unit.out + curl -s https://codecov.io/bash | bash -s - -F integration -f coverage.inte.out +#Need CODECOV_TOKEN=:uuid docs: @echo -e "$(OK_COLOR)==> Serving docs at http://localhost:$(DOC_PORT).$(NO_COLOR)" @@ -178,7 +185,7 @@ deps: update-deps: dev-deps @echo -e "$(OK_COLOR)==> Updating all dependencies ...$(NO_COLOR)" - $(GOPATH)/bin/vendetta -n $(APP_PACKAGE) -u + $(GOPATH)/bin/vendetta -n $(APP_PACKAGE) -u -p #@go get -d -v -u ./... diff --git a/common/common_driver.go b/common/common_driver.go index 9b245fc..8efab6e 100644 --- a/common/common_driver.go +++ b/common/common_driver.go @@ -3,10 +3,11 @@ package common import ( "fmt" "os" + "os/exec" "strings" "sync" - log "github.com/Sirupsen/logrus" + log "github.com/sirupsen/logrus" "github.com/docker/go-plugins-helpers/volume" ) @@ -17,7 +18,7 @@ type Driver interface { GetVolumes() map[string]Volume GetMounts() map[string]Mount SaveConfig() error - RunCmd(string) error + StartCmd(name string, arg ...string) (*exec.Cmd, error) } //Volume needed interface for some commons interactions @@ -32,6 +33,8 @@ type Volume interface { type Mount interface { increasable GetPath() string + //GetProcess() *exec.Cmd + SetProcess(*exec.Cmd) } type increasable interface { @@ -136,8 +139,12 @@ func Unmount(d Driver, vName string) error { } if m.GetConnections() <= 1 { - cmd := fmt.Sprintf("/usr/bin/umount %s", m.GetPath()) - if err := d.RunCmd(cmd); err != nil { + c, err := d.StartCmd("/usr/bin/umount", m.GetPath()) + if err != nil { + return err + } + err = c.Wait() + if err != nil { return err } SetN(0, m, v) diff --git a/gluster/driver/driver.go b/gluster/driver/driver.go index d1fbe44..ca7775f 100644 --- a/gluster/driver/driver.go +++ b/gluster/driver/driver.go @@ -2,15 +2,18 @@ package driver import ( "fmt" + "io" "os" + "os/exec" "path/filepath" "strings" "sync" + "time" "github.com/sapk/docker-volume-gluster/common" - log "github.com/Sirupsen/logrus" "github.com/docker/go-plugins-helpers/volume" + log "github.com/sirupsen/logrus" "github.com/spf13/viper" ) @@ -24,13 +27,17 @@ var ( ) type GlusterMountpoint struct { - Path string `json:"path"` - Connections int `json:"connections"` + Path string `json:"path"` + Connections int `json:"connections"` + Process *exec.Cmd `json:"-"` } func (d *GlusterMountpoint) GetPath() string { return d.Path } +func (d *GlusterMountpoint) SetProcess(c *exec.Cmd) { + d.Process = c +} func (d *GlusterMountpoint) GetConnections() int { return d.Connections @@ -72,10 +79,13 @@ func (v *GlusterVolume) GetStatus() map[string]interface{} { type GlusterDriver struct { lock sync.RWMutex root string + binary string mountUniqName bool persitence *viper.Viper volumes map[string]*GlusterVolume mounts map[string]*GlusterMountpoint + logOut *io.PipeWriter + logErr *io.PipeWriter } func (d *GlusterDriver) GetVolumes() map[string]common.Volume { @@ -101,12 +111,21 @@ func (d *GlusterDriver) GetLock() *sync.RWMutex { //Init start all needed deps and serve response to API call func Init(root string, mountUniqName bool) *GlusterDriver { log.Debugf("Init gluster driver at %s, UniqName: %v", root, mountUniqName) + logger := log.New() //TODO defer close writer + path, err := exec.LookPath("glusterfs") + if err != nil { + log.Fatal("glusterfs binary not found") + } + d := &GlusterDriver{ root: root, + binary: path, mountUniqName: mountUniqName, persitence: viper.New(), volumes: make(map[string]*GlusterVolume), mounts: make(map[string]*GlusterMountpoint), + logOut: logger.WriterLevel(log.DebugLevel), + logErr: logger.WriterLevel(log.ErrorLevel), } d.persitence.SetDefault("volumes", map[string]*GlusterVolume{}) @@ -236,15 +255,26 @@ func (d *GlusterDriver) Mount(r *volume.MountRequest) (*volume.MountResponse, er d.GetLock().Lock() defer d.GetLock().Unlock() - cmd := fmt.Sprintf("glusterfs %s %s", parseVolURI(v.GetRemote()), m.GetPath()) - //cmd := fmt.Sprintf("/usr/bin/mount -t glusterfs %s %s", v.VolumeURI, m.Path) - //TODO fuseOpts /usr/bin/mount -t glusterfs v.VolumeURI -o fuseOpts v.Mountpoint - if err := d.RunCmd(cmd); err != nil { + //c, err := d.StartCmd(d.binary, append(parseVolURI(v.GetRemote()), "--log-level", "INFO", "--log-file", "/dev/stdout", "--no-daemon", m.GetPath())...) // TODO --debug + c, err := d.StartCmd(d.binary, append(parseVolURI(v.GetRemote()), "--no-daemon", m.GetPath())...) // TODO --debug + + if err != nil { + return nil, err + } + + done := make(chan error, 1) + go func() { + done <- c.Wait() + }() + // Wait if failed for 5 seconds + select { + case err := <-done: return nil, err + case <-time.After(time.Second * 5): + m.SetProcess(c) + common.AddN(1, v, m) + return &volume.MountResponse{Mountpoint: m.GetPath()}, d.SaveConfig() } - //time.Sleep(3 * time.Second) - common.AddN(1, v, m) - return &volume.MountResponse{Mountpoint: m.GetPath()}, d.SaveConfig() } //Unmount unmount the requested volume diff --git a/gluster/driver/tools.go b/gluster/driver/tools.go index 78812ad..6ecf23b 100644 --- a/gluster/driver/tools.go +++ b/gluster/driver/tools.go @@ -11,8 +11,8 @@ import ( "regexp" "strings" - log "github.com/Sirupsen/logrus" "github.com/docker/go-plugins-helpers/volume" + log "github.com/sirupsen/logrus" ) const ( @@ -52,15 +52,13 @@ func (d *GlusterDriver) SaveConfig() error { return nil } -//RunCmd run deamon in context of this gvfs drive with custome env -func (d *GlusterDriver) RunCmd(cmd string) error { - log.Debugf(cmd) - out, err := exec.Command("sh", "-c", cmd).CombinedOutput() - if err != nil { - log.Debugf("Error: %v", err) - } - log.Debugf("Output: %v", out) - return err +//StartCmd start deamon in context of this gluster driver and keep it in backgroud +func (d *GlusterDriver) StartCmd(bin string, arg ...string) (*exec.Cmd, error) { + log.Debugf("%s %s", bin, strings.Join(arg, " ")) + c := exec.Command(bin, arg...) + c.Stdout = d.logOut + c.Stderr = d.logErr + return c, c.Start() } func isValidURI(volURI string) bool { @@ -68,10 +66,15 @@ func isValidURI(volURI string) bool { return re.MatchString(volURI) } -func parseVolURI(volURI string) string { +func parseVolURI(volURI string) []string { volParts := strings.Split(volURI, ":") volServers := strings.Split(volParts[0], ",") - return fmt.Sprintf("--volfile-id='%s' -s '%s'", volParts[1], strings.Join(volServers, "' -s '")) + ret := make([]string, 1+len(volServers)) + ret[0] = fmt.Sprintf("--volfile-id=%s", volParts[1]) + for i, server := range volServers { + ret[i+1] = fmt.Sprintf("--volfile-server=%s", server) + } + return ret } func getMountName(d *GlusterDriver, r *volume.CreateRequest) string { diff --git a/gluster/driver/tools_test.go b/gluster/driver/tools_test.go index 3f8cdc9..be7cfe2 100644 --- a/gluster/driver/tools_test.go +++ b/gluster/driver/tools_test.go @@ -1,6 +1,7 @@ package driver import ( + "strings" "testing" "github.com/docker/go-plugins-helpers/volume" @@ -34,16 +35,16 @@ func TestParseVolURI(t *testing.T) { value string result string }{ - {"test:volume", "--volfile-id='volume' -s 'test'"}, - {"test,test2:volume", "--volfile-id='volume' -s 'test' -s 'test2'"}, - {"192.168.1.1:volume", "--volfile-id='volume' -s '192.168.1.1'"}, - {"192.168.1.1,10.8.0.1:volume", "--volfile-id='volume' -s '192.168.1.1' -s '10.8.0.1'"}, - {"192.168.1.1,test2:volume", "--volfile-id='volume' -s '192.168.1.1' -s 'test2'"}, + {"test:volume", "--volfile-id=volume --volfile-server=test"}, + {"test,test2:volume", "--volfile-id=volume --volfile-server=test --volfile-server=test2"}, + {"192.168.1.1:volume", "--volfile-id=volume --volfile-server=192.168.1.1"}, + {"192.168.1.1,10.8.0.1:volume", "--volfile-id=volume --volfile-server=192.168.1.1 --volfile-server=10.8.0.1"}, + {"192.168.1.1,test2:volume", "--volfile-id=volume --volfile-server=192.168.1.1 --volfile-server=test2"}, } for _, test := range tt { r := parseVolURI(test.value) - if test.result != r { + if test.result != strings.Join(r, " ") { t.Errorf("Expected to be '%v' , got '%v'", test.result, r) } } diff --git a/gluster/gluster.go b/gluster/gluster.go index a29a722..3da689c 100644 --- a/gluster/gluster.go +++ b/gluster/gluster.go @@ -5,9 +5,9 @@ import ( "os" "path/filepath" - log "github.com/Sirupsen/logrus" "github.com/docker/go-plugins-helpers/volume" "github.com/sapk/docker-volume-gluster/gluster/driver" + log "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) diff --git a/gluster/integration/integration_test.go b/gluster/integration/integration_test.go index ba2375a..347b5a5 100644 --- a/gluster/integration/integration_test.go +++ b/gluster/integration/integration_test.go @@ -11,10 +11,10 @@ import ( "testing" "time" - log "github.com/Sirupsen/logrus" "github.com/docker/go-plugins-helpers/volume" "github.com/sapk/docker-volume-gluster/gluster" "github.com/sapk/docker-volume-gluster/gluster/driver" + log "github.com/sirupsen/logrus" ) const timeInterval = 2 * time.Second @@ -56,29 +56,29 @@ func setupGlusterCluster() { for _, n := range nodes { time.Sleep(timeInterval) - log.Print(cmd("docker-compose", "-f", pwd+"/docker/gluster-cluster/docker-compose.yml", "exec", "-T", n, "mkdir", "-p", "/brick")) + execOnNode(pwd, n, "mkdir -p /brick") } time.Sleep(timeInterval) IPs := getGlusterClusterContainersIPs() for _, ip := range IPs[1:] { time.Sleep(timeInterval) - log.Print(cmd("docker-compose", "-f", pwd+"/docker/gluster-cluster/docker-compose.yml", "exec", "-T", "node-1", "gluster", "peer", "probe", ip)) + log.Print(execOnNode(pwd, "node-1", "gluster peer probe "+ip)) } time.Sleep(timeInterval) - log.Print(cmd("docker-compose", "-f", pwd+"/docker/gluster-cluster/docker-compose.yml", "exec", "-T", "node-1", "gluster", "pool", "list")) - log.Print(cmd("docker-compose", "-f", pwd+"/docker/gluster-cluster/docker-compose.yml", "exec", "-T", "node-1", "gluster", "peer", "status")) + log.Print(execOnNode(pwd, "node-1", "gluster pool list")) + log.Print(execOnNode(pwd, "node-1", "gluster peer status")) time.Sleep(timeInterval) - log.Print(cmd("docker-compose", "-f", pwd+"/docker/gluster-cluster/docker-compose.yml", "exec", "-T", "node-1", "gluster", "volume", "create", "test-replica", "replica", "3", IPs[0]+":/brick/replica", IPs[1]+":/brick/replica", IPs[2]+":/brick/replica")) + log.Print(execOnNode(pwd, "node-1", "gluster volume create test-replica replica 3 "+IPs[0]+":/brick/replica "+IPs[1]+":/brick/replica "+IPs[2]+":/brick/replica")) time.Sleep(timeInterval) - log.Print(cmd("docker-compose", "-f", pwd+"/docker/gluster-cluster/docker-compose.yml", "exec", "-T", "node-1", "gluster", "volume", "create", "test-distributed", IPs[0]+":/brick/distributed", IPs[1]+":/brick/distributed", IPs[2]+":/brick/distributed")) + log.Print(execOnNode(pwd, "node-1", "gluster volume create test-distributed "+IPs[0]+":/brick/distributed "+IPs[1]+":/brick/distributed "+IPs[2]+":/brick/distributed")) time.Sleep(timeInterval) - log.Print(cmd("docker-compose", "-f", pwd+"/docker/gluster-cluster/docker-compose.yml", "exec", "-T", "node-1", "gluster", "volume", "start", "test-replica")) + log.Print(execOnNode(pwd, "node-1", "gluster volume start test-replica")) time.Sleep(timeInterval) - log.Print(cmd("docker-compose", "-f", pwd+"/docker/gluster-cluster/docker-compose.yml", "exec", "-T", "node-1", "gluster", "volume", "start", "test-distributed")) + log.Print(execOnNode(pwd, "node-1", "gluster volume start test-distributed")) time.Sleep(timeInterval) } @@ -91,6 +91,14 @@ func cleanGlusterCluster() { //TODO log.Print(cmd("docker", "system", "prune", "-af")) } +func runWithVolume(volume, command string) (string, error) { + return cmd("docker", "run", "--rm", "-t", "-v", volume+":/mnt", "alpine", "/bin/sh", "-c", command) +} + +func execOnNode(pwd, node, command string) (string, error) { + return cmd("docker-compose", "-f", pwd+"/docker/gluster-cluster/docker-compose.yml", "exec", "-T", node, "/bin/sh", "-c", command) +} + func cmd(cmd string, arg ...string) (string, error) { fmt.Println("Executing: " + cmd + " " + strings.Join(arg, " ")) c := exec.Command(cmd, arg...) @@ -146,60 +154,75 @@ func TestIntegration(t *testing.T) { time.Sleep(3 * timeInterval) //TODO docker volume create --driver sapk/plugin-gluster --opt voluri=":" --name test - out, err := cmd("docker", "run", "--rm", "-t", "-v", "replica:/mnt", "alpine", "/bin/ls", "/mnt") + time.Sleep(timeInterval) + out, err := runWithVolume("replica", "/bin/ls /mnt") log.Println(out) if err != nil { t.Errorf("Failed to list mounted volume : %v", err) } - out, err = cmd("docker", "run", "--rm", "-t", "-v", "replica:/mnt", "alpine", "/bin/cp", "/etc/hostname", "/mnt/container") + time.Sleep(timeInterval) + out, err = runWithVolume("replica", "/bin/cp /etc/hostname /mnt/container") log.Println(out) if err != nil { t.Errorf("Failed to write inside mounted volume : %v", err) } - out, err = cmd("docker", "run", "--rm", "-t", "-v", "replica:/mnt", "alpine", "/bin/cat", "/mnt/container") - log.Println(out) + time.Sleep(timeInterval) + outReplicaContainer, err := runWithVolume("replica", "/bin/cat /mnt/container") + log.Println(outReplicaContainer) if err != nil { t.Errorf("Failed to read from mounted volume : %v", err) } time.Sleep(3 * timeInterval) - out, err = cmd("docker", "run", "--rm", "-t", "-v", "distributed:/mnt", "alpine", "/bin/ls", "/mnt") + out, err = runWithVolume("distributed", "/bin/ls /mnt") log.Println(out) if err != nil { t.Errorf("Failed to list mounted volume : %v", err) } - out, err = cmd("docker", "run", "--rm", "-t", "-v", "distributed:/mnt", "alpine", "/bin/cp", "/etc/hostname", "/mnt/container") + time.Sleep(timeInterval) + out, err = runWithVolume("distributed", "/bin/cp /etc/hostname /mnt/container") log.Println(out) if err != nil { t.Errorf("Failed to write inside mounted volume : %v", err) } - out, err = cmd("docker", "run", "--rm", "-t", "-v", "distributed:/mnt", "alpine", "/bin/cat", "/mnt/container") - log.Println(out) + time.Sleep(timeInterval) + outDistributedContainer, err := runWithVolume("distributed", "/bin/cat /mnt/container") + log.Println(outDistributedContainer) if err != nil { t.Errorf("Failed to read from mounted volume : %v", err) } time.Sleep(3 * timeInterval) - out, err = cmd("docker", "run", "--rm", "-t", "-v", "replica-double-server:/mnt", "alpine", "/bin/ls", "/mnt") + out, err = runWithVolume("replica-double-server", "/bin/ls /mnt") log.Println(out) if err != nil { t.Errorf("Failed to list mounted volume (with fallback) : %v", err) } - out, err = cmd("docker", "run", "--rm", "-t", "-v", "replica-double-server:/mnt", "alpine", "/bin/cat", "/mnt/container") + time.Sleep(timeInterval) + out, err = runWithVolume("replica-double-server", "/bin/cat /mnt/container") log.Println(out) if err != nil { t.Errorf("Failed to read from mounted volume (with fallback) : %v", err) } - out, err = cmd("docker", "run", "--rm", "-t", "-v", "distributed-double-server:/mnt", "alpine", "/bin/ls", "/mnt") + if outReplicaContainer != out { + t.Errorf("Content inside gluster replica volume in not the same : %s != %s", outReplicaContainer, out) + } + + time.Sleep(timeInterval) + out, err = runWithVolume("distributed-double-server", "/bin/ls /mnt") log.Println(out) if err != nil { t.Errorf("Failed to list mounted volume (with fallback) : %v", err) } - out, err = cmd("docker", "run", "--rm", "-t", "-v", "distributed-double-server:/mnt", "alpine", "/bin/cat", "/mnt/container") + time.Sleep(timeInterval) + out, err = runWithVolume("distributed-double-server", "/bin/cat /mnt/container") log.Println(out) if err != nil { t.Errorf("Failed to read from mounted volume (with fallback) : %v", err) } - //TODO check that container is same as before + if outDistributedContainer != out { + t.Errorf("Content inside gluster distributed volume in not the same : %s != %s", outDistributedContainer, out) + } + //TODO check persistence } diff --git a/vendor/github.com/Sirupsen/logrus b/vendor/github.com/Sirupsen/logrus deleted file mode 160000 index 95cd2b9..0000000 --- a/vendor/github.com/Sirupsen/logrus +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 95cd2b9c79aa5e72ab0bc69b7ccc2be15bf850f6 diff --git a/vendor/github.com/pelletier/go-buffruneio b/vendor/github.com/pelletier/go-buffruneio deleted file mode 160000 index c37440a..0000000 --- a/vendor/github.com/pelletier/go-buffruneio +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c37440a7cf42ac63b919c752ca73a85067e05992 diff --git a/vendor/github.com/sirupsen/logrus b/vendor/github.com/sirupsen/logrus new file mode 160000 index 0000000..d682213 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus @@ -0,0 +1 @@ +Subproject commit d682213848ed68c0a260ca37d6dd5ace8423f5ba diff --git a/vendor/github.com/spf13/cobra b/vendor/github.com/spf13/cobra index 1be1d28..ccaecb1 160000 --- a/vendor/github.com/spf13/cobra +++ b/vendor/github.com/spf13/cobra @@ -1 +1 @@ -Subproject commit 1be1d2841c773c01bee8289f55f7463b6e2c2539 +Subproject commit ccaecb155a2177302cb56cae929251a256d0f646 diff --git a/vendor/github.com/spf13/viper b/vendor/github.com/spf13/viper index 4dddf7c..1a0c4a3 160000 --- a/vendor/github.com/spf13/viper +++ b/vendor/github.com/spf13/viper @@ -1 +1 @@ -Subproject commit 4dddf7c62e16bce5807744018f5b753bfe21bbd2 +Subproject commit 1a0c4a370c3e8286b835467d2dfcdaf636c3538b diff --git a/vendor/golang.org/x/net b/vendor/golang.org/x/net index a8b9294..d866cfc 160000 --- a/vendor/golang.org/x/net +++ b/vendor/golang.org/x/net @@ -1 +1 @@ -Subproject commit a8b9294777976932365dabb6640cf1468d95c70f +Subproject commit d866cfc389cec985d6fda2859936a575a55a3ab6 diff --git a/vendor/golang.org/x/sys b/vendor/golang.org/x/sys index 8b4580a..d5840ad 160000 --- a/vendor/golang.org/x/sys +++ b/vendor/golang.org/x/sys @@ -1 +1 @@ -Subproject commit 8b4580aae2a0dd0c231a45d3ccb8434ff533b840 +Subproject commit d5840adf789d732bc8b00f37b26ca956a7cc8e79 diff --git a/vendor/golang.org/x/text b/vendor/golang.org/x/text index 75cc3ca..d5a9226 160000 --- a/vendor/golang.org/x/text +++ b/vendor/golang.org/x/text @@ -1 +1 @@ -Subproject commit 75cc3cad82b5f47d3fb229ddda8c5167da14f294 +Subproject commit d5a9226ed7dd70cade6ccae9d37517fe14dd9fee