Browse code

Reduce spew data dumped

Signed-off-by: Brian Goff <cpuguy83@gmail.com>

Brian Goff authored on 2016/11/18 02:12:35
Showing 1 changed files
... ...
@@ -27,7 +27,36 @@ func (d *Daemon) dumpDaemon(dir string) (string, error) {
27 27
 		return "", errors.Wrap(err, "failed to open file to write the daemon datastructure dump")
28 28
 	}
29 29
 	defer f.Close()
30
-	spew.Fdump(f, d) // Does not return an error
30
+
31
+	dump := struct {
32
+		containers      interface{}
33
+		names           interface{}
34
+		links           interface{}
35
+		execs           interface{}
36
+		volumes         interface{}
37
+		images          interface{}
38
+		layers          interface{}
39
+		imageReferences interface{}
40
+		downloads       interface{}
41
+		uploads         interface{}
42
+		registry        interface{}
43
+		plugins         interface{}
44
+	}{
45
+		containers:      d.containers,
46
+		execs:           d.execCommands,
47
+		volumes:         d.volumes,
48
+		images:          d.imageStore,
49
+		layers:          d.layerStore,
50
+		imageReferences: d.referenceStore,
51
+		downloads:       d.downloadManager,
52
+		uploads:         d.uploadManager,
53
+		registry:        d.RegistryService,
54
+		plugins:         d.PluginStore,
55
+		names:           d.nameIndex,
56
+		links:           d.linkIndex,
57
+	}
58
+
59
+	spew.Fdump(f, dump) // Does not return an error
31 60
 	f.Sync()
32 61
 	return path, nil
33 62
 }