diagnostics: dump the master branch of the database

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
Rolf Neugebauer 2016-06-07 15:48:59 +01:00
parent 218e9de40c
commit 1fa702886b

View File

@ -6,8 +6,10 @@ import (
"io"
"log"
"net"
"os"
"os/exec"
"path"
"path/filepath"
"strings"
"time"
@ -103,6 +105,15 @@ func capture(w *tar.Writer) {
run(t, w, "/bin/cp", "/etc/resolv.conf", ".")
run(t, w, "/usr/bin/dig", "docker.com")
run(t, w, "/usr/bin/wget", "-O", "-", "http://www.docker.com/")
// Dump the database
dbBase := "/Database/branch/master/ro"
filepath.Walk(dbBase, func(path string, f os.FileInfo, err error) error {
if f.Mode().IsRegular() {
run(t, w, "/bin/cat", path)
}
return nil
})
}
func main() {