How to get the status of failed GetParameterValues and SetParameterValues RPCs

I’m applying two GPVs; one has succeeded, and the other has failed. But there is no way to get the status of whether my RPC has succeeded or not, neither in faults nor in tasks. I don’t see this RPC listed anywhere.

@zaidka Please answer my query: How do I know if my GPV/SPV succeeded or not?

As I spent time in GenieACS, I analyzed the following things:

When I apply a GPV/SPV, it first checks if this path is present in its data model. If it is present, it sends the GetParameterValues/SetParameterValues request to the CPE; otherwise, it first sends a GetParameterNames request to the CPE. Then, it checks again from the received output if this is present in the TR-181 data model. If not, it has nothing to do with it and silently drops the task from the database.

If the pathname has some special characters, it will send a script error (invalid pathname) and set it as the fault code.

If the parameter value is invalid, it is also set as the fault code.

For all fault codes, it will retry 10 times at random increasing intervals. I don’t know why, if the pathname is invalid or the parameter value is invalid, what is the need to retry 10 times.

It does the same with the GPV. According to the TR-069 standard, some CWMP error codes are defined. The CPE sends all these codes to the ACS and returns just status, fault code, and fault string in its response. Is there any way to get these status codes so that my team can use this.

Because a lot of times faults are transitory. For example, I have CPEs that throw a 9002 fault if you try and set any wifi params immediately after boot. If you wait a few minutes, then the same request goes through without any issues. Hence retry logic.

Then it need to change the start time of the CPE tr69agent in /etc/rc.d/. It should start when the CPE completely bootup to prevent these types of errors. According to logic, retries should only happen if communication break. Second, WiFi reload or network reload may also be required at some SPVs, for this tr69agent should also take care of all these SPVs.

Well thanks @akcoder for reply! my concern is not to correct the tr69agent but to inquire about how to obtain the status code of GPV/SPV. Is there any approach for this?

You can get the error code via the API. You cannot get that information in a provision script (unless you use an extension script to get the information from the API).

1 Like

You can query the faults collection to find out if a given task has failed. The ‘channel’ property of the associated fault object is the task ID so you can filter by that.

Is that accessible from inside a provision script? Or do you have to query the mongo collection for that information?

During SPV/GPV, it does not generate a faultcode if the pathname does not exist. I assumed it would generate fault code 9005 (Invalid Parameter name). I am inquiring about how to determine whether my RPC has succeeded or not.

From mongodb

No, it’s only accessible via the API.

Params that don’t exist are silently ignored so no GPV/SPV will be taking place.