openBackhaul / MicroWaveDeviceInventory

Physical and logical inventory of the MW SDN Domain
Apache License 2.0
5 stars 1 forks source link

[NotificationService] Observing 409 error from /v1/regard-device-object-creation/deletion #1001

Open kmohr-soprasteria opened 3 days ago

kmohr-soprasteria commented 3 days ago

When I call the service to create or delete an object, I end up with a 409, conflict. I tried with another device as well, but still not working.

/v1/regard-device-object-creation:

{"notification-proxy-1-0:object-creation-notification":{"counter": 10000,"timestamp": "2024-09-17T08:21:50+01:00","object-path": "/core-model-1-4:network-control-domain=live/control-construct=513250006/forwarding-domain=VLAN-FD/fc=VLAN-123"}}

/v1/regard-device-object-deletion:

{"notification-proxy-1-0:object-deletion-notification":{"counter": 10000,"timestamp": "2024-09-17T08:21:50+01:00","object-path": "/core-model-1-4:network-control-domain=live/control-construct=513250006/forwarding-domain=VLAN-FD/fc=VLAN-123"}}

Both calls respond:

{
    "code": 409,
    "message": "Conflict"
}

I checked that the object is not there before I called the creation service (/core-model-1-4:network-control-domain=cache/control-construct=513250006/forwarding-domain=VLAN-FD/fc=VLAN-123):

{
    "code": 404,
    "message": "No elements found with UUID: 513250006+VLAN-123"
}

When I only call /core-model-1-4:network-control-domain=cache/control-construct=513250006/forwarding-domain=VLAN-FD, data is returned.

also see related issue #875

nardecchia-siae commented 22 hours ago

The value "409 conflict" is returned by ODL if the requested object is not present in the equipment. I have just tried calling the "Object creation" notification API receiving a 409 response. Then after creating a vlan in the same equipment in testlab and tried again to call the same API I received 204

Nevertheless I found a little issue in the cache update after the object creation API call that I fixed and will be released in the next tag.