Skip to content

Support for Memory Statistics Host-Services#167

Merged
FengPan-Frank merged 19 commits intosonic-net:masterfrom
kanza-latif:feature/memory-statistics-hostservices
Dec 10, 2024
Merged

Support for Memory Statistics Host-Services#167
FengPan-Frank merged 19 commits intosonic-net:masterfrom
kanza-latif:feature/memory-statistics-hostservices

Conversation

@kanza-latif
Copy link
Contributor

@kanza-latif kanza-latif commented Sep 26, 2024

This PR provides hostservice demon functionality. It handles the configuration updates for the MemoryStatisticsd process, and listens to the ConfigDB changes and applies them by restarting, shutting down, or reloading the MemoryStatisticsd process.

@kanza-latif kanza-latif changed the title Added memory statistics host services Support for Memory Statistics Host-Services Sep 26, 2024
@kanza-latif kanza-latif marked this pull request as ready for review September 26, 2024 10:40
@kanza-latif
Copy link
Contributor Author

@qiluo-msft @prgeor @FengPan-Frank. Please help review our feature's hld and linked code PRs.

"enabled": "true",
"retention_time": "15",
"sampling_interval": "5"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: indent

Copy link
Contributor

Choose a reason for hiding this comment

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

@FengPan-Frank , thank you for your feedback! I've adjusted the indentation for better readability. Please let me know if there are any other improvements needed.

scripts/hostcfgd Outdated
self.restart_memory_statistics() # Start or restart the daemon
else:
self.shutdown_memory_statistics() # Stop the daemon if disabled
else:
Copy link
Contributor

Choose a reason for hiding this comment

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

better to validate key strictly, otherwise any input not equals to "enable" will trigger reload.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for your feedback, @FengPan-Frank . I've added stricter validation for configuration keys in the Memory_StatisticsCfg class to ensure only valid keys trigger updates. We'll also implement input checks in the command line utilities folder. Let me know if you have any further suggestions!

Arham-Nasir and others added 5 commits October 16, 2024 20:36
Signed-off-by: Arham-Nasir <arqamnasir719@gmail.com>
Signed-off-by: Arham-Nasir <arqamnasir719@gmail.com>
Signed-off-by: Arham-Nasir <arqamnasir719@gmail.com>
Signed-off-by: Arham-Nasir <arqamnasir719@gmail.com>
@kanza-latif
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ridahanif96
Copy link
Contributor

ridahanif96 commented Oct 25, 2024

@qiluo-msft @xincunli-sonic @zbud-msft @FengPan-Frank Please help review the feature.

ridahanif96 and others added 3 commits October 25, 2024 13:46
Signed-off-by: Arham-Nasir <arqamnasir719@gmail.com>
Signed-off-by: Arham-Nasir <arqamnasir719@gmail.com>
@ridahanif96
Copy link
Contributor

@qiluo-msft @xincunli-sonic pls help review this feature

@FengPan-Frank
Copy link
Contributor

/azpw run sonic-net.sonic-host-services

Signed-off-by: Arham-Nasir <arqamnasir719@gmail.com>
Signed-off-by: Arham-Nasir <arqamnasir719@gmail.com>
Signed-off-by: Arham-Nasir <arqamnasir719@gmail.com>
Signed-off-by: Arham-Nasir <arqamnasir719@gmail.com>
@Arham-Nasir
Copy link
Contributor

Hi @FengPan-Frank ,
Could you please review this PR when you have a moment? Your feedback and suggestions would be greatly appreciated. Thank you for your time and guidance!

Copy link
Contributor

@FengPan-Frank FengPan-Frank left a comment

Choose a reason for hiding this comment

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

LGTM

@qiluo-msft
Copy link
Contributor

Please resolve conflict

Arham-Nasir and others added 2 commits December 4, 2024 02:04
@Arham-Nasir
Copy link
Contributor

Please resolve conflict

Hi @qiluo-msft
Thank you for the review. The conflicts have been resolved now. Please let me know if there's anything else you'd like me to do.

@FengPan-Frank
Copy link
Contributor

/azpw run sonic-net.sonic-host-services

Signed-off-by: Arham-Nasir <arqamnasir719@gmail.com>
Signed-off-by: Arham-Nasir <arqamnasir719@gmail.com>
@Arham-Nasir
Copy link
Contributor

Hi @qiluo-msft ,

Please assist us in merging this PR at your earliest convenience. Let me know if there are any additional actions needed from my side.

Thank you!

@FengPan-Frank FengPan-Frank merged commit b0b3ca5 into sonic-net:master Dec 10, 2024
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.

6 participants