Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions roles/infra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ Role Variables
| `os_image_size` | `str` | `20G` | | The size to which one-deploy will **try** to adjust the OS image. |
| `memory_KiB` | `str` | `2097152` | | Memory amount to be set in XML in Libvirt. |
| `vcpu_static` | `str` | `1` | | VCPU amount to be set in XML in Libvirt. |
| `cputune_shares_base` | `int` | `200` | | Base value used to compute PWS (assuming CGv2). |
| `cputune_shares_max` | `int` | `10000` | | PWS value cap (assuming CGv2). |
| `cputune_shares` | `int` | computed | | The proportional weighted share (PWS) for the domain. |
| `vnc_max_port` | `str` | `65535` | | Upper limit for VNC ports to start counting-down from. |
| `passthrough_fs` | `list` | `[]` | (check below) | Shared HV filesystems to attach to the Front-end VMs. |
| | | | | |
Expand Down
3 changes: 3 additions & 0 deletions roles/infra/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ vnc_max_port: 65535
infra_bridge: br0
infra_bridge_type: bridge
passthrough_fs: []
cputune_shares_base: 200 # twice the OpenNebula's default (for CGv2)
cputune_shares_max: 10000
cputune_shares: "{{ ((vcpu_static | int) * (cputune_shares_base | int)) | round(0, 'ceil') }}"
3 changes: 3 additions & 0 deletions roles/infra/templates/frontend.xml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<memory unit='KiB'>{{ memory_KiB }}</memory>
<vcpu placement='static'>{{ vcpu_static }}</vcpu>
<cpu mode='host-passthrough' check='none' migratable='on'/>
<cputune>
<shares>{{ (cputune_shares if (cputune_shares | int) < (cputune_shares_max | int) else cputune_shares_max) | int }}</shares>
</cputune>

<resource>
<partition>/machine</partition>
Expand Down