Skip to content

[intfsorch] Retrieve Port object before setting NAT zone on router in…#1372

Merged
arlakshm merged 7 commits intosonic-net:masterfrom
kperumalbfn:nat_zone_mstr
Aug 11, 2020
Merged

[intfsorch] Retrieve Port object before setting NAT zone on router in…#1372
arlakshm merged 7 commits intosonic-net:masterfrom
kperumalbfn:nat_zone_mstr

Conversation

@kperumalbfn
Copy link
Contributor

Method(setRouterIntfsNatZoneId) is called using local Port object that causes orchagent to crash on config reload with non-zero NAT zone configuration.

Orchagent:
Retrieve Port object using getPort method before setting NAT zone on Router interfaces.

Addressing the issue : #1312
Signed-off-by: Kumaresh Perumal [email protected]

@kperumalbfn
Copy link
Contributor Author

retest this please

@arlakshm
Copy link
Contributor

arlakshm commented Aug 5, 2020

restest this please


/* Set nat zone id */
if ((!nat_zone.empty()) and (port.m_nat_zone_id != nat_zone_id))
if (gPortsOrch->getPort(alias, port))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this gPortsOrch->getPort(alias, port))check is already done above( line 665). Why do we need to do the check here again ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arlakshm RIF objects are created in setIntf() before calling set_nat_zone API and the RIF object handle is set in port.m_rif_id. To get the Port object with rif handle, getPort() is invoked before setting the NAT zone.

Copy link
Contributor

@arlakshm arlakshm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as comments

Copy link
Contributor

@arlakshm arlakshm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kperumalbfn
Copy link
Contributor Author

Retest vs please

@kperumalbfn
Copy link
Contributor Author

retest this please

2 similar comments
@kperumalbfn
Copy link
Contributor Author

retest this please

@kperumalbfn
Copy link
Contributor Author

retest this please

@prsunny
Copy link
Collaborator

prsunny commented Aug 6, 2020

looks like this is required for 201911 as well, correct?

@arlakshm
Copy link
Contributor

arlakshm commented Aug 6, 2020

looks like this is required for 201911 as well, correct?

@prsunny, yes this is required for 201911. I have added the label.

@kperumalbfn
Copy link
Contributor Author

retest this please

@kperumalbfn
Copy link
Contributor Author

retest this please

@kperumalbfn
Copy link
Contributor Author

kperumalbfn commented Aug 10, 2020

@arlakshm @rlhui Could you merge this.

@abdosi
Copy link
Contributor

abdosi commented Sep 3, 2020

@arlakshm Will wait for PR#1411 for 201911 first and then cherry-pick this.

@arlakshm
Copy link
Contributor

arlakshm commented Sep 3, 2020

@arlakshm Will wait for PR#1411 for 201911 first and then cherry-pick this.

@abdosi, I think #1411 and this PR are independent. We can cherry-pick this.

abdosi pushed a commit that referenced this pull request Sep 3, 2020
…terfaces. (#1372)

Method(setRouterIntfsNatZoneId) is called using local Port object that causes orchagent to crash on config reload with non-zero NAT zone configuration.

Orchagent:
Retrieve Port object using getPort method before setting NAT zone on Router interfaces.

Addressing the issue : #1312
Signed-off-by: Kumaresh Perumal [email protected]
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
- What I did
Added unit tests for ecnconfig command
Updated 'show ecn' command to use run_command wrapper
Updated 'config ecn' command to allow configuration of drop probabilities
Cleanup trailing spaces in ecnconfig script and add hooks to support unit tests

- How to verify it
Ran the new ecn_test.py and it passed

Signed-off-by: Neetha John <[email protected]>
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
…terfaces. (sonic-net#1372)

Method(setRouterIntfsNatZoneId) is called using local Port object that causes orchagent to crash on config reload with non-zero NAT zone configuration.

Orchagent:
Retrieve Port object using getPort method before setting NAT zone on Router interfaces.

Addressing the issue : sonic-net#1312
Signed-off-by: Kumaresh Perumal [email protected]
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