listPublicIpAddresses NullPointerException on shared networks with a VR (4.22)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 80/100
Línea de trabajo
Empieza en ApiResponseHelper.java, en showVmInfoForSharedNetworks(), centrándote en la rama de red no virtual y en la búsqueda de la NIC. Compara el helper existente que omite placeholders con el comportamiento descrito en #8622 y #8624, y reproduce el problema realizando llamadas repetidas a listPublicIpAddresses en una red compartida. Se considera terminado cuando la solicitud ya no falla intermitentemente con una NullPointerException.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
problem
On 4.22.1.0, listPublicIpAddresses with forvirtualnetwork=false sometimes fails with a 530:
2026-09-25 06:50:01,162 ERROR [c.c.a.ApiServer] (qtp2038105753-72330:[ctx-762cfe49, ctx-ac3b837a, ctx-e861c603]) (logid:e972f310) unhandled exception executing api command: [Ljava.lang.String;@4e95c7d5 java.lang.NullPointerException: Cannot invoke "java.lang.Long.longValue()" because "this.instanceId" is null
2026-09-25 06:50:01,165 INFO [a.c.c.a.ApiServlet] (qtp2038105753-72330:[ctx-762cfe49, ctx-ac3b837a, ctx-e861c603]) (logid:e972f310) (userId=8 accountId=2 sessionId=null) 0:0:0:0:0:0:0:1 -- GET allocatedonly=false&apikey=<redacted>&command=listPublicIpAddresses&forvirtualnetwork=false&listall=true&page=1&pagesize=500&response=json&signature=<redacted> 530 Cannot invoke "java.lang.Long.longValue()" because "this.instanceId" is null
The same request succeeds on some attempts and fails on others.
It looks like the DomainRouter branch added to ApiResponseHelper.showVmInfoForSharedNetworks() in #10458 is hitting the VR's placeholder NIC, which has a null instance_id. Our shared network has two NIC rows for the VR's IP (the placeholder and the real one), and the NIC lookup can return either, which would explain why it's intermittent. It seems to be the same or a similar problem as #8622, which #8624 fixed for the system VM branch.
versions
ACS 4.22.1.0, KVM, advanced zone. The shared network offering uses VirtualRouter for DHCP, DNS and UserData.
The steps to reproduce the bug
- Create a shared network whose offering uses VirtualRouter for DHCP/DNS, and deploy a VM on it so the VR starts.
- As admin, call listPublicIpAddresses networkid= forvirtualnetwork=false a few times.
- Some calls fail with the NPE above.
What to do about it?
findNonPlaceHolderByIp4AddressAndNetworkId() looks to skip placeholder IP addresses, so should be able to change this line in ApiResponseHelper.java:
Change:
if (!forVirtualNetworks) {
NicVO nic = ApiDBUtils.findByIp4AddressAndNetworkId(ipAddr.getAddress().toString(), ipAddr.getNetworkId());
To:
if (!forVirtualNetworks) {
NicVO nic = ApiDBUtils.findNonPlaceHolderByIp4AddressAndNetworkId(ipAddr.getAddress().toString(), ipAddr.getNetworkId());
- Lenguaje dominante
- Java
- Estrellas
- 3.1k
- Forks
- 1.4k
- Merge medio
- 5 d 15 h
- PR fusionados (30 d)
- 24
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/cloudstack
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
apache/cloudstack#14244 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
apache/cloudstack#14222 ·
Los mantenedores suelen responder en 1 día
-
create-kubernetes-binaries-iso.sh builds the ISO without setting a volume ID on EL8 based os'sAbiertobug component:kubernetes
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
apache/cloudstack#14180 ·
Los mantenedores suelen responder en 1 día
-
bug component:projects component:UI
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
apache/cloudstack#14070 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
-
component:backup
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
apache/cloudstack#14013 ·
Los mantenedores suelen responder en 1 día
Todos los issues de apache/cloudstack
Issues similares
-
and-bugs and-ui gpx-track
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 2 días
-
TerminalRow.mSpaceUsed (short) overflows on terminals wider than 1023 columns, crashing setCharAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
termux/termux-app#5340 ·
Los mantenedores suelen responder en 1 día
-
OpenAICompatibleToolDescriptorSchemaGenerator drops requiredProperties of nested object parametersAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 7 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
apache/rocketmq-dashboard#5110 ·
Los mantenedores suelen responder en 1 día
-
frontend
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
No-Country-simulation/S08-26-equipo04#210 ·
Los mantenedores suelen responder en 1 día