-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On erasing NMOS resources, HTTP DELETE messages are not getting generated #372
Comments
Below is the sys-logs captured while exiting: 2024-02-16 18:49:15 User.Warning 10.110.60.75 Feb 16 13:19:26 10.100.50.2 NMOS[1812]: Unable to lock to current reference source You could see, my log while erasing 62 NMOS resources at second line: 2024-02-16 13:19:27.191: I was expecting following logs in the sys-logs which is in the node_behavior thread, with the deregistration logic just after the regular registration logic:: |
It depends when you erase the resources. The
Hope that makes sense. If you want to implement the recommended (but not required) controlled unregistration behaviour then erase the resources before calling |
Dear Gareth (@garethsb), Thank you for your response. I have created a separate thread named "ShutDownThread" that runs in parallel with the "node_implementation_thread." This thread is responsible for monitoring for shutdown conditions within my application. Upon receiving a shutdown signal, the thread erases the node, subsequently erasing all its child resources. After the erasure is complete, it calls the model.controlled_shutdown() function. To ensure data integrity during this process, I have implemented a write lock using auto write_lock = model.write_lock(); before initiating the erase operation. The lock is then released after the erasure is complete using write_lock.unlock();. However, despite these steps, HTTP DELETE messages are not being sent as expected. I would appreciate your assistance in understanding why these messages are not being triggered and troubleshooting any potential issues. Any insights or suggestions you can provide would be greatly helpful. Thank you for your time and support. Sincerely, |
I understand you're doing something like this...
I think this just still doesn't leave a long enough gap for the Node behaviour thread to empty the queue of events to send to the Registry between 3 and 4. The simplest change to confirm this would be to put a nmos-cpp/Development/nmos/node_behaviour.cpp Line 126 in 62a9165
|
Hi Garethsb, |
Hello,
While, NMOS shutting down, I'm calling following functions to delete all the nmos resources before exiting:
nmos::erase_resource(model.node_resources, res_id, true); // res_id is of node
model.notify();
While erasing the resources, in Wireshark, I was expecting HTTP DELETE messages going out to Registry and controller(e.g., Riedel). However, I don't see any of these messages in wireshark.
Could you please help, am I missing something in the above code?
Thankyou in advance.
Gururaj S.B
The text was updated successfully, but these errors were encountered: