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

Ensure support for x86-64-v2 when creating VMs for each node #253

Closed
fc7 opened this issue Feb 9, 2023 · 7 comments
Closed

Ensure support for x86-64-v2 when creating VMs for each node #253

fc7 opened this issue Feb 9, 2023 · 7 comments

Comments

@fc7
Copy link
Contributor

fc7 commented Feb 9, 2023

This is a small but I believe meaningful enhancement request.

I am using RHEL 9 as host. With several container images, I have encountered the following issue at runtime:

Fatal glibc error: CPU does not support x86-64-v2

Based on this I checked that my CPU (Xeon E5-1650 v3) does actually satisfy the criteria for x86-64-v2:

# /lib64/ld-linux-x86-64.so.2 --help
<snip>
Subdirectories of glibc-hwcaps directories, in priority order:
  x86-64-v4
  x86-64-v3 (supported, searched)
  x86-64-v2 (supported, searched)

The problem can actually be fixed by modifying the CPU settings of each VM to use the host-model. See e.g. here. With my compact setup (3 master/worker nodes), I used the following command:

for n in $(seq 0 2); do
    sudo virt-xml ocp4-master-${n} --edit --cpu host-model
done

After restarting each VM, the issue no longer appears.

I believe it would make sense to set this automatically with the playbook already at cluster creation, when setting up the VMs of each node.

@tomazb
Copy link

tomazb commented Feb 10, 2023

Yes, this is also needed for ACS as qemu64 is not the right CPU for the job :-)

@rbo
Copy link
Contributor

rbo commented Feb 10, 2023

You can overwrite the cpu in your cluster.yml via:

compute_special_cpu: "<cpu mode='host-passthrough'></cpu>"
master_special_cpu: "<cpu mode='host-passthrough'></cpu>"

I will double check if it make sense to change the defaults because of newer os/qemu version

@fc7
Copy link
Contributor Author

fc7 commented Feb 10, 2023

I believe host-passthrough has the same meaning as host-model. IMHO it would make sense to make this the default. Otherwise many containers may end up in a crashloop because of the glibc incompatibility.

@sluetze
Copy link
Contributor

sluetze commented Feb 17, 2023

+1 for making it default and also the options should be documented outside of the container native virtualization usecase, since they are needed for usecases outside of nested virtualization.

@rbo
Copy link
Contributor

rbo commented Feb 22, 2023

For testing purpose, I added <cpu mode='host-passthrough'></cpu> as default as branch libvirt-xml-improvements

@rbo
Copy link
Contributor

rbo commented Feb 23, 2023

Branch libvirt-xml-improvements merged into devel.

@rbo rbo mentioned this issue Feb 27, 2023
3 tasks
@rbo rbo mentioned this issue Apr 14, 2023
1 task
@rbo
Copy link
Contributor

rbo commented Jun 22, 2023

Released in 2023-06-22

@rbo rbo closed this as completed Jun 22, 2023
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

No branches or pull requests

4 participants