-
Notifications
You must be signed in to change notification settings - Fork 294
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
Fixes #37148 - Remove subscription and system purpose host statuses #10882
Fixes #37148 - Remove subscription and system purpose host statuses #10882
Conversation
81be63a
to
0af6446
Compare
[test katello] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK, works great:
Screenshots:
Setting syspurpose on an AK
Setting syspurpose on the old UI:
Setting syspurpose on the new UI:
Legacy content host details - Setting syspurpose attributes - Pass
New host details - Setting syspurpose attributes - Pass
Activation keys - setting syspurpose attributes - Pass
Dashboard - widgets - Pass
Host status views - Pass and don't see the old status's anymore
The rails console showing the status are gone and table perferences:
Before:
[1] pry(main)> ::TablePreference.all
=> [#<TablePreference:0x0000559cc877a078
id: 1,
name: "hosts",
columns: ["power_status", "name", "subscription_status", "rhel_lifecycle_status", "last_checkin"],
created_at: Wed, 07 Feb 2024 21:30:31.591053000 UTC +00:00,
updated_at: Wed, 07 Feb 2024 21:30:31.591053000 UTC +00:00,
user_id: 4>]
=> ["Katello::SubscriptionStatus", "Katello::PurposeStatus", "Katello::PurposeAddonsStatus", "Katello::PurposeRoleStatus", "Katello::PurposeSlaStatus", "Katello::PurposeUsageStatus"]
[3] pry(main)> ::HostStatus::Status.where(type: obsolete_statuses)
=> [#<Katello::SubscriptionStatus:0x000055aa0260ebe8 id: 1, type: "Katello::SubscriptionStatus", status: 5, host_id: 1, reported_at: "[FILTERED]">]
After:
[1] pry(main)> ::TablePreference.all
=> [#<TablePreference:0x0000559cbceee900
id: 1,
name: "hosts",
columns: ["power_status", "name", "rhel_lifecycle_status", "last_checkin"],
created_at: Wed, 07 Feb 2024 21:30:31.591053000 UTC +00:00,
updated_at: Wed, 07 Feb 2024 21:32:10.328577000 UTC +00:00,
user_id: 4>]
=> ["Katello::SubscriptionStatus", "Katello::PurposeStatus", "Katello::PurposeAddonsStatus", "Katello::PurposeRoleStatus", "Katello::PurposeSlaStatus", "Katello::PurposeUsageStatus"]
[3] pry(main)> ::HostStatus::Status.where(type: obsolete_statuses)
=> []
@parthaa if you want to take a look, but stuff looks pretty good as far as code wise, but could use a second set of eyes. +1 to keeping the messages around for debugging.
[test katello] |
db/migrate/20240207191223_remove_entitlement_mode_host_statuses.rb
Outdated
Show resolved
Hide resolved
@parthaa Added fake class. |
7945469
to
991d85f
Compare
statuses and widgets
991d85f
to
4d1c4d2
Compare
squashed ✔️ |
What are the changes introduced in this pull request?
With SCA-Only the following host statuses are now irrelevant:
Katello::SubscriptionStatus,
Katello::PurposeSlaStatus,
Katello::PurposeRoleStatus,
Katello::PurposeUsageStatus,
Katello::PurposeAddonsStatus,
Katello::PurposeStatus
This PR makes the following changes:
Considerations taken when implementing this change?
Note that system purpose attributes are not removed here. You can still set release version, role, usage, etc. and these are still useful for reporting. What is removed are the statuses that tell you whether your syspurpose attributes are "correctly supported by a subscription" -- because that's not a thing with SCA always enabled.
Rather than remove Candlepin event handling entirely, I chose to still log these events in case that's needed for debugging. I figure once there are no more Candlepin events to handle, that will be a good time to actually remove the event handler.
What are the testing steps for this pull request?
Make sure you've run
before beginning to test.
Create a TablePreference by going to the old host UI and clicking 'Manage columns,' then select "Subscription status" and a few others from the Content section.
You can see this in
bundle exec rails console
viaYou will see that
"subscription_status"
is included in thecolumns
field.Run migrations:
Now, you should see that
"subscription_status"
is removed from your TablePreference. Also, this should now return nothing:Make sure everything still works: