Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Fix DIMMCount and CPUCount #634

Merged
merged 5 commits into from
Feb 1, 2019
Merged

Fix DIMMCount and CPUCount #634

merged 5 commits into from
Feb 1, 2019

Conversation

perigrin
Copy link
Contributor

@perigrin perigrin commented Feb 1, 2019

The Device Report sends up a dimms and a cpus properties that list the memory DIMMs and the CPUs respectively. These were intended to replace the older memory and processor properties.

This PR updates the DIMMCount and CPUCount validations to use the newer properties instead of the older one. This entirely deprecates processors and leaves the only the total property being used from the object in the memory property (which currently has no analog in DIMMs).

@perigrin perigrin added the WIP incomplete: this pull request is not ready for merge label Feb 1, 2019
@perigrin perigrin self-assigned this Feb 1, 2019
@perigrin perigrin added refactor validation device reports Involves data coming from reporters and removed WIP incomplete: this pull request is not ready for merge labels Feb 1, 2019
sungo
sungo previously approved these changes Feb 1, 2019
@daleghent
Copy link
Contributor

daleghent commented Feb 1, 2019

{memory: {total: <int in GB>}} can be replaced by summing the value of memory-size: <int in GB> that is present in each dimms member. If a particular DIMM slot is unstuffed, there will be no such member (a recent change; empty members are now elided from the report). So basically, if memory-size exists, add its value to a running summation and when you've added them all up, you should have a number that is equal to what {memory: {total: $value} gives us now.

Copy link
Contributor

@karenetheridge karenetheridge left a comment

Choose a reason for hiding this comment

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

If processor in the device report is no longer to be used by any validations, it should be removed from the json schema.

The version attribute should be incremented for both validation modules affected here, to be consistent with conventions previously established (consequential changes in code should be indicated by a new version). The database then needs to be updated -- you might as well add on to the add_drive_validations command I just created in #626: set deactivated on the updated validations, then when the new rows are added to the validation table, add those new rows to the Server plan.

@perigrin perigrin force-pushed the chris/fix-dimmcount-cpucount branch 2 times, most recently from 8704a49 to 75dd29c Compare February 1, 2019 18:28
karenetheridge
karenetheridge previously approved these changes Feb 1, 2019
@perigrin perigrin merged commit 92ec596 into master Feb 1, 2019
@perigrin perigrin deleted the chris/fix-dimmcount-cpucount branch February 1, 2019 19:06
@karenetheridge karenetheridge added this to the v2.23 milestone Feb 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
device reports Involves data coming from reporters refactor validation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants