Skip to content

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

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

Closed
w-le opened this issue Sep 14, 2022 · 0 comments · May be fixed by #370
Closed

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

w-le opened this issue Sep 14, 2022 · 0 comments · May be fixed by #370
Assignees
Labels

Comments

@w-le
Copy link
Contributor

w-le commented Sep 14, 2022

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.

@w-le w-le changed the title Bug: Cisco DNA Spaces: activate does not error when result if 401 Bug: Cisco DNA Spaces: activate misleadingly succeeds when actual result is 401 Sep 14, 2022
@chillfox chillfox linked a pull request Oct 3, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants