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

Remove the virtualization code #9276

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

cbosdo
Copy link
Contributor

@cbosdo cbosdo commented Sep 17, 2024

What does this PR change?

Trash virtualization features.

GUI diff

The whole Virtualization tab in the systems details is gone!

Documentation

Test coverage

ℹ️ If a major new functionality is added, it is strongly recommended that tests for the new functionality are added to the Cucumber test suite

  • No tests: removing code and related tests will probably increase the code coverage in the end 😉

  • DONE

Links

Issue(s): #
Port(s): # add downstream PR(s), if any

  • DONE

Changelogs

Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository

If you don't need a changelog check, please mark this checkbox:

  • No changelog needed

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Re-run a test

If you need to re-run a test, please mark the related checkbox, it will be unchecked automatically once it has re-run:

  • Re-run test "changelog_test"
  • Re-run test "backend_unittests_pgsql"
  • Re-run test "java_pgsql_tests"
  • Re-run test "schema_migration_test_pgsql"
  • Re-run test "susemanager_unittests"
  • Re-run test "javascript_lint"
  • Re-run test "spacecmd_unittests"

Before you merge

Check How to branch and merge properly!

@cbosdo cbosdo requested review from a team as code owners September 17, 2024 21:47
@cbosdo cbosdo requested review from mackdk and ycedres and removed request for a team September 17, 2024 21:47
Copy link
Contributor

👋 Hello! Thanks for contributing to our project.
Acceptance tests will take some time (aprox. 1h), please be patient ☕
You can see the progress at the end of this page and at https://github.com/uyuni-project/uyuni/pull/9276/checks
Once tests finish, if they fail, you can check 👀 the cucumber report. See the link at the output of the action.
You can also check the artifacts section, which contains the logs at https://github.com/uyuni-project/uyuni/pull/9276/checks.

If you are unsure the failing tests are related to your code, you can check the "reference jobs". These are jobs that run on a scheduled time with code from master. If they fail for the same reason as your build, it means the tests or the infrastructure are broken. If they do not fail, but yours do, it means it is related to your code.

Reference tests:

KNOWN ISSUES

Sometimes the build can fail when pulling new jar files from download.opensuse.org . This is a known limitation. Given this happens rarely, when it does, all you need to do is rerun the test. Sorry for the inconvenience.

For more tips on troubleshooting, see the troubleshooting guide.

Happy hacking!
⚠️ You should not merge if acceptance tests fail to pass. ⚠️

@cbosdo
Copy link
Contributor Author

cbosdo commented Sep 19, 2024

@Etheryte could you take a look at the 2 remaining JS issues pointed out by sonarcloud? I know they aren't introduced in this PR, but it seems to me that they are valid.

@Etheryte
Copy link
Member

@cbosdo The errors are now somehow gone from the latest Sonarcloud scan, but the issue that was there with unused concat() result is a bug. Off the top of my head, the issue was essentially someArray.concat(item), where the result is unused, meaning the concat has no effect. I'm not sure why Sonar doesn't highlight that issue anymore though?

@cbosdo
Copy link
Contributor Author

cbosdo commented Sep 24, 2024

@cbosdo The errors are now somehow gone from the latest Sonarcloud scan, but the issue that was there with unused concat() result is a bug. Off the top of my head, the issue was essentially someArray.concat(item), where the result is unused, meaning the concat has no effect. I'm not sure why Sonar doesn't highlight that issue anymore though?

Doh! I didn't understand why it was showing it up in this PR since that code wasn't touched in it... but yes, those two occurrences looked perfectly valid to me.

srbarrios
srbarrios previously approved these changes Sep 24, 2024
Copy link
Member

@srbarrios srbarrios left a comment

Choose a reason for hiding this comment

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

Test code side, LGTM.
Even if still a draft, I don't see anything missing.
The rest of the PR, I will not review.

@cbosdo
Copy link
Contributor Author

cbosdo commented Sep 30, 2024

I think this is too much removal. We do not want to create VMs, but show the topology and the status is still needed. Let's discuss how far we want to go

Showing the topology is still possible in the Virtual systems list page.

@cbosdo cbosdo requested a review from mcalmer September 30, 2024 11:27
@cbosdo cbosdo changed the title Remove the virtualization code. Remove the virtualization code Sep 30, 2024
@mcalmer
Copy link
Contributor

mcalmer commented Sep 30, 2024

I think this is too much removal. We do not want to create VMs, but show the topology and the status is still needed. Let's discuss how far we want to go

Showing the topology is still possible in the Virtual systems list page.

But who send the data from the libvirt host about the available VMs?
I think we need to add a VirtualHostGatherer for libvirt or is the salt engine still available?
@cbosdo if the VirtualHostGatherer plugin is needed, please open an issue for it.

rhnActionVirtVcpu,
rhnActionVirtVolDelete CASCADE;

DELETE FROM rhnActionType WHERE label LIKE 'virt.%';
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure if this is a good idea. Would this change the Event History of systems which used such an action before?
I think changing the event history is critical. I would like to have the OK from @admd before doing it.

Is there maybe a way to drop these tables and classes but keep the event history?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changing the history for actions that are supposed to not be used shouldn't be a problem. If that is a problem, it probably mean we need to keep the whole feature because someone uses it.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's a tricky one from legal perspective. Ideally, we should not remove any history from the systems, at least for a pre-defined time(6 months or so, different companies have different policies)

If we can somehow keep the history while removing the feature itself, that would be ideal. If that's not feasible and requires a lot more work, I would just go ahead with this change. However, would add a note in release notes that this will happen.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The problem is that we will have to keep a dozen of tables and the matching Java code, just to show empty content because no-one was using it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok if there is no easy way, we go ahead with your change. We will add a note in release notes when times comes.

@cbosdo
Copy link
Contributor Author

cbosdo commented Sep 30, 2024

I think this is too much removal. We do not want to create VMs, but show the topology and the status is still needed. Let's discuss how far we want to go

Showing the topology is still possible in the Virtual systems list page.

But who send the data from the libvirt host about the available VMs? I think we need to add a VirtualHostGatherer for libvirt or is the salt engine still available? @cbosdo if the VirtualHostGatherer plugin is needed, please open an issue for it.

There is a libvirt host gatherer that we could add. The engine was somewhat fragile and is now removed.

@admd
Copy link
Contributor

admd commented Oct 2, 2024

I think this is too much removal. We do not want to create VMs, but show the topology and the status is still needed. Let's discuss how far we want to go

Showing the topology is still possible in the Virtual systems list page.

But who send the data from the libvirt host about the available VMs? I think we need to add a VirtualHostGatherer for libvirt or is the salt engine still available? @cbosdo if the VirtualHostGatherer plugin is needed, please open an issue for it.

There is a libvirt host gatherer that we could add. The engine was somewhat fragile and is now removed.

@cbosdo would the Virtual Host field on this page https://suma-long-43-srv.mgr.suse.de/rhn/manager/systems/list/virtual still be populated after the engine removal and we can see the relation between virtual host & virtual systems?

@cbosdo
Copy link
Contributor Author

cbosdo commented Oct 2, 2024

I think this is too much removal. We do not want to create VMs, but show the topology and the status is still needed. Let's discuss how far we want to go

Showing the topology is still possible in the Virtual systems list page.

But who send the data from the libvirt host about the available VMs? I think we need to add a VirtualHostGatherer for libvirt or is the salt engine still available? @cbosdo if the VirtualHostGatherer plugin is needed, please open an issue for it.

There is a libvirt host gatherer that we could add. The engine was somewhat fragile and is now removed.

@cbosdo would the Virtual Host field on this page https://suma-long-43-srv.mgr.suse.de/rhn/manager/systems/list/virtual still be populated after the engine removal and we can see the relation between virtual host & virtual systems?

Yes it will be populated: the hardware refresh and the virtual host gatherer are the ones involved on this IIRC.

@admd
Copy link
Contributor

admd commented Oct 7, 2024

I think this is too much removal. We do not want to create VMs, but show the topology and the status is still

Yes it will be populated: the hardware refresh and the virtual host gatherer are the ones involved on this IIRC.

Good! We just need to make sure that we don't break that part.

@mcalmer
Copy link
Contributor

mcalmer commented Oct 7, 2024

I think this is too much removal. We do not want to create VMs, but show the topology and the status is still

Yes it will be populated: the hardware refresh and the virtual host gatherer are the ones involved on this IIRC.

Good! We just need to make sure that we don't break that part.

It will break, as the admin has to setup the libvirt module. Especially when an authentication is required.
But first I will create an issue for adding the libvirt module and implement a way to configure it

@mcalmer
Copy link
Contributor

mcalmer commented Oct 7, 2024

@admd I have created https://github.com/SUSE/spacewalk/issues/25437 and added it to the planning board

@cbosdo
Copy link
Contributor Author

cbosdo commented Oct 7, 2024

It will break, as the admin has to setup the libvirt module. Especially when an authentication is required. But first I will create an issue for adding the libvirt module and implement a way to configure it

I don't care if there is a migration path and the user have to take action.... otherwise we keep everything for ever! Either we want to remove the WHOLE feature or NOTHING!

Copy link
Contributor

@mcalmer mcalmer left a comment

Choose a reason for hiding this comment

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

ok, but we need to work on the replacement to keep the host <=> VM relation

@cbosdo
Copy link
Contributor Author

cbosdo commented Oct 8, 2024

ok, but we need to work on the replacement to keep the host <=> VM relation

Remember that the libvirt engine was only set up if the Virtualization Host Addon type was enabled on the host. The host / VM relation was there before... Everything else was there before

@rjmateus
Copy link
Member

rjmateus commented Oct 8, 2024

@mcalmer how was this information added and used? Was it part of the data that is sent to SCC?

We should not reduce the data quality we send to SCC. We should have a look and see if adding the connection to libvirt on "Virtual Host Managers" is enough (I think it should be, since this is also the case for other providers).
I tried to install the virtual host gatherer for libvirt and it returns an exception. Doesn't loo to complex but it will need some work in that regard (some fields should not be null by default, but instead a empty string)

@cbosdo
Copy link
Contributor Author

cbosdo commented Oct 8, 2024

Before looking at the libvirt virtual host gatherer, we need to check what happens with just the regular hardware update. For sure you will not know about the unregistered VM running on a host... but that has always been the case without the Virtualization Addon.

My point here is that we should not discuss keeping data that are gathered only using the virtualization addon as this thing is not supposed to be used

@rjmateus
Copy link
Member

rjmateus commented Oct 8, 2024

My point here is that we should not discuss keeping data that are gathered only using the virtualization addon as this thing is not supposed to be used

Agree. But we first need to check if is being used and what could be broken. Then plan on how to replace that data.

@mcalmer
Copy link
Contributor

mcalmer commented Oct 8, 2024

@cbosdo yes, it was working before you implemented the new virtualization feature. But we had this "Poller" in the past from the traditional stack and when I remember correctly, this was removed when you implemented the new way with the salt engine.
We need to check.

@rjmateus yes, this is used when sending data to SCC

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.

6 participants