VPC routers do AES in software: the template blacklists aesni_intel and vpcrouter.sh never loads it
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 45/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- java, linux
- Domaine
- infrastructure, networking
Piste de recherche
Start with systemvm/debian/etc/modprobe.d/aesni_intel.conf and compare the AES-NI setup in router.sh with vpcrouter.sh, which the issue says does not load the module. Check how the system VM starts services and how the CPU AES flag can be detected. Reproduce on a VPC router with AES-NI available and verify the module loads and IPsec uses AES-NI; assess the separate strongSwan replay-window suggestion and its packet loss effects.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
problem
The system VM image has /etc/modprobe.d/aesni_intel.conf with "blacklist aesni_intel" (systemvm/debian/etc/modprobe.d/aesni_intel.conf, commit f498ca6 from 2012, "blacklist aesni_intel module to avoid crash"). router.sh loads the module by name (setup_aesni), but vpcrouter.sh does not. VPC routers therefore use cbc(aes-generic) for IPsec, even when the guest CPU has the aes flag.
Measured on CloudStack 4.23.0.0, guest CPU AMD EPYC-Rome, router with 4 vCPUs, iperf3 across a site-to-site tunnel:
- stock template, ESP aes256-sha256: 0.61 to 0.82 Gbit/s, with one router vCPU at 100% softirq;
- with aesni_intel loaded, ESP aes256-sha256: 1.05 to 1.25 Gbit/s;
- with aesni_intel loaded, IKE and ESP AES-GCM: 1.40 to 1.55 Gbit/s.
Related: with AES-NI, GCM encryption runs on several vCPUs and reorders ESP packets. strongSwan's default charon.replay_window of 32 then drops packets as replays (XfrmInStateSeqError reached 126,700 in one test), and multi-stream throughput fell to about 1.0 Gbit/s. "charon { replay_window = 1024 }" in /etc/strongswan.d/ fixed it (0 drops).
versions
System VM template 4.22.0 and earlier. CloudStack 4.23.0.0. KVM with a guest CPU model that exposes aes (host-model).
The steps to reproduce the bug
- Create a VPC on KVM with a host CPU that has AES-NI and a guest CPU model that exposes it.
- On the VPC router, read /proc/cpuinfo (the aes flag is there), /proc/modules (no aesni_intel) and /proc/crypto (cbc(aes) uses aes-generic).
- Create a site-to-site VPN and run iperf3 across it. One router vCPU sits at 100% softirq.
What to do about it?
Load aesni_intel on VPC routers too, when the CPU has the aes flag. We use a systemd unit with ConditionCPUFeature=aes that runs "modprobe aesni_intel" at boot. The 2012 crash may not apply to current kernels; we saw no kernel error in our tests. Also consider a larger charon.replay_window, for example 1024.
- Langage dominant
- Java
- Étoiles
- 3.1k
- Forks
- 1.4k
- Merge moyen
- 7 j 16 h
- PR mergées (30 j)
- 15
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de apache/cloudstack
-
resizeVolume of a running system VM's volume is accepted but the VM never sees the new sizePeut-être pris @bhouse-nexthop l’a pris il y a 3 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
apache/cloudstack#14645 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
VR reports a load balancer change as applied when haproxy.cfg cannot be replacedPeut-être pris @bhouse-nexthop l’a pris il y a 3 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
apache/cloudstack#14633 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
restartNetwork reports a ResourceUnavailableException as an unexpected error (530), unlike restartVPC (534)Peut-être pris @bhouse-nexthop l’a pris il y a 3 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
apache/cloudstack#14631 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
apache/cloudstack#14625 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Remote access VPN users are disconnected on every LB, ACL, port forward or firewall change (xl2tpd restarted on every iptables pass)Peut-être pris @willbennett-devops l’a pris il y a 12 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
apache/cloudstack#14545 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de apache/cloudstack
Issues similaires
-
untriaged
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
opensearch-project/opensearch-prometheus-exporter#680 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
Les mainteneurs répondent en général sous 2 jours
-
bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 78/100
-
Good First Issue
Difficulté 1/5 1-3 heures Accessibilité débutants 88/100
hiero-ledger/hiero-sdk-java#3059 ·
Les mainteneurs répondent en général sous 1 jour
-
bug live-tv platform:desktop platform:mobile platform:tv
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
fk0u/cleanyourtv-tahoe#102 ·
Les mainteneurs répondent en général sous 1 jour