Skip to content

fix(agw): on AGW reboot bring up SGi interface.#8169

Merged
pshelar merged 1 commit intomagma:masterfrom
pshelar:fix-if-up1
Jul 20, 2021
Merged

fix(agw): on AGW reboot bring up SGi interface.#8169
pshelar merged 1 commit intomagma:masterfrom
pshelar:fix-if-up1

Conversation

@pshelar
Copy link
Copy Markdown
Contributor

@pshelar pshelar commented Jul 20, 2021

In case of missing interface file for SGi interface, the
interface does not come up automatically. That can impact
SGi connectivity.

Following patch handles the case.

Signed-off-by: Pravin B Shelar [email protected]

Summary

Test Plan

validated on AGW:

root@phy-u3:~# ifconfig eth0 down
root@phy-u3:~# config_stateless_agw.py flushall_redis; ifconfig eth0
Flushing all content in Redis
OK
Restarting sctpd
Job for sctpd.service failed because the control process exited with error code.
See "systemctl status sctpd.service" and "journalctl -xe" for details.
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.22.70.93  netmask 255.255.255.0  broadcast 10.22.70.255
        inet6 fe80::2e0:67ff:fe1a:4f58  prefixlen 64  scopeid 0x20<link>
        ether 00:e0:67:1a:4f:58  txqueuelen 1000  (Ethernet)
        RX packets 370877  bytes 212022310 (212.0 MB)
        RX errors 0  dropped 186  overruns 0  frame 0
        TX packets 311680  bytes 165872062 (165.8 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device memory 0xb1500000-b151ffff

Additional Information

  • This change is backwards-breaking

In case of missing interface file for SGi interface, the
interface does not come up automatically. That can impact
SGi connectivity.

Following patch handles the case.

Signed-off-by: Pravin B Shelar <[email protected]>
@pshelar pshelar requested review from a team and ardzoht July 20, 2021 03:06
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for opening a PR! 💯

A couple initial guidelines

Howto

  • Reviews. The "Reviewers" listed for this PR are the Magma maintainers who will shepherd it.
  • Checks. All required CI checks must pass before merge.
  • Merge. Once approved and passing CI checks, use the ready2merge label to indicate the maintainers can merge your PR.

More info

Please take a moment to read through the Magma project's

If this is your first Magma PR, also consider reading

@magmabot magmabot added the component: agw Access gateway-related issue label Jul 20, 2021
@github-actions
Copy link
Copy Markdown
Contributor

feg-workflow

    2 files  145 suites   30s ⏱️
338 tests 338 ✔️ 0 💤 0 ❌
352 runs  352 ✔️ 0 💤 0 ❌

Results for commit 817c816.

sgi_interface = service_config['nat_iface']
if_up_cmd = "ip link set dev %s up" % sgi_interface
subprocess.call(if_up_cmd.split())
print("ip up cmd %s", if_up_cmd)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Lets track a TODO to implement something more Ubuntu native. Thanks for the fix, also would you mind cherry picking this to 1.6/5

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

actually this is to handle the upgrade case for debian based AGWs.
The ubuntu based AGW installation always makes sure we have interface file for eth0:

if [ -z "$addr1" ] || [ -z "$gw_addr" ]

@pshelar pshelar merged commit ffc86ba into magma:master Jul 20, 2021
@pshelar pshelar added apply-v1.5 Apply this commit to the v1.5 release branch as well. apply-v1.6 labels Jul 21, 2021
themarwhal pushed a commit that referenced this pull request Jul 21, 2021
In case of missing interface file for SGi interface, the
interface does not come up automatically. That can impact
SGi connectivity.

Following patch handles the case.

Signed-off-by: Pravin B Shelar <[email protected]>
themarwhal pushed a commit that referenced this pull request Jul 21, 2021
In case of missing interface file for SGi interface, the
interface does not come up automatically. That can impact
SGi connectivity.

Following patch handles the case.

Signed-off-by: Pravin B Shelar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apply-v1.5 Apply this commit to the v1.5 release branch as well. apply-v1.6 backported-v1.5 backported-v1.6 component: agw Access gateway-related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants