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

[Mellanox] [platform API] Fix “local variable 'label_port' referenced before assignment” error #6419

Merged
merged 1 commit into from
Jan 12, 2021

Conversation

keboliu
Copy link
Collaborator

@keboliu keboliu commented Jan 12, 2021

- Why I did it

In rare case can see that xcvrd failed due to "UnboundLocalError: local variable 'label_port' referenced before assignment"

- How I did it

Init "label_port" as None at the beginning of the function, to avoid the case that "label_port" not assigned.

- How to verify it

run SFP related test on Mellanox platforms.

- Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@keboliu
Copy link
Collaborator Author

keboliu commented Jan 12, 2021

retest vsimage please

@jleveque jleveque changed the title [Mellanox] [platform API] Fix “local variable 'lable_port' referenced before assignment” error [Mellanox] [platform API] Fix “local variable 'label_port' referenced before assignment” error Jan 12, 2021
@jleveque
Copy link
Contributor

@keboliu: I assume we should also cherry-pick this into the 202012 branch, no?

@keboliu
Copy link
Collaborator Author

keboliu commented Jan 13, 2021

@keboliu: I assume we should also cherry-pick this into the 202012 branch, no?

@jleveque, although this happened in a very rare case, it shall be included in 20191.

@keboliu keboliu deleted the sfp-event-fix branch January 13, 2021 01:17
@jleveque
Copy link
Contributor

jleveque commented Jan 13, 2021

@jleveque, although this happened in a very rare case, it shall be included in 20191.

But what about 202012? I assume the rare issue exists there too, no (we just created this branch at the end of December)?

@keboliu
Copy link
Collaborator Author

keboliu commented Jan 15, 2021

@jleveque, although this happened in a very rare case, it shall be included in 20191.

But what about 202012? I assume the rare issue exists there too, no (we just created this branch at the end of December)?

202012 also need to be included, I thought 202012 will be automatically synced with the master for a period

lguohan pushed a commit that referenced this pull request Jan 15, 2021
… before assignment” error (#6419)

In rare case can see that xcvrd failed due to "UnboundLocalError: local variable 'label_port' referenced before assignment"

Init "label_port" as None at the beginning of the function, to avoid the case that "label_port" not assigned.
@jleveque
Copy link
Contributor

@jleveque, although this happened in a very rare case, it shall be included in 20191.

But what about 202012? I assume the rare issue exists there too, no (we just created this branch at the end of December)?

202012 also need to be included, I thought 202012 will be automatically synced with the master for a period

Just to be certain that the PR gets included in the branch, please add the "Request for 202012 branch" to any relevant PRs so that we can track.

abdosi pushed a commit that referenced this pull request Feb 19, 2021
… before assignment” error (#6419)

In rare case can see that xcvrd failed due to "UnboundLocalError: local variable 'label_port' referenced before assignment"

Init "label_port" as None at the beginning of the function, to avoid the case that "label_port" not assigned.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants