Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Podman final #13

Open
wants to merge 26 commits into
base: hackathon
Choose a base branch
from
Open

Podman final #13

wants to merge 26 commits into from

Conversation

hexfusion
Copy link
Owner

@hexfusion hexfusion commented Jun 23, 2023

Why this should be merged

works

TODO: right now we make 1 pod per instance of the VM It would make more sense that all the containers for a VM were in the same pod

How this works

How this was tested

hexfusion and others added 26 commits June 22, 2023 21:07
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
WaitForStatus(ctx context.Context, id string, status define.ContainerStatus) (int32, error)
}

type Client struct{}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

client isn't really even needed this can all be removed or maybe we keep Stop/Start

return status, stopper, nil
}

func generateRandomString(n int) (string, error) {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was copy pasta

// if strings.HasSuffix(name, podSuffix) {
// isPod = true
// name = strings.TrimSuffix(name, podSuffix)
// }
Copy link
Owner Author

@hexfusion hexfusion Jun 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ANR expected plugin/<VMID> executable

return nil, nil, fmt.Errorf("failed to marshall pod: %w", err)
}

pctx, err := bindings.NewConnection(context.Background(), socket)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should take parent ctx

return nil, nil, fmt.Errorf("failed to create podman conn: %w", err)
}

_, err = kube.PlayWithBody(pctx, bytes.NewReader(podBytes), &kube.PlayOptions{})
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nice to dump the report returned here to logs.

@github-actions
Copy link

This PR has become stale because it has been open for 30 days with no activity. Adding the lifecycle/frozen label will cause this PR to ignore lifecycle events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants