Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

NPE when destroying a vpc network which is deployed with firewall service enabled in vpc offering.

Open
#14,068 1 comment 0 reactions 1 assignee View on GitHub

@harikrishna-patnala is already working on this.

Since Sep 10, 2026.

Assessment

This issue has not been assessed yet.

Description

bug component:vpc
problem

NPE when destroying a vpc network which is deployed with firewall service enabled in vpc offering.

versions

ACS 4.23

The steps to reproduce the bug

Steps to reproduce the issue

  1. Create a vpc offering with firewall service enabled
Image
  1. Deploy a tier in the vpc network

  2. Deploy a vm in the vpc tier

  3. Apply firewall rules for a public ip address

  4. Destroy/expunge a vm

  5. Destroy the tier

  6. Destroy the vpc network

Exception message

Screenshot

Image

Logs

2026-09-07 07:14:11,542 DEBUG [c.c.n.IpAddressManagerImpl] (API-Job-Executor-23:[ctx-ee60323d, job-1148, ctx-02cd9ce1]) (logid:98e01084) Releasing ip IPAddress {"address":"192.168.55.84","dataCenterId":1,"id":4,"uuid":"c1fd45b4-d409-4324-8a99-d6fc5e41c59e"}; sourceNat = false
2026-09-07 07:14:11,570 ERROR [c.c.a.ApiAsyncJobDispatcher] (API-Job-Executor-23:[ctx-ee60323d, job-1148]) (logid:98e01084) Unexpected exception while executing org.apache.cloudstack.api.command.user.vpc.DeleteVPCCmd java.lang.NullPointerException: Cannot invoke "com.cloud.network.Network.getId()" because "network" is null
        at com.cloud.network.IpAddressManagerImpl.applyIpAssociations(IpAddressManagerImpl.java:1283)
        at com.cloud.network.IpAddressManagerImpl.disassociatePublicIpAddress(IpAddressManagerImpl.java:828)
        at com.cloud.network.vpc.VpcManagerImpl.cleanupVpcResources(VpcManagerImpl.java:2705)
        at com.cloud.network.vpc.VpcManagerImpl.destroyVpc(VpcManagerImpl.java:1942)
        at com.cloud.network.vpc.VpcManagerImpl.deleteVpc(VpcManagerImpl.java:1901)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:569)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)


What to do about it?

VPC network should be destroyed without any exception

Dominant language
Java
Stars
3.1k
Forks
1.4k
Avg merge
6d 20h
Merged PRs (30d)
27

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/cloudstack

All issues in apache/cloudstack

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.