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

feat: Add Xen support #1240

Draft
wants to merge 4 commits into
base: staging
Choose a base branch
from
Draft

Conversation

andreistan26
Copy link
Contributor

@andreistan26 andreistan26 commented Feb 11, 2024

Prerequisite checklist

  • Read the contribution guidelines regarding submitting new changes to the project;
  • Tested your changes against relevant architectures and platforms;
  • Ran make fmt on your commit series before opening this PR;
  • Updated relevant documentation.

Description of changes

GitHub-Closes: #990

Comment on lines +67 to +71
for {
if peekAndRead(f, reader, &logs, &errs) {
break
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can get multi-line writes with one event triggered.
IMO something better would be for peekAndRead to look ahead for the last newline so we end up with a single write.

@razvand razvand requested a review from nderjung April 9, 2024 05:41
@andreistan26 andreistan26 changed the title Add xen support for kraftkit feat(machine/xen): Add Xen support Apr 10, 2024
Copy link
Member

@craciunoiuc craciunoiuc left a comment

Choose a reason for hiding this comment

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

Some style comments from my side, I did not try it yet

buildenvs/xen.Dockerfile Outdated Show resolved Hide resolved
buildenvs/xen.Dockerfile Outdated Show resolved Hide resolved
buildenvs/xen.Dockerfile Show resolved Hide resolved
machine/platform/register_linux.go Show resolved Hide resolved
machine/xen/stub.go Outdated Show resolved Hide resolved
machine/xen/v1alpha1.go Show resolved Hide resolved
machine/xen/v1alpha1.go Outdated Show resolved Hide resolved
machine/xen/v1alpha1.go Show resolved Hide resolved
machine/xen/v1alpha1.go Outdated Show resolved Hide resolved
machine/xen/v1alpha1.go Show resolved Hide resolved
@nderjung nderjung changed the title feat(machine/xen): Add Xen support feat: Add Xen support Apr 16, 2024
python3-wheel \
uuid-dev; \
pip3 install python-config --break-system-packages; \
git clone -b stable-4.18 https://xenbits.xen.org/git-http/xen.git /xen; \
Copy link
Member

Choose a reason for hiding this comment

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

can you turn this version into an ARG?

Suggested change
git clone -b stable-4.18 https://xenbits.xen.org/git-http/xen.git /xen; \
git clone -b stable-${XEN_VERSION} https://xenbits.xen.org/git-http/xen.git /xen; \

if opts.Follow && machine.Status.State == machineapi.MachineStateRunning {

// Sometimes the kernel can boot and exit faster than we can start tailing the logs
if opts.Follow && (machine.Status.State == machineapi.MachineStateRunning || machine.Status.State == machineapi.MachineStateExited) {
Copy link
Member

Choose a reason for hiding this comment

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

Break this up on multiple lines

machine/platform/register_linux.go Show resolved Hide resolved
Signed-off-by: Andrei Stan <andreistan2003@gmail.com>
Signed-off-by: Andrei Stan <andreistan2003@gmail.com>
Signed-off-by: Andrei Stan <andreistan2003@gmail.com>
In the case of Xen, on fast applications, the logs
would have been called when the machine was already
in the exit state.

Signed-off-by: Andrei Stan <andreistan2003@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🧊 Icebox
Development

Successfully merging this pull request may close these issues.

Xen Hypervisor
2 participants