DX NetOps

 View Only

 DA REST calls over HTTPS

Glenn Weavind's profile image
Glenn Weavind posted May 24, 2021 11:39 AM
Trying to work a simple little issue: the DA tidy up scripts (cleanupComponents.sh and remove_not_present_items.sh) need to be modified to work when the DA is using only HTTPS.  Straightforward enough - there's even a techdoc (now amended) for this.
Except that remove_not_present_etc seems to do its work by a curl to <da>:<port>/rest/devices/ and then searching through this list for devices to be deleted in a later POST call.  This returns nothing to curl, and HTTP 413 if I do it i a browser - payload too large.
I'm trying to work out if this HTTP 413 is a direct result of the conversion of the DA from HTTP=>HTTPS, or if this has been failing for some time.
I have a Support issue open.
Anyone else experienced this please?
Reasonably large system - 22k devices, 500k interfaces.  Recent history: 20.2.4, converted to HTTPS throughout (2 NFA consoles, Spectrum (30+ landscapes), DA, PC) and then upgraded to 20.2.9.  17 DCs - many as TADCO.
It might be as simple as some memory tuning on PC.... Both DA and PC have 32GB memory, but perhaps not allocated in the ideal manner.
Carlos Radice's profile image
Broadcom Employee Carlos Radice
See the Article ID: 95411 - 413 errors: Request entity is larger than limits defined by server error using REST.
Jeffrey Pinard's profile image
Broadcom Employee Jeffrey Pinard
The 413 is due to the response to the curl call will be too large.  We have a limit of 200000 (number of items * number of attributes per item).  We have this limit to not cause DA to use too much memory in larger environments.   It has nothing to do with http->https conversion.

The remove_not_present_items.sh has other arguments to add to filter to reduce the item count to hopefully fit within the 200k size limit.  -t DAYS is how many days the item has been not present.  Start with high number and work your way down to 0.
cleanupComponents.sh doesn't have any additional filters to reduce the amount returned.
Glenn Weavind's profile image
Glenn Weavind
Thanks guys.  Some reading and tweaking ahead.  Very helpful.