ligato / vpp-agent

⚡️ Control plane management agent for FD.io's VPP
https://docs.ligato.io/
Apache License 2.0
247 stars 127 forks source link

Fix `agentctl report` command failing in StoneWork #1857

Closed samuel-dudik closed 2 years ago

samuel-dudik commented 2 years ago

agentctl report command fails when run against StoneWork with this error message:

Retrieving agent kvscheduler NB configuration... Error... (this error will be part of the report zip file, see _failed-reports.txt):
dumping kvscheduler data failed due to:
Failed to get data for NB view and key prefix config/vpp/dns/v1/dnscache due to: Error response from daemon: [500] {
  "Error": "unknown key prefix"
}
, Failed to get data for NB view and key prefix config/vpp/ipfix/v2/flowprobe-feature/ due to: Error response from daemon: [500] {
  "Error": "unknown key prefix"
}
, Failed to get data for NB view and key prefix config/vpp/ipfix/v2/flowprobe-params due to: Error response from daemon: [500] {
  "Error": "unknown key prefix"
}
, Failed to get data for NB view and key prefix config/vpp/ipfix/v2/ipfix due to: Error response from daemon: [500] {
  "Error": "unknown key prefix"
}
, Failed to get data for NB view and key prefix config/vpp/wg/v1/peer/ due to: Error response from daemon: [500] {
  "Error": "unknown key prefix"
} 

agentctl is getting prefixes from all registered models and then searches for their corresponding descriptors. However, some models are registered even though they don't have registered their descriptor. This is normal and expected. That's why this PR tries to "suppress" the error messages. They still appear, but don't result in failure of the report command. The PR also changes some of the messages and the server status code.

Signed-off-by: Samuel Dudík samuel.dudik@pantheon.tech