Skip to content
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

Check dict key get_reboot_active exists before attempting to use, not all proxy implement it #60244

Merged

Conversation

dmurphy18
Copy link
Contributor

What does this PR do?

Fixes issue with proxy get_boot_active key missing error in logs, by checking if key exists first before trying it.
This is necessary since not all proxy's implement 'get_reboot_active', for example: napalm
Originally added to fix issue with junos keep alive

What issues does this PR fix or reference?

Fixes: #60025

Previous Behavior

KeyError: 'napalm.get_reboot_active' traceback error in logs

New Behavior

no message output to logs, since key now only accessed if exists.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

@dmurphy18 dmurphy18 requested a review from a team as a code owner May 24, 2021 16:12
@dmurphy18 dmurphy18 requested review from joechainz and garethgreenaway and removed request for a team and joechainz May 24, 2021 16:12
@dmurphy18
Copy link
Contributor Author

re-run full all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] napalm minion KeyError: 'napalm.get_reboot_active'
4 participants