Skip to content

Commit

Permalink
kvm: improve numa error message
Browse files Browse the repository at this point in the history
  • Loading branch information
karmab committed Nov 26, 2024
1 parent 2e4ab89 commit 3ce18d0
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion kvirt/cluster/hypershift/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from urllib.request import urlopen, Request
from yaml import safe_dump, safe_load

virt_providers = ['kvm', 'kubevirt', 'ovirt', 'openstack', 'vsphere', 'proxmox']
virt_providers = ['kvm', 'kubevirt', 'ovirt', 'openstack', 'proxmox', 'vsphere']
cloud_providers = ['aws', 'azure', 'gcp', 'ibm', 'hcloud']


Expand Down
2 changes: 1 addition & 1 deletion kvirt/cluster/hypershift/kcli_plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
memory: {{ worker_memory | default(memory, memory) }}
nets: {{ [net0] + extra_networks }}
disks: {{ [disk_size] + extra_disks }}
{% if config_type in ['kvm', 'vsphere', 'ovirt', 'kubevirt'] %}
{% if config_type in ['kvm', 'kubevirt', 'openstack', 'ovirt', 'proxmox', 'vsphere'] %}
files: {{ files }}
{% endif %}
{% endfor %}
4 changes: 2 additions & 2 deletions kvirt/cluster/hypershift/kcli_plan_assisted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
start: false
kube: {{ cluster }}
kubetype: hypershift
memory: {{ memory }}
numcpus: {{ numcpus }}
numcpus: {{ worker_numcpus | default(numcpus, numcpus) }}
memory: {{ worker_memory | default(memory, memory) }}
disks:
- size: {{ disk_size }}
interface: sata
Expand Down
2 changes: 1 addition & 1 deletion kvirt/cluster/openshift/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from yaml import safe_dump, safe_load


virt_providers = ['kvm', 'kubevirt', 'ovirt', 'openstack', 'vsphere', 'proxmox']
virt_providers = ['kvm', 'kubevirt', 'openstack', 'ovirt', 'proxmox', 'vsphere']
cloud_providers = ['aws', 'azure', 'gcp', 'ibm', 'hcloud']


Expand Down
3 changes: 2 additions & 1 deletion kvirt/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1273,7 +1273,8 @@ def get_latest_rhcos(url, _type='kvm', arch='x86_64', qemu=False):


def get_installer_rhcos(_type='kvm', region=None, arch='x86_64'):
keys = {'ovirt': 'openstack', 'kubevirt': 'openstack', 'kvm': 'qemu', 'vsphere': 'vmware', 'ibm': 'ibmcloud'}
keys = {'ovirt': 'openstack', 'kubevirt': 'openstack', 'kvm': 'qemu', 'vsphere': 'vmware', 'ibm': 'ibmcloud',
'proxmox': 'openstack'}
key = keys.get(_type, _type)
INSTALLER_COREOS = os.popen('openshift-install coreos print-stream-json 2>/dev/null').read()
data = json.loads(INSTALLER_COREOS)
Expand Down
2 changes: 1 addition & 1 deletion kvirt/providers/kvm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,7 @@ def create(self, name, virttype=None, profile='kvirt', flavor=None, plan='kvirt'
count += 1
cpuxml += f'{numaxml}</numa>'
if numamemory > memory:
msg = "Can't use more memory for numa than assigned memory"
msg = "Can't use more memory for numa than assigned one ({memory})"
return {'result': 'failure', 'reason': msg}
elif memoryhotplug:
lastcpu = int(numcpus) - 1
Expand Down

0 comments on commit 3ce18d0

Please sign in to comment.