Skip to content

Split the populator image #135

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

Merged
merged 2 commits into from
Feb 7, 2023
Merged

Split the populator image #135

merged 2 commits into from
Feb 7, 2023

Conversation

liranr23
Copy link
Member

This patch will split the populator image.
One image acts as a controller to the populator - 'populator-controller' and the actual populator action will be executed by the 'ovirt-populator' image.

This will allow a separation in logic, allowing to add more source providers images and use the same controller for all.

Signed-off-by: Liran Rotenberg [email protected]

@liranr23
Copy link
Member Author

Building the ovirt-populator image works. Locally it also runs, but on my OCP it doesn't - exec /ovirt-populator: exec format error.
There are some bugs that seems to relate the issue I see golang/go#53116 and golang/go#53804 (Basing on golang/go#53804 (comment), it relates to CGO_ENABLED=0. There is also a kernel fix in v6.1 and above. But the images used to compile is using 5.14.0-162.6.1.el9_1.x86_64. Still, it does seem to work locally.

@liranr23
Copy link
Member Author

liranr23 commented Feb 2, 2023

Building the ovirt-populator image works. Locally it also runs, but on my OCP it doesn't - exec /ovirt-populator: exec format error. There are some bugs that seems to relate the issue I see golang/go#53116 and golang/go#53804 (Basing on golang/go#53804 (comment), it relates to CGO_ENABLED=0. There is also a kernel fix in v6.1 and above. But the images used to compile is using 5.14.0-162.6.1.el9_1.x86_64. Still, it does seem to work locally.

works now (somehow, my guess it's either luck or changing it into cmd directory) :)

@codecov
Copy link

codecov bot commented Feb 2, 2023

Codecov Report

Base: 33.89% // Head: 33.91% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (0e78067) compared to base (bc83af6).
Patch has no changes to coverable lines.

❗ Current head 0e78067 differs from pull request most recent head 0c200aa. Consider uploading reports for the commit 0c200aa to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #135      +/-   ##
==========================================
+ Coverage   33.89%   33.91%   +0.02%     
==========================================
  Files          42       42              
  Lines        8098     8093       -5     
==========================================
  Hits         2745     2745              
+ Misses       5136     5131       -5     
  Partials      217      217              
Flag Coverage Δ
unittests 33.91% <ø> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
...m/kubev2v/forklift/pkg/controller/plan/kubevirt.go 2.04% <0.00%> (+<0.01%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@liranr23 liranr23 marked this pull request as ready for review February 5, 2023 07:53
@bennyz
Copy link
Member

bennyz commented Feb 5, 2023 via email

@liranr23
Copy link
Member Author

liranr23 commented Feb 5, 2023

Right I forgot we have the group and kind

if it's in the CR, we can use the populator-controller image to take it in provide it to the the library, without modifying the library further.

So, I think we don't really need to change a thing? once we have other kinds we may change the image based on that? or we should providing an image anyway in the CR?

@ahadas
Copy link
Member

ahadas commented Feb 5, 2023

@liranr23 you mean another provider type that uses volume-populator? if so I don't see why not to do it before - even if ovirt is the only provider, I'd still expect the image of the populator to be configurable (and propagated from the controller that takes the forklift or mtv image that is set in the operator)

@liranr23
Copy link
Member Author

liranr23 commented Feb 5, 2023

@liranr23 you mean another provider type that uses volume-populator? if so I don't see why not to do it before - even if ovirt is the only provider, I'd still expect the image of the populator to be configurable (and propagated from the controller that takes the forklift or mtv image that is set in the operator)

benny and i discussed offline, we think a configmap might be a solution for this. i'm still bothered with how the controller will know which kind he will be looking for.

@ahadas ahadas self-requested a review February 6, 2023 10:18
This patch will split the populator image.
One image acts as a controller to the populator - 'populator-controller'
and the actual populator action will be executed by the
'ovirt-populator' image.

This will allow a separation in logic, allowing to add more source
providers images and use the same controller for all.

Signed-off-by: Liran Rotenberg <[email protected]>
Triggers the push for the split images.

Signed-off-by: Liran Rotenberg <[email protected]>
@ahadas ahadas self-requested a review February 7, 2023 14:41
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
6.5% 6.5% Duplication

@ahadas ahadas requested a review from bennyz February 7, 2023 16:16
@ahadas ahadas merged commit 84c46ae into kubev2v:main Feb 7, 2023
@ahadas
Copy link
Member

ahadas commented Feb 8, 2023

@liranr23 liranr23 deleted the split_populator branch February 8, 2023 08:14
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