mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-30 14:10:57 +00:00
diagnostics: dump the master branch of the database
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
parent
218e9de40c
commit
1fa702886b
@ -6,8 +6,10 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"log"
|
"log"
|
||||||
"net"
|
"net"
|
||||||
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path"
|
"path"
|
||||||
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -103,6 +105,15 @@ func capture(w *tar.Writer) {
|
|||||||
run(t, w, "/bin/cp", "/etc/resolv.conf", ".")
|
run(t, w, "/bin/cp", "/etc/resolv.conf", ".")
|
||||||
run(t, w, "/usr/bin/dig", "docker.com")
|
run(t, w, "/usr/bin/dig", "docker.com")
|
||||||
run(t, w, "/usr/bin/wget", "-O", "-", "http://www.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() {
|
func main() {
|
||||||
|
Loading…
Reference in New Issue
Block a user