-
Notifications
You must be signed in to change notification settings - Fork 161
shell scripts for cloud-init #3743
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
shell scripts for cloud-init #3743
Conversation
|
Can one of the admins verify this patch? |
655f09f to
8bee682
Compare
| ansible.builtin.set_fact: | ||
| total_mem_mb: >- | ||
| {{ | ||
| mem_info.json.Members |
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.
add default in case Members not read
|
|
||
| - name: Calculate 90% of real memory | ||
| ansible.builtin.set_fact: | ||
| real_memory: "{{ ((total_memory_mb | float) * 0.90) | int }}" |
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.
Not using it anywhere remove it
|
|
||
| - name: Calculate total memory in MB (GiB → MB) | ||
| ansible.builtin.set_fact: | ||
| total_memory_mb: "{{ (mem_info.json.MemorySummary.TotalSystemMemoryGiB | default(default_real_memory)) * 1024 | int }}" |
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.
int conversion before multiplying is better
|
|
||
| - name: Calculate 90% of real memory | ||
| ansible.builtin.set_fact: | ||
| real_memory: "{{ ((total_memory_mb | float) * 0.90) | int }}" |
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.
This var not being used anywhere
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.
Add the MaxRAMPercent under cgroup default
updated as shell-scripts in cloud-init with integrated logging