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

Improve memory configuration message when running in Docker #4269

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

saberduck
Copy link
Contributor

@saberduck saberduck commented Oct 12, 2023

This is an addition to #4255 to improve logging when running in a Docker container, where os.totalMem would report the memory of the whole host machine. We try to read the memory configuration from cgroup parameters exposed in sys.

Additionally, I fixed the computation of size in MB by using binary Mega 1024*1024.

Unfortunately, there is no easy way to unit test.

@sonarqube-next
Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@yassin-kammoun-sonarsource yassin-kammoun-sonarsource changed the title Improve message when running in Docker Improve memory configuration message when running in Docker Oct 12, 2023
@saberduck saberduck merged commit 538ae84 into master Oct 13, 2023
16 checks passed
@saberduck saberduck deleted the memdocker branch October 13, 2023 06:14
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.

None yet

2 participants