Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
hexfusion committed Jun 23, 2023
1 parent 6c097e8 commit e4ca9c9
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions vms/rpcchainvm/runtime/container/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,7 @@ type Status struct {
Addr string
}

// Bootstrap starts a VM as a subprocess after initialization completes and
// pipes the IO to the appropriate writers.
//
// The subprocess is expected to be stopped by the caller if a non-nil error is
// returned. If piping the IO fails then the subprocess will be stopped.
//
// TODO: create the listener inside this method once we refactor the tests
// Bootstrap starts a VM as a Pod.
func Bootstrap(
ctx context.Context,
listener net.Listener,
Expand Down Expand Up @@ -100,8 +94,6 @@ func Bootstrap(

// give pod unique-name
pod.Name = fmt.Sprintf("%s-%s",ogPodName,rs)


podBytes, err := yaml.Marshal(&pod)
if err != nil {
return nil, nil, fmt.Errorf("failed to marshall pod: %w", err)
Expand All @@ -112,13 +104,6 @@ func Bootstrap(
return nil, nil, fmt.Errorf("failed to create podman conn: %w", err)
}

// // ensure pod is dead before restart
// _, err = kube.DownWithBody(pctx, bytes.NewReader(podBytes), kube.DownOptions{})
// if err != nil {
// log.Info("stop failed but thats prob ok",
// zap.Error(err),
// )
// }
_, err = kube.PlayWithBody(pctx, bytes.NewReader(podBytes), &kube.PlayOptions{})
if err != nil {
return nil, nil, fmt.Errorf("failed to start pod: %w", err)
Expand Down

0 comments on commit e4ca9c9

Please sign in to comment.