diff --git a/dumper/cmd/launch.go b/dumper/cmd/launch.go index 538be5e..a6040fa 100644 --- a/dumper/cmd/launch.go +++ b/dumper/cmd/launch.go @@ -17,6 +17,8 @@ import ( ) func (cb *CommandBuilder) prepareFS(container *kubernetes.ContainerConfigInfo) error { + events.NewStatusEvent("Looking for and mapping container /tmp") + // remove /tmp directory, // because it will be mounted from container /tmp directory if err := os.RemoveAll(globals.PathTmpFolder); err != nil { @@ -34,6 +36,7 @@ func (cb *CommandBuilder) prepareFS(container *kubernetes.ContainerConfigInfo) e } // for privileged commands link framework runtime libs to root + events.NewStatusEvent("Looking for and mapping container runtime libs") resolver := flags.NewDotnetToolResolver(container.RootFS) frameworks, err := resolver.LocateFrameworks() if err != nil { @@ -41,6 +44,8 @@ func (cb *CommandBuilder) prepareFS(container *kubernetes.ContainerConfigInfo) e } for _, framework := range frameworks { + events.NewStatusEvent(fmt.Sprintf("found: %s-%s", framework.Name, framework.Version)) + if framework.Name != flags.DotnetFrameworkApp { continue } @@ -48,10 +53,12 @@ func (cb *CommandBuilder) prepareFS(container *kubernetes.ContainerConfigInfo) e source := framework.FullPath() destination := filepath.Join(resolver.Path, framework.NameVersion()) + events.NewStatusEvent(fmt.Sprintf("trying to map from: %s to: %s", source, destination)) if utils.FileExists(destination) { continue } + events.NewStatusEvent(fmt.Sprintf("map from: %s, to: %s", source, destination)) if err := os.Symlink(source, destination); err != nil { return err } @@ -61,8 +68,6 @@ func (cb *CommandBuilder) prepareFS(container *kubernetes.ContainerConfigInfo) e } func (cb *CommandBuilder) launch() error { - events.NewStatusEvent("Looking for and mapping container fs") - container, err := kubernetes.NewContainerConfigInfo(cb.CommonOptions.ContainerRuntime, cb.CommonOptions.ContainerID) if err != nil { events.NewErrorEvent(err, "unable to locate container configuration")