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

Change virt-v2v bash script to use go wrapper #746

Merged
merged 2 commits into from
Feb 18, 2024

Conversation

bkhizgiy
Copy link
Member

This PR updates the virt-v2v image, replacing the existing bash script with a Go wrapper. This enhancement simplifies control over code changes.

@bkhizgiy bkhizgiy force-pushed the go_wrapper branch 2 times, most recently from 8e70f6f to 105deb2 Compare February 15, 2024 11:03
Copy link

codecov bot commented Feb 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a55e08e) 0.00% compared to head (e8b2990) 17.09%.
Report is 194 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##           main     #746       +/-   ##
=========================================
+ Coverage      0   17.09%   +17.09%     
=========================================
  Files         0       87       +87     
  Lines         0    17819    +17819     
=========================================
+ Hits          0     3047     +3047     
- Misses        0    14529    +14529     
- Partials      0      243      +243     
Flag Coverage Δ
unittests 17.09% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

virt-v2v/cold/entrypoint.go Outdated Show resolved Hide resolved
@bkhizgiy bkhizgiy force-pushed the go_wrapper branch 2 times, most recently from 171377e to 14f6a8b Compare February 15, 2024 16:24
Copy link
Member

@ahadas ahadas left a comment

Choose a reason for hiding this comment

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

looks good, minor comments

virt-v2v/cold/entrypoint.go Show resolved Hide resolved
virt-v2v/cold/entrypoint.go Show resolved Hide resolved
@bkhizgiy
Copy link
Member Author

After adding modification the correct command is executed now but it still taking long time (almost an hour) triggered the same conversion with the original image for time and output comparison.

@bkhizgiy
Copy link
Member Author

After adding modification the correct command is executed now but it still taking long time (almost an hour) triggered the same conversion with the original image for time and output comparison.

The issue is with the monitor code, it wasn't running properly, so both the conversion + copy disks steps were count under the conversion (and the time adds up similarly to the original code two steps), triggered another conversion to see if the monitor running correctly after the changes.

@ahadas
Copy link
Member

ahadas commented Feb 18, 2024

The issue is with the monitor code, it wasn't running properly, so both the conversion + copy disks steps were count under the conversion (and the time adds up similarly to the original code two steps)

I think that I saw it once when I played with the VDDK validation - it doesn't seem to be a result of your changes
but that wouldn't explain the relatively long time, @bkhizgiy did you see that VDDK is now specified correctly?

@bkhizgiy
Copy link
Member Author

The issue is with the monitor code, it wasn't running properly, so both the conversion + copy disks steps were count under the conversion (and the time adds up similarly to the original code two steps)

I think that I saw it once when I played with the VDDK validation - it doesn't seem to be a result of your changes but that wouldn't explain the relatively long time, @bkhizgiy did you see that VDDK is now specified correctly?

Yes I see the command is set correctly now, and i also compered the outputs with my changes and the original script and it the same. Its just not running the monitor part correctly.

For the original script the conversion took 15 min and disk copy 43 min.
For my changes the conversion took 55 min and the copy none, so i just think its not recognize correctly when to move on to the next step.

@liranr23
Copy link
Member

The issue is with the monitor code, it wasn't running properly, so both the conversion + copy disks steps were count under the conversion (and the time adds up similarly to the original code two steps)

I think that I saw it once when I played with the VDDK validation - it doesn't seem to be a result of your changes but that wouldn't explain the relatively long time, @bkhizgiy did you see that VDDK is now specified correctly?

Yes I see the command is set correctly now, and i also compered the outputs with my changes and the original script and it the same. Its just not running the monitor part correctly.

For the original script the conversion took 15 min and disk copy 43 min. For my changes the conversion took 55 min and the copy none, so i just think its not recognize correctly when to move on to the next step.

that might be because the last update of the patch (breaking the two commands apart)
previously it was made as virt-v2v ... |& monitor, so the the pipeline connected the output of virt-v2v to the monitor command input.
now it looks like it first executing virt-v2v and wait for it to finish, then it runs the monitor command

return
}

tee := io.TeeReader(virtV2vStdoutPipe, os.Stdout)
Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed the monitor consuming issue, now the conversion phase work properly.

Copy link
Member Author

Choose a reason for hiding this comment

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

Screenshot from 2024-02-18 15-18-57

virt-v2v/cold/entrypoint.go Show resolved Hide resolved
virt-v2v/cold/entrypoint.go Outdated Show resolved Hide resolved
virt-v2v/cold/entrypoint.go Outdated Show resolved Hide resolved
Copy link

Quality Gate Passed Quality Gate passed

Issues
1 New issue

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@ahadas
Copy link
Member

ahadas commented Feb 18, 2024

passes CI, validated locally - merging
and let's follow up with the fix for OVA which was the motivation for these changes

@ahadas ahadas merged commit 2f30544 into kubev2v:main Feb 18, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants