Comment 9 for bug 2035012

Revision history for this message
Boxiang Zhu (bxzhu-5355) wrote (last edit ):

Got it, from your debug information. I find that you only have router resource AZ to return as followed:

REQ: curl -g -i -X GET http://192.168.18.100:9696/v2.0/availability_zones -H "Accept: application/json" -H "User-Agent: openstacksdk/1.4.0 keystoneauth1/5.2.1 python-requests/2.31.0 CPython/3.10.12" -H "X-Auth-Token: {SHA256}bb5237118d960cec6fcef411492bb7124fbf42d974e272547975e792de8db133"
http://192.168.18.100:9696 "GET /v2.0/availability_zones HTTP/1.1" 200 86
RESP: [200] content-length: 86 content-type: application/json date: Tue, 19 Sep 2023 01:40:45 GMT x-openstack-request-id: req-1aa0c51d-3524-4569-b955-15e5c87b77b9
RESP BODY: {"availability_zones": [{"name": "nova", "resource": "router", "state": "available"}]}
GET call to network for http://192.168.18.100:9696/v2.0/availability_zones used request id req-1aa0c51d-3524-4569-b955-15e5c87b77b9

And from the neutron codes, the network resource AZ is returned by AZ of dhcp agent and the router resource AZ is returned by AZ of l3 agent. Some code of neutron is as followed:

https://opendev.org/openstack/neutron/src/branch/master/neutron/db/agentschedulers_db.py#L514-L520

    def get_router_availability_zones(self, router):
        return list({agent.availability_zone for agent in router.l3_agents})

https://opendev.org/openstack/neutron/src/branch/master/neutron/db/l3_agentschedulers_db.py#L532-L533

    def get_router_availability_zones(self, router):
        return list({agent.availability_zone for agent in router.l3_agents})

So I think you can run command "openstack network agent list" to verify whether you have dhcp agents or not.

Thanks :)