-
Notifications
You must be signed in to change notification settings - Fork 900
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
Fix aggregate_cpu/memory utilization methods for Containers #22951
Fix aggregate_cpu/memory utilization methods for Containers #22951
Conversation
The default aggregate_cpu/memory utilization methods use Hosts not ContainerNodes which doesn't work for ContainerManagers.
Checked commit agrare@bfa1249 with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint |
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.
Tested locally and it is working
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.
nice fix.
this will also use the database and can be inlined. so super kudos
ping @Fryguy |
Backported to
|
…_cpu_memory_methods Fix aggregate_cpu/memory utilization methods for Containers (cherry picked from commit 5a25f61)
The default aggregate_cpu/memory utilization methods use Hosts not ContainerNodes which doesn't work for ContainerManagers.
These are the methods being used for the table, https://github.com/ManageIQ/manageiq/blob/master/app/models/mixins/aggregation_mixin.rb#L5 which use
:host_hardwares
which won't be valid for ContainerManagers.Before:
![image](https://private-user-images.githubusercontent.com/12851112/314562918-6b672c4e-7e5f-4b9a-a619-7a44bb580762.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyODY4NzYsIm5iZiI6MTczOTI4NjU3NiwicGF0aCI6Ii8xMjg1MTExMi8zMTQ1NjI5MTgtNmI2NzJjNGUtN2U1Zi00YjlhLWE2MTktN2E0NGJiNTgwNzYyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDE1MDkzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJkYTQzMmNjNTA4MjE3MzkzNTA1ODI1YjdhZDc1OTk5NWQ1Yjk1MzNlOGFkNjdkODFiNGI5MTRkODQ2MzdjYjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.GhvjrRcoAP_YAcHnJqTHKw2GveYo-1tk9hRhUamg-EA)
After:
![image](https://private-user-images.githubusercontent.com/12851112/314562741-6517e39e-79ad-439e-8e4f-94231d2f6c56.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyODY4NzYsIm5iZiI6MTczOTI4NjU3NiwicGF0aCI6Ii8xMjg1MTExMi8zMTQ1NjI3NDEtNjUxN2UzOWUtNzlhZC00MzllLThlNGYtOTQyMzFkMmY2YzU2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDE1MDkzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWExMDJkNGQ5MTU3YzE0YzcyMGVhZTBhMzJlNjQ3ZWZiNDg2ZWYyZGVhZTgwYWJkYWJiZjJiZDc1YzlkZGZkOTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.AZle_JDHS0zLwhVBwh2aFWNsTuaeHqLdm3-8DgPc1cc)
Follow-up,
what do other providers without Hosts do (thinking PhysicalInfraManagers that have PhysicalServers)It seems like Infra and Container are the only two manager types that show aggregate cpu/memory on the UI.