Skip to content

Bug: Cisco DNA Spaces: activate misleadingly succeeds when actual result is 401 #367

@w-le

Description

@w-le

When using an dna_spaces_api_key, when manually running activate, the exec is successful and the response is null
Based on that response and the fact that the driver status is green, end users expect that the activation was successful and that DNA spaces is just not configured to send placeos anything yet.

But a week later, when looking at an unrelated issue, we noticed this error in core

level=[E] time=2022-09-14T12:25:47Z program=drivers_cisco_dna_spaces_78fadef4315f6f8a3c64156df46ead7806ee828e_driver-ED9ONeDfmn source=mod-ED9RZ22G2y message="in scheduled task on Cisco::DNASpaces"
failed to update status, code 401
{"status":false,"message":"Authentication failure or invalid API Key"} (Exception)
  from repositories/drivers/drivers/cisco/dna_spaces.cr:631:5 in 'update_monitoring_status'
  from repositories/drivers/drivers/cisco/dna_spaces.cr:75:33 in '->'
  from repositories/drivers/lib/placeos-driver/src/placeos-driver/proxy/scheduler.cr:98:11 in 'run_now'

So the auth was never successful.

The result of activate was very misleading. It should fail with a clear 401 error response and the Module status should turn red to indicate that there is a problem and the Module is not going to work.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions