MCPcopy Index your code
hub / github.com/cortexlabs/cortex / cmdDebug

Function cmdDebug

cli/cmd/cluster.go:1198–1220  ·  view source on GitHub ↗
(awsClient *awslib.Client, accessConfig *clusterconfig.AccessConfig)

Source from the content-addressed store, hash-verified

1196}
1197
1198func cmdDebug(awsClient *awslib.Client, accessConfig *clusterconfig.AccessConfig) {
1199 // note: if modifying this string, also change it in files.IgnoreCortexDebug()
1200 debugFileName := fmt.Sprintf("cortex-debug-%s.tgz", time.Now().UTC().Format("2006-01-02-15-04-05"))
1201
1202 containerDebugPath := "/out/" + debugFileName
1203 copyFromPaths := []dockerCopyFromPath{
1204 {
1205 containerPath: containerDebugPath,
1206 localDir: _cwd,
1207 },
1208 }
1209
1210 out, exitCode, err := runManagerAccessCommand("/root/debug.sh "+containerDebugPath, *accessConfig, awsClient, nil, copyFromPaths)
1211 if err != nil {
1212 exit.Error(err)
1213 }
1214 if exitCode == nil || *exitCode != 0 {
1215 exit.Error(ErrorClusterDebug(out))
1216 }
1217
1218 fmt.Println("saved cluster info to ./" + debugFileName)
1219 return
1220}
1221
1222func refreshCachedClusterConfig(awsClient *awslib.Client, accessConfig *clusterconfig.AccessConfig, printToStdout bool) clusterconfig.Config {
1223 // add empty file if cached cluster doesn't exist so that the file output by manager container maintains current user permissions

Callers 1

cluster.goFile · 0.85

Calls 4

ErrorFunction · 0.92
runManagerAccessCommandFunction · 0.85
ErrorClusterDebugFunction · 0.85
FormatMethod · 0.45

Tested by

no test coverage detected