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

"docker exec -i bgp pkill -9 bgpd" failure when bgpd is not running #416

Closed
dzhangalibaba opened this issue Dec 12, 2018 · 6 comments
Closed

Comments

@dzhangalibaba
Copy link
Contributor

admin@ASW-7005:~$ sudo bash -xe warm-reboot -v
++ logname
+ REBOOT_USER=admin
++ date
+ REBOOT_TIME='Wed Dec 12 02:23:32 UTC 2018'
+ REBOOT_CAUSE_FILE=/var/cache/sonic/reboot-cause.txt
+ WARM_DIR=/host/warmboot
+ REDIS_FILE=dump.rdb
++ basename warm-reboot
+ REBOOT_SCRIPT_NAME=warm-reboot
+ REBOOT_TYPE=warm-reboot
+ VERBOSE=no
+ FORCE=no
+ [[ 0 -ne 0 ]]
++ sonic-cfggen -y /etc/sonic/sonic_version.yml -v asic_type
+ sonic_asic_type=broadcom
+ parseOptions -v
+ getopts 'vfh?' opt
+ case ${opt} in
+ VERBOSE=yes
+ getopts 'vfh?' opt
+ BOOT_TYPE_ARG=cold
+ case "$REBOOT_TYPE" in
+ [[ broadcom == \m\e\l\l\a\n\o\x ]]
+ BOOT_TYPE_ARG=warm
+ trap clear_warm_boot EXIT HUP INT QUIT TERM KILL ABRT ALRM
+ config warm_restart enable system
++ cat /sys/kernel/kexec_loaded
+ [[ 0 -eq 1 ]]
++ sonic_installer list
++ grep 'Next: '
++ cut -d ' ' -f 2
+ NEXT_SONIC_IMAGE=SONiC-OS-HEAD.802-d9c076d
+ grep -q aboot_platform= /host/machine.conf
+ grep -q onie_platform= /host/machine.conf
++ cat /host/grub/grub.cfg
++ grep linux
++ sed '/SONiC-OS-HEAD.802-d9c076d'\''/,/}/!g'
+ KERNEL_OPTIONS='        linux   /image-HEAD.802-d9c076d/boot/vmlinuz-4.9.0-7-amd64 root=/dev/sda3  rw console=tty0 console=ttyS1,115200n8 quiet                  net.ifnames=0 biosdevname=0                 loop=image-HEAD.802-d9c076d/fs.squashfs loopfstype=squashfs                                       apparmor=1 security=apparmor varlog_size=4096 usbcore.autosuspend=-1 '
++ echo linux /image-HEAD.802-d9c076d/boot/vmlinuz-4.9.0-7-amd64 root=/dev/sda3 rw console=tty0 console=ttyS1,115200n8 quiet net.ifnames=0 biosdevname=0 loop=image-HEAD.802-d9c076d/fs.squashfs loopfstype=squashfs apparmor=1 security=apparmor varlog_size=4096 usbcore.autosuspend=-1
++ cut -d ' ' -f 2
+ KERNEL_IMAGE=/host/image-HEAD.802-d9c076d/boot/vmlinuz-4.9.0-7-amd64
++ echo linux /image-HEAD.802-d9c076d/boot/vmlinuz-4.9.0-7-amd64 root=/dev/sda3 rw console=tty0 console=ttyS1,115200n8 quiet net.ifnames=0 biosdevname=0 loop=image-HEAD.802-d9c076d/fs.squashfs loopfstype=squashfs apparmor=1 security=apparmor varlog_size=4096 usbcore.autosuspend=-1
++ sed -e 's/\s*linux\s*/BOOT_IMAGE=/'
+ BOOT_OPTIONS='BOOT_IMAGE=/image-HEAD.802-d9c076d/boot/vmlinuz-4.9.0-7-amd64 root=/dev/sda3 rw console=tty0 console=ttyS1,115200n8 quiet net.ifnames=0 biosdevname=0 loop=image-HEAD.802-d9c076d/fs.squashfs loopfstype=squashfs apparmor=1 security=apparmor varlog_size=4096 usbcore.autosuspend=-1 SONIC_BOOT_TYPE=warm'
++ echo /host/image-HEAD.802-d9c076d/boot/vmlinuz-4.9.0-7-amd64
++ sed s/vmlinuz/initrd.img/g
+ INITRD=/host/image-HEAD.802-d9c076d/boot/initrd.img-4.9.0-7-amd64
+ [[ broadcom == \m\e\l\l\a\n\o\x ]]
+ /sbin/kexec -l /host/image-HEAD.802-d9c076d/boot/vmlinuz-4.9.0-7-amd64 --initrd=/host/image-HEAD.802-d9c076d/boot/initrd.img-4.9.0-7-amd64 '--append=BOOT_IMAGE=/image-HEAD.802-d9c076d/boot/vmlinuz-4.9.0-7-amd64 root=/dev/sda3 rw console=tty0 console=ttyS1,115200n8 quiet net.ifnames=0 biosdevname=0 loop=image-HEAD.802-d9c076d/fs.squashfs loopfstype=squashfs apparmor=1 security=apparmor varlog_size=4096 usbcore.autosuspend=-1 SONIC_BOOT_TYPE=warm'
+ [[ warm-reboot = \f\a\s\t\-\r\e\b\o\o\t ]]
+ [[ warm-reboot = \f\a\s\t\f\a\s\t\-\r\e\b\o\o\t ]]
+ [[ warm-reboot = \w\a\r\m\-\r\e\b\o\o\t ]]
+ debug 'Pausing orchagent ...'
+ [[ xyes == x\y\e\s ]]
++ date
+ echo Wed Dec 12 02:23:35 UTC 2018 Pausing orchagent ...
Wed Dec 12 02:23:35 UTC 2018 Pausing orchagent ...
+ logger 'Pausing orchagent ...'
++ seq 4 -1 0
+ for i in `seq 4 -1 0`
+ docker exec -i swss /usr/bin/orchagent_restart_check -w 1000
RESTARTCHECK succeeded
+ break
+ debug 'Stopping bgp ...'
+ [[ xyes == x\y\e\s ]]
++ date
+ echo Wed Dec 12 02:23:35 UTC 2018 Stopping bgp ...
Wed Dec 12 02:23:35 UTC 2018 Stopping bgp ...
+ logger 'Stopping bgp ...'
+ docker exec -i bgp pkill -9 zebra
+ docker exec -i bgp pkill -9 bgpd
+ clear_warm_boot
+ debug 'Failure (1) cleanup ...'
+ [[ xyes == x\y\e\s ]]
++ date
+ echo Wed Dec 12 02:23:35 UTC 2018 Failure '(1)' cleanup ...
Wed Dec 12 02:23:35 UTC 2018 Failure (1) cleanup ...
+ logger 'Failure (1) cleanup ...'
+ config warm_restart disable
+ /sbin/kexec -u
++ date +%Y%m%d-%H%M%S
+ TIMESTAMP=20181212-022336
+ [[ -f /host/warmboot/dump.rdb ]]



admin@ASW-7005:~$ show version
SONiC Software Version: SONiC.HEAD.802-d9c076d
Distribution: Debian 9.6
Kernel: 4.9.0-7-amd64
Build commit: d9c076d
Build date: Tue Dec 11 10:13:07 UTC 2018
Built by: johnar@jenkins-worker-4

Docker images:
REPOSITORY                 TAG                 IMAGE ID            SIZE
docker-syncd-brcm          HEAD.802-d9c076d    22a4e5df4784        363.2 MB
docker-syncd-brcm          latest              22a4e5df4784        363.2 MB
docker-orchagent-brcm      HEAD.802-d9c076d    9618d13eb393        287.8 MB
docker-orchagent-brcm      latest              9618d13eb393        287.8 MB
docker-lldp-sv2            HEAD.802-d9c076d    f3de9c7f6800        276 MB
docker-lldp-sv2            latest              f3de9c7f6800        276 MB
docker-dhcp-relay          HEAD.802-d9c076d    c28813a5e4a5        258 MB
docker-dhcp-relay          latest              c28813a5e4a5        258 MB
docker-database            HEAD.802-d9c076d    4231cb13add9        256.6 MB
docker-database            latest              4231cb13add9        256.6 MB
docker-teamd               HEAD.802-d9c076d    70e08aea97c4        275.8 MB
docker-teamd               latest              70e08aea97c4        275.8 MB
docker-snmp-sv2            HEAD.802-d9c076d    9672cfc1f896        295.5 MB
docker-snmp-sv2            latest              9672cfc1f896        295.5 MB
docker-router-advertiser   HEAD.802-d9c076d    a3e24941ae36        254.3 MB
docker-router-advertiser   latest              a3e24941ae36        254.3 MB
docker-platform-monitor    HEAD.802-d9c076d    3082b36685d2        288.3 MB
docker-platform-monitor    latest              3082b36685d2        288.3 MB
docker-fpm-quagga          HEAD.802-d9c076d    6dd014b5fbec        282.7 MB
docker-fpm-quagga          latest              6dd014b5fbec        282.7 MB
@dzhangalibaba
Copy link
Contributor Author

@yxieca You want me to submit the PR for the fix or you guys will do that? Thanks

@yxieca
Copy link
Contributor

yxieca commented Dec 12, 2018

@dzhangalibaba

You can submit PR. But before doing so, please investigate if there is a way to allow return code 0 and 1. The change I gave you to try ignores all errors.

Thanks,
Ying

@dzhangalibaba
Copy link
Contributor Author

@yxieca I submitted the PR, which we can use "|| [$? == 1] " instead of "|| /bin/true"

@yxieca
Copy link
Contributor

yxieca commented Dec 13, 2018

@dzhangalibaba

I've merged the change. Please create buildimage pr to move sonic-utility submodule point.

Thanks,
Ying

@dzhangalibaba
Copy link
Contributor Author

@yxieca

created one : sonic-net/sonic-buildimage#2381

Thanks,
Dong

@dzhangalibaba
Copy link
Contributor Author

fixed

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

No branches or pull requests

2 participants