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

Move RADV fastboot handling to a service script #5108

Merged
merged 4 commits into from
Aug 11, 2020

Conversation

vaibhavhd
Copy link
Contributor

@vaibhavhd vaibhavhd commented Aug 5, 2020

- Why I did it
Fastboot script contains sections of RADV handling which are better suited in a separate service script.
Other services (swss, bgp, syncd) already have their service scripts. RADV is an addition to the list.

- How I did it
Added start, stop sections for RADV service. Added handlers for special handling for fast, warm and cold reboot.

- How to verify it
Started the service and stopped the service successfully.
Performed warm and fast reboot without any issues (utility script unchanged).

Stop Path:

$ sudo /usr/local/bin/radv.sh stop

$ sudo systemctl status radv
â—� radv.service - Router advertiser container
   Loaded: loaded (/lib/systemd/system/radv.service; enabled-runtime; vendor preset: enabled)
   Active: activating (auto-restart) since Fri 2020-08-07 19:58:36 UTC; 2s ago
  Process: 3018 ExecStart=/usr/bin/radv.sh wait (code=exited, status=0/SUCCESS)
  Process: 5545 ExecStop=/usr/bin/radv.sh stop (code=exited, status=0/SUCCESS)
 Main PID: 3018 (code=exited, status=0/SUCCESS)

$ sudo grep -i radv /var/log/syslog
Aug  7 19:42:05.378372 str-s6100-acs-4 NOTICE admin: Stopping radv service...
Aug  7 19:42:05.798310 str-s6100-acs-4 NOTICE admin: Warm boot flag: radv false.
Aug  7 19:42:05.805479 str-s6100-acs-4 NOTICE admin: Fast boot flag: radv false.
Aug  7 19:42:06.444666 str-s6100-acs-4 INFO radv.sh[7908]: 0
Aug  7 19:42:06.453780 str-s6100-acs-4 NOTICE admin: Stopped radv service...

Start Path:

$ sudo /usr/local/bin/radv.sh start

$ sudo grep -i radv /var/log/syslog
Aug  7 19:42:24.116816 str-s6100-acs-4 NOTICE admin: Starting radv service...
Aug  7 19:42:24.564898 str-s6100-acs-4 NOTICE admin: Warm boot flag: radv false.
Aug  7 19:42:24.572604 str-s6100-acs-4 NOTICE admin: Fast boot flag: radv false.
Aug  7 19:42:26.998240 str-s6100-acs-4 NOTICE admin: Started radv service...

$ sudo systemctl status radv
â—� radv.service - Router advertiser container
   Loaded: loaded (/lib/systemd/system/radv.service; enabled-runtime; vendor preset: enabled)
   Active: active (running) since Fri 2020-08-07 19:43:31 UTC; 2s ago
  Process: 9817 ExecStartPre=/usr/bin/radv.sh start (code=exited, status=0/SUCCESS)
 Main PID: 9890 (radv.sh)
    Tasks: 11 (limit: 4915)
   Memory: 23.7M
   CGroup: /system.slice/radv.service
           ├─9890 /bin/bash /usr/bin/radv.sh wait
           └─9891 docker wait radv

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

  • 201811
  • 201911
  • 202006

- Description for the changelog

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

@lguohan lguohan requested a review from tahmed-dev August 6, 2020 10:13
@tahmed-dev
Copy link
Contributor

Thanks very much @vaibhavhd for your efforts. Do you intend on have a follow up PR to this one as I do not see how this script is being triggered?

@vaibhavhd
Copy link
Contributor Author

Thanks very much @vaibhavhd for your efforts. Do you intend on have a follow up PR to this one as I do not see how this script is being triggered?

Hey @tahmed-dev, yes the intention is to first test and merge service scripts, and then merge modified fast-reboot script.
I have added a new follow up PR for sonic-utilities repo to incorporate these changes:
sonic-net/sonic-utilities#1036

@vaibhavhd vaibhavhd requested a review from yxieca August 7, 2020 21:50
@vaibhavhd vaibhavhd self-assigned this Aug 10, 2020
@vaibhavhd
Copy link
Contributor Author

retest vsimage please

@vaibhavhd vaibhavhd merged commit 31d7f27 into sonic-net:master Aug 11, 2020
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
* New /usr/local/bin/ script to start/stop radv service
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.

3 participants