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

Update redis to 5.0.3 #3066

Merged
merged 1 commit into from
Jul 4, 2019
Merged

Update redis to 5.0.3 #3066

merged 1 commit into from
Jul 4, 2019

Conversation

jipanyang
Copy link
Collaborator

@jipanyang jipanyang commented Jun 22, 2019

Signed-off-by: Jipan Yang jipan.yang@alibaba-inc.com

- What I did
redis version update with debian stretch:

https://github.com/raw/antirez/redis/5.0/00-RELEASENOTES

redis-server 5.0.3-3~bpo9+2: 
     https://packages.debian.org/stretch-backports/redis-server
redis-tool 5.0.3-3~bpo9+2
    https://packages.debian.org/stretch-backports/redis-tools
hiredis (0.14.0-3~bpo9+1)
    https://packages.debian.org/source/stretch-backports/hiredis
    https://github.com/redis/hiredis/blob/master/CHANGELOG.md

- How I did it
unix default socket changed to /var/run/redis/redis.sock from
/var/run/redis/redis-server.sock to be consistent with current code implementation.

(The other choice is to change all the code to use new default path)
- How to verify it

root@vlab-01:/home/admin# vtysh -c 'show bgp sum'

IPv4 Unicast Summary:
BGP router identifier 10.1.0.32, local AS number 65100 vrf-id 0
BGP table version 12804
RIB entries 12807, using 2001 KiB of memory
Peers 4, using 83 KiB of memory
Peer groups 2, using 128 bytes of memory

Neighbor        V         AS MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd
10.0.0.57       4      64600    3239    6447        0    0    0 00:01:58         6400
10.0.0.59       4      64600    3236    6447        0    0    0 00:01:58         6400
10.0.0.61       4      64600    5024    5986        0    0    0 00:00:32         6400
10.0.0.63       4      64600    3287    5506        0    0    0 00:00:34         6400

Total number of neighbors 4

IPv6 Unicast Summary:
BGP router identifier 10.1.0.32, local AS number 65100 vrf-id 0
BGP table version 12803
RIB entries 12805, using 2001 KiB of memory
Peers 4, using 83 KiB of memory
Peer groups 2, using 128 bytes of memory

Neighbor        V         AS MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd
fc00::72        4      64600    3235    6446        0    0    0 00:01:57         6400
fc00::76        4      64600    3232    6266        0    0    0 00:01:49         6400
fc00::7a        4      64600    3228    4807        0    0    0 00:00:25         6400
fc00::7e        4      64600    3358    4053        0    0    0 00:00:31         6400

Total number of neighbors 4
root@vlab-01:/home/admin# show version

SONiC Software Version: SONiC.master.0-dirty-20190621.231403
Distribution: Debian 9.9
Kernel: 4.9.0-9-2-amd64
Build commit: f4d07dc0
Build date: Sat Jun 22 06:34:29 UTC 2019
Built by: jipan@dockerhost05

Platform: x86_64-kvm_x86_64-r0
HwSKU: Force10-S6000
ASIC: vs
/usr/bin/decode-syseeprom : ERROR : cannot load module: /usr/share/sonic/device/x86_64-kvm_x86_64-r0/plugins/eeprom.py
Serial Number: 
Uptime: 07:04:25 up 8 min,  1 user,  load average: 3.32, 5.47, 3.14

Docker images:
REPOSITORY                 TAG                              IMAGE ID            SIZE
docker-orchagent           latest                           fd2c776d3668        387MB
docker-orchagent           master.0-dirty-20190621.231403   fd2c776d3668        387MB
docker-database            latest                           df035c8fd43b        352MB
docker-database            master.0-dirty-20190621.231403   df035c8fd43b        352MB
docker-teamd               latest                           3bba6febaa8e        374MB
docker-teamd               master.0-dirty-20190621.231403   3bba6febaa8e        374MB
docker-sonic-telemetry     latest                           477b1450b3d5        375MB
docker-sonic-telemetry     master.0-dirty-20190621.231403   477b1450b3d5        375MB
docker-snmp-sv2            latest                           9e216648e2a3        384MB
docker-snmp-sv2            master.0-dirty-20190621.231403   9e216648e2a3        384MB
docker-fpm-frr             latest                           6cbbff760d65        385MB
docker-fpm-frr             master.0-dirty-20190621.231403   6cbbff760d65        385MB
docker-lldp-sv2            latest                           e1f7f9c9df17        370MB
docker-lldp-sv2            master.0-dirty-20190621.231403   e1f7f9c9df17        370MB
docker-syncd-vs            latest                           8f3b873a3ff9        354MB
docker-syncd-vs            master.0-dirty-20190621.231403   8f3b873a3ff9        354MB
docker-dhcp-relay          latest                           e91fad0252a2        357MB
docker-dhcp-relay          master.0-dirty-20190621.231403   e91fad0252a2        357MB
docker-router-advertiser   latest                           904024b06841        352MB
docker-router-advertiser   master.0-dirty-20190621.231403   904024b06841        352MB
docker-platform-monitor    latest                           5db67e5f9f5d        390MB
docker-platform-monitor    master.0-dirty-20190621.231403   5db67e5f9f5d        390MB

root@vlab-01:/home/admin# redis-cli --version
redis-cli 5.0.3 (git:f4d07dc0-dirty)
root@vlab-01:/home/admin# 

- Description for the changelog

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

@lguohan
Copy link
Collaborator

lguohan commented Jun 22, 2019

does rdb format changed between 3.2.4 to 5.0.3. can 5.0.3 reads the redis dump from 3.2.4. this might affect warm reboot since it dumps the redis databased before reboot and then load it after reboot.

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
@jipanyang
Copy link
Collaborator Author

@lguohan I don't have the right hardware setup for verifying system warm reboot. VS environment not working ( Actually never worked before even with same redis version) . It is appreciated if someone with hardware resource available may do a quick system warm-reboot test with the redis version change.

Checking the log (from current redis to redis 5.03 warm upgrade), it looks data restore is good.

<1> orchagent:

Jun 22 21:08:54.398710 vlab-01 NOTICE swss#orchagent: :- addLagMember: Add member Ethernet124 to LAG PortChannel0004 lid:200000000081c pid:1000000000021
Jun 22 21:08:54.398710 vlab-01 NOTICE swss#orchagent: :- setWarmStartState: orchagent warm start state changed to restored
Jun 22 21:08:54.398710 vlab-01 NOTICE swss#orchagent: :- warmRestoreAndSyncUp: Orchagent state restore done
Jun 22 21:08:54.398710 vlab-01 NOTICE swss#orchagent: :- syncd_apply_view: Notify syncd APPLY_VIEW
Jun 22 21:08:54.398710 vlab-01 NOTICE swss#orchagent: :- sai_redis_notify_syncd: sending syncd APPLY view

<2> neighsyncd

Jun 22 21:08:31.644124 vlab-01 NOTICE swss#neighsyncd: :- checkWarmStart: neighsyncd doing warm start, restore count 2
Jun 22 21:08:31.644124 vlab-01 NOTICE swss#neighsyncd: :- getWarmStartTimer: warmStartTimer is not configured or invalid for docker: swss, app: neighsyncd
Jun 22 21:08:31.644124 vlab-01 NOTICE swss#neighsyncd: :- setWarmStartState: neighsyncd warm start state changed to initialized
Jun 22 21:08:31.644124 vlab-01 NOTICE swss#neighsyncd: :- setWarmStartState: neighsyncd warm start state changed to restored
Jun 22 21:08:31.644124 vlab-01 NOTICE swss#neighsyncd: :- readTableToMap: Restored appDB table to internal cache map

<3> syncd view comparison has issue, but probably not caused by redis version change.


Jun 22 21:07:27.660131 vlab-01 NOTICE syncd#syncd: :- createPreMatchMap: preMatch map size: 66, tmp oid obj: 220
Jun 22 21:07:27.660216 vlab-01 NOTICE syncd#syncd: :- createPreMatchMap: create preMatch map took 0.080588 sec
Jun 22 21:07:27.668886 vlab-01 NOTICE syncd#syncd: :- checkMatchedPorts: all ports are matched
Jun 22 21:07:27.689009 vlab-01 NOTICE syncd#syncd: :- performObjectSetTransition: explicit SAI_FDB_ENTRY_ATTR_PACKET_ACTION:SAI_PACKET_ACTION_FORWARD is the same as default, no need for ASIC SET action
Jun 22 21:07:27.792933 vlab-01 NOTICE syncd#syncd: message repeated 47 times: [ :- performObjectSetTransition: explicit SAI_FDB_ENTRY_ATTR_PACKET_ACTION:SAI_PACKET_ACTION_FORWARD is the same as default, no need for ASIC SET action]
Jun 22 21:07:27.792933 vlab-01 NOTICE syncd#syncd: :- applyViewTransition: comparison logic took 0.124167 sec
Jun 22 21:07:27.793322 vlab-01 NOTICE syncd#syncd: :- syncdApplyView: ASIC operations to execute: 26
Jun 22 21:07:27.798046 vlab-01 NOTICE syncd#syncd: :- syncdApplyView: all temporary view objects were processed to FINAL state
Jun 22 21:07:27.802212 vlab-01 NOTICE syncd#syncd: :- syncdApplyView: all current view objects were processed to FINAL state
Jun 22 21:07:27.802362 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a0000001e:0x3a0000000006ac) is missing from temp R2V
Jun 22 21:07:27.803738 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a00000006:0x3a000000000695) is missing from temp R2V
Jun 22 21:07:27.807472 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a00000002:0x3a000000000691) is missing from temp R2V
Jun 22 21:07:27.808064 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a00000020:0x3a0000000006ae) is missing from temp R2V
Jun 22 21:07:27.808849 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a0000000c:0x3a00000000069b) is missing from temp R2V
Jun 22 21:07:27.809449 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a00000018:0x3a0000000006a6) is missing from temp R2V
Jun 22 21:07:27.810686 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a0000000a:0x3a000000000699) is missing from temp R2V
Jun 22 21:07:27.810834 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a00000010:0x3a00000000069e) is missing from temp R2V
Jun 22 21:07:27.811375 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a0000001d:0x3a0000000006ab) is missing from temp R2V
Jun 22 21:07:27.811963 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a00000005:0x3a000000000694) is missing from temp R2V
Jun 22 21:07:27.812542 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a0000001c:0x3a0000000006aa) is missing from temp R2V
Jun 22 21:07:27.812997 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a00000003:0x3a000000000692) is missing from temp R2V
Jun 22 21:07:27.813531 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a00000012:0x3a0000000006a0) is missing from temp R2V
Jun 22 21:07:27.813996 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a0000001f:0x3a0000000006ad) is missing from temp R2V
Jun 22 21:07:27.815044 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a00000001:0x3a000000000690) is missing from temp R2V
Jun 22 21:07:27.815076 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a00000004:0x3a000000000693) is missing from temp R2V
Jun 22 21:07:27.815517 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a0000000d:0x3a00000000069c) is missing from temp R2V
Jun 22 21:07:27.816076 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a0000000b:0x3a00000000069a) is missing from temp R2V
Jun 22 21:07:27.816652 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a00000019:0x3a0000000006a7) is missing from temp R2V
Jun 22 21:07:27.817137 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a00000009:0x3a000000000698) is missing from temp R2V
Jun 22 21:07:27.817137 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a00000016:0x3a0000000006a4) is missing from temp R2V
Jun 22 21:07:27.818051 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a00000008:0x3a000000000697) is missing from temp R2V
Jun 22 21:07:27.818051 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a00000011:0x3a00000000069f) is missing from temp R2V
Jun 22 21:07:27.818051 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a00000015:0x3a0000000006a3) is missing from temp R2V
Jun 22 21:07:27.819863 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a0000001b:0x3a0000000006a9) is missing from temp R2V
Jun 22 21:07:27.819863 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a00000014:0x3a0000000006a2) is missing from temp R2V
Jun 22 21:07:27.819863 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a0000000e:0x3a00000000069d) is missing from temp R2V
Jun 22 21:07:27.819863 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a00000013:0x3a0000000006a1) is missing from temp R2V
Jun 22 21:07:27.819863 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a00000007:0x3a000000000696) is missing from temp R2V
Jun 22 21:07:27.819863 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a0000001a:0x3a0000000006a8) is missing from temp R2V
Jun 22 21:07:27.819863 vlab-01 ERR syncd#syncd: :- checkMap: current R2V (0x3a00000017:0x3a0000000006a5) is missing from temp R2V
Jun 22 21:07:27.823742 vlab-01 ERR syncd#syncd: :- syncdApplyView: wrong number of vid/rid items in map, forgot to translate? R2V: 1602:1571, V2R: 1602:1571, FIXME
Jun 22 21:07:27.823742 vlab-01 ERR syncd#syncd: :- syncdApplyView: Exception: :- syncdApplyView: wrong number of vid/rid items in map, forgot to translate? R2V: 1602:1571, V2R: 1602:1571, FIXME
Jun 22 21:07:27.886969 vlab-01 NOTICE syncd#syncd: :- syncdApplyView: apply took 0.979291 sec
Jun 22 21:07:27.888002 vlab-01 NOTICE syncd#syncd: :- sendNotifyResponse: sending response: SAI_STATUS_FAILURE
Jun 22 21:07:27.890749 vlab-01 NOTICE swss#orchagent: :- sai_redis_internal_notify_syncd: notify response: SAI_STATUS_FAILURE
Jun 22 21:07:27.890749 vlab-01 ERR swss#orchagent: :- sai_redis_notify_syncd: notify syncd failed: SAI_STATUS_FAILURE
Jun 22 21:07:27.890749 vlab-01 ERR swss#orchagent: :- syncd_apply_view: Failed to notify syncd APPLY_VIEW -1
Jun 22 21:07:27.894828 vlab-01 INFO swss#supervisord: orchagent terminate called without an active exception

<4> warm-reboot log

admin@vlab-01:~$ redis-cli --version
redis-cli 3.2.4 (git:231d309b-dirty)
admin@vlab-01:~$ vtysh -c 'show bgp sum'

IPv4 Unicast Summary:
BGP router identifier 10.1.0.32, local AS number 65100 vrf-id 0
BGP table version 17220
RIB entries 12807, using 2001 KiB of memory
Peers 4, using 83 KiB of memory
Peer groups 2, using 128 bytes of memory

Neighbor        V         AS MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd
10.0.0.57       4      64600    4410    4571        0    0    0 00:15:26         6400
10.0.0.59       4      64600    5363    4600        0    0    0 00:15:28         6400
10.0.0.61       4      64600    3513    6705        0    0    0 00:15:42         6400
10.0.0.63       4      64600    3515    6705        0    0    0 00:15:43         6400

Total number of neighbors 4

IPv6 Unicast Summary:
BGP router identifier 10.1.0.32, local AS number 65100 vrf-id 0
BGP table version 16009
RIB entries 12805, using 2001 KiB of memory
Peers 4, using 83 KiB of memory
Peer groups 2, using 128 bytes of memory

Neighbor        V         AS MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd
fc00::72        4      64600    3508    6343        0    0    0 00:15:27         6400
fc00::76        4      64600    6710    5878        0    0    0 00:15:12         6400
fc00::7a        4      64600    3510    8075        0    0    0 00:15:39         6400
fc00::7e        4      64600    3510    8075        0    0    0 00:15:40         6400

Total number of neighbors 4
admin@vlab-01:~$ sudo su
root@vlab-01:/home/admin# sonic_installer list
Current: SONiC-OS-HEAD.3-231d309b
Next: SONiC-OS-HEAD.3-231d309b
Available: 
SONiC-OS-master.0-dirty-20190621.231403
SONiC-OS-HEAD.3-231d309b
0190621.231403home/admin# sonic_installer set_default  SONiC-OS-master.0-dirty-20
Command: grub-set-default --boot-directory=/host 0
                                          list
Current: SONiC-OS-HEAD.3-231d309b
Next: SONiC-OS-master.0-dirty-20190621.231403
Available: 
SONiC-OS-master.0-dirty-20190621.231403
SONiC-OS-HEAD.3-231d309b
root@vlab-01:/home/admin# warm-reboot ^C
root@vlab-01:/home/admin# docker ps
CONTAINER ID        IMAGE                             COMMAND                  CREATED             STATUS              PORTS               NAMES
ab1cde0d5201        docker-syncd-vs:latest            "/usr/bin/supervisord"   11 days ago         Up 18 minutes                           syncd
e68c4bb053cb        docker-teamd:latest               "/usr/bin/supervisord"   11 days ago         Up 18 minutes                           teamd
3f9794863530        docker-sonic-telemetry:latest     "/usr/bin/supervisord"   11 days ago         Up 18 minutes                           telemetry
d03c9c52e54e        docker-snmp-sv2:latest            "/usr/bin/supervisord"   11 days ago         Up 18 minutes                           snmp
889a2b7f07e4        docker-router-advertiser:latest   "/usr/bin/supervisord"   11 days ago         Up 18 minutes                           radv
12ca8ca5d903        docker-orchagent:latest           "/usr/bin/supervisord"   11 days ago         Up 18 minutes                           swss
da051c0c0294        docker-lldp-sv2:latest            "/usr/bin/supervisord"   11 days ago         Up 19 minutes                           lldp
41b5475777cb        docker-platform-monitor:latest    "/usr/bin/docker_ini…"   11 days ago         Up 19 minutes                           pmon
db5819f4d921        docker-fpm-frr:latest             "/usr/bin/supervisord"   11 days ago         Up 19 minutes                           bgp
1c4a2d7bd552        docker-database:latest            "/usr/bin/supervisord"   11 days ago         Up 19 minutes                           database
root@vlab-01:/home/admin# warm-reboot 
[ 1234.527667] kexec_core: Starting new kernel
[   36.879878] rc.local[365]: + sonic-cfggen -y /etc/sonic/sonic_version.yml -v build_version
[   38.773558] rc.local[365]: + SONIC_VERSION=master.0-dirty-20190621.231403
[   38.791559] rc.local[365]: + FIRST_BOOT_FILE=/host/image-master.0-dirty-20190621.231403/platform/firsttime
[   38.842898] rc.local[365]: + process_reboot_cause
[   38.851406] rc.local[365]: + REBOOT_CAUSE_DIR=/host/reboot-cause
[   38.861587] rc.local[365]: + REBOOT_CAUSE_FILE=/host/reboot-cause/reboot-cause.txt
[   38.896708] rc.local[365]: + PREVIOUS_REBOOT_CAUSE_FILE=/host/reboot-cause/previous-reboot-cause.txt
[   38.932832] rc.local[365]: + mkdir -p /host/reboot-cause
[   38.943327] rc.local[365]: + [ -f /host/image-master.0-dirty-20190621.231403/platform/firsttime ]
[   38.966196] rc.local[365]: + [ -f /host/reboot-cause/reboot-cause.txt ]
[   38.988490] rc.local[365]: + mv -f /host/reboot-cause/reboot-cause.txt /host/reboot-cause/previous-reboot-cause.txt
[   39.014091] rc.local[365]: + cat /host/reboot-cause/previous-reboot-cause.txt
[   39.033117] rc.local[365]: + logger Previous reboot cause: User issued 'warm-reboot' command [User: admin, Time: Sat Jun 22 21:04:39 UTC 2019]
[   39.049265] rc.local[365]: + echo Unexpected reboot
[   39.057687] rc.local[365]: + [ ! -e /host/machine.conf ]
[   39.066648] rc.local[365]: + . /host/machine.conf
[   39.074866] rc.local[365]: + onie_arch=x86_64
[   39.083245] rc.local[365]: + onie_bin=
[   39.090604] rc.local[365]: + onie_boot_reason=install
[   39.098730] rc.local[365]: + onie_build_date=2018-11-17T04:18+00:00
[   39.107300] rc.local[365]: + onie_build_machine=kvm_x86_64
[   39.116454] rc.local[365]: + onie_build_platform=x86_64-kvm_x86_64-r0
[   39.125187] rc.local[365]: + onie_config_version=1
[   39.133463] rc.local[365]: + onie_dev=/dev/vda2
[   39.141415] rc.local[365]: + onie_disco_boot_reason=install
[   39.150311] rc.local[365]: + onie_disco_dns=10.0.2.3
[   39.158526] rc.local[365]: + onie_disco_interface=eth0
[   39.166758] rc.local[365]: + onie_disco_ip=10.0.2.15
[   39.175691] rc.local[365]: + onie_disco_lease=86400
[   39.184150] rc.local[365]: + onie_disco_mask=24
[   39.192217] rc.local[365]: + onie_disco_opt53=05
[   39.200484] rc.local[365]: + onie_disco_router=10.0.2.2
[   39.209704] rc.local[365]: + onie_disco_serverid=10.0.2.2
[   39.219335] rc.local[365]: + onie_disco_siaddr=10.0.2.2
[   39.228582] rc.local[365]: + onie_disco_subnet=255.255.255.0
[   39.236744] rc.local[365]: + onie_exec_url=file://dev/vdb/onie-installer.bin
[   39.246438] rc.local[365]: + onie_firmware=auto
[   39.255006] rc.local[365]: + onie_grub_image_name=shimx64.efi
[   39.266301] rc.local[365]: + onie_initrd_tmp=/
[   39.276675] rc.local[365]: + onie_installer=/var/tmp/installer
[   39.286794] rc.local[365]: + onie_kernel_version=4.9.95
[   39.297736] rc.local[365]: + onie_local_parts=
[   39.307531] rc.local[365]: + onie_machine=kvm_x86_64
[   39.316122] rc.local[365]: + onie_machine_rev=0
[   39.324554] rc.local[365]: + onie_neighs=
[   39.331996] rc.local[365]: + onie_partition_type=gpt
[   39.340645] rc.local[365]: + onie_platform=x86_64-kvm_x86_64-r0
[   39.348785] rc.local[365]: + onie_root_dir=/mnt/onie-boot/onie
[   39.356993] rc.local[365]: + onie_secure_boot=yes
[   39.365625] rc.local[365]: + onie_skip_ethmgmt_macs=yes
[   39.374562] rc.local[365]: + onie_switch_asic=qemu
[   39.383080] rc.local[365]: + onie_uefi_arch=x64
[   39.391224] rc.local[365]: + onie_uefi_boot_loader=shimx64.efi
[   39.399717] rc.local[365]: + onie_vendor_id=42623
[   39.408145] rc.local[365]: + onie_version=master-201811170418
[   39.416456] rc.local[365]: + program_console_speed
[   39.428255] rc.local[365]: + grep -Eo console=ttyS[0-9]+,[0-9]+
[   39.446583] rc.local[365]: + cut -d , -f2
[   39.465872] rc.local[365]: + cat /proc/cmdline
[   39.474720] rc.local[365]: + speed=115200
[   39.482419] rc.local[365]: + [ -z 115200 ]
[   39.489895] rc.local[365]: + CONSOLE_SPEED=115200
[   39.498298] rc.local[365]: + sed -i s|\-\-keep\-baud .* %I| 115200 %I|g /lib/systemd/system/serial-getty@.service
[   39.511867] rc.local[365]: + systemctl daemon-reload
[   39.522131] rc.local[365]: + [ -f /host/image-master.0-dirty-20190621.231403/platform/firsttime ]
[   39.535044] rc.local[365]: + exit 0

Debian GNU/Linux 9 vlab-01 ttyS0

vlab-01 login: admin
Password: 
Last login: Sat Jun 22 21:02:50 UTC 2019 from 10.250.0.1 on pts/0
Linux vlab-01 4.9.0-9-2-amd64 #1 SMP Debian 4.9.168-1+deb9u3 (2015-12-19) x86_64
You are on
  ____   ___  _   _ _  ____
 / ___| / _ \| \ | (_)/ ___|
 \___ \| | | |  \| | | |
  ___) | |_| | |\  | | |___
 |____/ \___/|_| \_|_|\____|

-- Software for Open Networking in the Cloud --

Unauthorized access and/or use are prohibited.
All access and/or use are subject to monitoring.

Help:    http://azure.github.io/SONiC/

admin@vlab-01:~$ 
admin@vlab-01:~$ redis-cli --version
redis-cli 5.0.3 (git:f4d07dc0-dirty)
admin@vlab-01:~$ docker ps
CONTAINER ID        IMAGE                            COMMAND                  CREATED             STATUS              PORTS               NAMES
334d8a1ce0ef        docker-fpm-frr:latest            "/usr/bin/supervisord"   34 minutes ago      Up 14 seconds                           bgp
8674e589d4c1        docker-platform-monitor:latest   "/usr/bin/docker_ini…"   34 minutes ago      Up 16 seconds                           pmon
899e7f34b639        docker-lldp-sv2:latest           "/usr/bin/supervisord"   34 minutes ago      Up 15 seconds                           lldp
d8d419e050e6        docker-database:latest           "/usr/bin/supervisord"   34 minutes ago      Up 25 seconds                           database
admin@vlab-01:~$ show warm_restart config
name    enable    timer_name    timer_duration
------  --------  ------------  ----------------
system  true      NULL          NULL
admin@vlab-01:~$ docker ps
CONTAINER ID        IMAGE                            COMMAND                  CREATED             STATUS              PORTS               NAMES
5f38ac6776e2        docker-syncd-vs:latest           "/usr/bin/supervisord"   38 minutes ago      Up 4 minutes                            syncd
15fe114b6e9c        docker-snmp-sv2:latest           "/usr/bin/supervisord"   38 minutes ago      Up About a minute                       snmp
334d8a1ce0ef        docker-fpm-frr:latest            "/usr/bin/supervisord"   39 minutes ago      Up 5 minutes                            bgp
8674e589d4c1        docker-platform-monitor:latest   "/usr/bin/docker_ini…"   39 minutes ago      Up 5 minutes                            pmon
899e7f34b639        docker-lldp-sv2:latest           "/usr/bin/supervisord"   39 minutes ago      Up 5 minutes                            lldp
d8d419e050e6        docker-database:latest           "/usr/bin/supervisord"   39 minutes ago      Up 5 minutes                            database
admin@vlab-01:~$ 
admin@vlab-01:~$ show warm_restart config
name    enable    timer_name    timer_duration
------  --------  ------------  ----------------
system  true      NULL          NULL
admin@vlab-01:~$ show warm_restart state
name             restore_count  state
-------------  ---------------  ----------------------
teamsyncd                    3  initialized
orchagent                    3  restored
teammgrd                     3
neighsyncd                   3  restored
syncd                        1
bgp                          1  reconciled
vlanmgrd                     3
warm-shutdown                0  pre-shutdown-succeeded
portsyncd                    3
admin@vlab-01:~$ 

@lguohan
Copy link
Collaborator

lguohan commented Jun 23, 2019

retest vs please

@pavel-shirshov
Copy link
Contributor

@lguohan

Redis dump file is 100% backwards compatible. An older dump file format will always work with a newer version of Redis.

https://github.com/sripathikrishnan/redis-rdb-tools/blob/master/docs/RDB_Version_History.textile

@lguohan
Copy link
Collaborator

lguohan commented Jun 26, 2019

@pavel-shirshov , we are not using redis rdb tools.

@paulnice
Copy link

paulnice commented Jun 26, 2019

@lguohan I understand that. The url I provided has answers on your questions:

does rdb format changed between 3.2.4 to 5.0.3.

Yes. It's changed.
Format version 9 for Redis 5.0
Format version 7 for Redis 3.2

can 5.0.3 reads the redis dump from 3.2.4.

Yes it can. Redis makes only backword compatible changes

@lguohan
Copy link
Collaborator

lguohan commented Jun 26, 2019

@jipanyang , can you save the redis database in a db file and then load the db file in 5.0.3 and see if the db has difference using redis-dump.

@lguohan
Copy link
Collaborator

lguohan commented Jun 26, 2019

retest vs please

@jipanyang
Copy link
Collaborator Author

@lguohan

<1> save DB data with redis 3.2.4

admin@vlab-01:~/backup$ redis-cli --version
redis-cli 3.2.4 (git:231d309b-dirty)
admin@vlab-01:~/backup$ config warm_restart enable system
Root privileges are required for this operation
admin@vlab-01:~/backup$ docker exec -i swss /usr/bin/orchagent_restart_check -w 2000  -s
RESTARTCHECK succeeded
admin@vlab-01:~/backup$ sudo su
root@vlab-01:/home/admin/backup# config warm_restart enable system
root@vlab-01:/home/admin/backup# docker exec -i bgp pkill -9 zebra
root@vlab-01:/home/admin/backup# docker exec -i bgp pkill -9 bgpd
root@vlab-01:/home/admin/backup# docker exec -i teamd pkill -USR1 teamd
root@vlab-01:/home/admin/backup# docker kill teamd
teamd
root@vlab-01:/home/admin/backup# 
root@vlab-01:/home/admin/backup# /usr/bin/docker exec -i syncd /usr/bin/syncd_request_shutdown --pre
requested PRE-SHUTDOWN shutdown
root@vlab-01:/home/admin/backup# for i in {0..7}; do 
>      redis-dump -d $i > DB$i.json 
> done
root@vlab-01:/home/admin/backup# ls -l
total 5668
-rw-r--r-- 1 root root 2736644 Jun 27 13:34 DB0.json
-rw-r--r-- 1 root root 1946899 Jun 27 13:34 DB1.json
-rw-r--r-- 1 root root  690778 Jun 27 13:34 DB2.json
-rw-r--r-- 1 root root    5823 Jun 27 13:34 DB3.json
-rw-r--r-- 1 root root   48487 Jun 27 13:34 DB4.json
-rw-r--r-- 1 root root  345871 Jun 27 13:34 DB5.json
-rw-r--r-- 1 root root   10947 Jun 27 13:34 DB6.json
-rw-r--r-- 1 root root       2 Jun 27 13:34 DB7.json
root@vlab-01:/home/admin/backup# redis-cli save
docker cp database:/var/lib/redis/dump.rdb  ./OK
root@vlab-01:/home/admin/backup# ls -l
total 5668
-rw-r--r-- 1 root root 2736644 Jun 27 13:34 DB0.json
-rw-r--r-- 1 root root 1946899 Jun 27 13:34 DB1.json
-rw-r--r-- 1 root root  690778 Jun 27 13:34 DB2.json
-rw-r--r-- 1 root root    5823 Jun 27 13:34 DB3.json
-rw-r--r-- 1 root root   48487 Jun 27 13:34 DB4.json
-rw-r--r-- 1 root root  345871 Jun 27 13:34 DB5.json
-rw-r--r-- 1 root root   10947 Jun 27 13:34 DB6.json
-rw-r--r-- 1 root root       2 Jun 27 13:34 DB7.json
root@vlab-01:/home/admin/backup# docker cp database:/var/lib/redis/dump.rdb  ./
root@vlab-01:/home/admin/backup# ls -l
total 9664
-rw-r--r-- 1 root root 2736644 Jun 27 13:34 DB0.json
-rw-r--r-- 1 root root 1946899 Jun 27 13:34 DB1.json
-rw-r--r-- 1 root root  690778 Jun 27 13:34 DB2.json
-rw-r--r-- 1 root root    5823 Jun 27 13:34 DB3.json
-rw-r--r-- 1 root root   48487 Jun 27 13:34 DB4.json
-rw-r--r-- 1 root root  345871 Jun 27 13:34 DB5.json
-rw-r--r-- 1 root root   10947 Jun 27 13:34 DB6.json
-rw-r--r-- 1 root root       2 Jun 27 13:34 DB7.json
-rw-r--r-- 1 root root 4089671 Jun 27 13:34 dump.rdb
root@vlab-01:/home/admin/backup# docker ps
CONTAINER ID        IMAGE                             COMMAND                  CREATED             STATUS              PORTS               NAMES
ab1cde0d5201        docker-syncd-vs:latest            "/usr/bin/supervisord"   2 weeks ago         Up 31 minutes                           syncd
3f9794863530        docker-sonic-telemetry:latest     "/usr/bin/supervisord"   2 weeks ago         Up 31 minutes                           telemetry
d03c9c52e54e        docker-snmp-sv2:latest            "/usr/bin/supervisord"   2 weeks ago         Up 31 minutes                           snmp
889a2b7f07e4        docker-router-advertiser:latest   "/usr/bin/supervisord"   2 weeks ago         Up 31 minutes                           radv
12ca8ca5d903        docker-orchagent:latest           "/usr/bin/supervisord"   2 weeks ago         Up 31 minutes                           swss
da051c0c0294        docker-lldp-sv2:latest            "/usr/bin/supervisord"   2 weeks ago         Up 32 minutes                           lldp
41b5475777cb        docker-platform-monitor:latest    "/usr/bin/docker_ini…"   2 weeks ago         Up 32 minutes                           pmon
db5819f4d921        docker-fpm-frr:latest             "/usr/bin/supervisord"   2 weeks ago         Up 32 minutes                           bgp
1c4a2d7bd552        docker-database:latest            "/usr/bin/supervisord"   2 weeks ago         Up 32 minutes                           database
root@vlab-01:/home/admin/backup# 
root@vlab-01:/home/admin/backup# 
root@vlab-01:/home/admin/backup# 

<2> copy data out

jipan@jipan:~/backup$ scp -r admin@10.250.0.101:/home/admin/backup ./
DB4.json                                                                                                                                                                  100%   47KB   3.2MB/s   00:00    
DB1.json                                                                                                                                                                  100% 1901KB   6.5MB/s   00:00    
DB2.json                                                                                                                                                                  100%  675KB  34.8MB/s   00:00    
DB6.json                                                                                                                                                                  100%   11KB   4.2MB/s   00:00    
DB7.json                                                                                                                                                                  100%    2     1.0KB/s   00:00    
DB5.json                                                                                                                                                                  100%  338KB  34.9MB/s   00:00    
DB3.json                                                                                                                                                                  100% 5823   657.0KB/s   00:00    
DB0.json                                                                                                                                                                  100% 2673KB  17.9MB/s   00:00    
dump.rdb                                 

<3> reboot into new sonic with redis 5.0.3

root@vlab-01:/home/admin/backup# reboot
requested COLD shutdown
.......

admin@vlab-01:~$ 
admin@vlab-01:~$ redis-cli --versoin
Unrecognized option or bad number of args for: '--versoin'
admin@vlab-01:~$ redis-cli --version
redis-cli 5.0.3 (git:f4d07dc0-dirty)
admin@vlab-01:~$ 
admin@vlab-01:~$ sudo su
root@vlab-01:/home/admin# docker ps
CONTAINER ID        IMAGE                             COMMAND                  CREATED             STATUS              PORTS               NAMES
07edb31c2e29        cd09d29975d5                      "/usr/bin/supervisord"   3 days ago          Up About a minute                       teamd
e96db20c351a        docker-fpm-frr:latest             "/usr/bin/supervisord"   3 days ago          Up 2 minutes                            bgp
5f38ac6776e2        docker-syncd-vs:latest            "/usr/bin/supervisord"   4 days ago          Up About a minute                       syncd
25e96b649ee1        docker-dhcp-relay:latest          "/usr/bin/docker_ini…"   4 days ago          Up 55 seconds                           dhcp_relay
15fe114b6e9c        docker-snmp-sv2:latest            "/usr/bin/supervisord"   4 days ago          Up About a minute                       snmp
21caf4cb0468        docker-router-advertiser:latest   "/usr/bin/supervisord"   4 days ago          Up About a minute                       radv
dc801e18e9ed        docker-sonic-telemetry:latest     "/usr/bin/supervisord"   4 days ago          Up 2 minutes                            telemetry
7322f76f110d        docker-orchagent:latest           "/usr/bin/supervisord"   4 days ago          Up About a minute                       swss
8674e589d4c1        docker-platform-monitor:latest    "/usr/bin/docker_ini…"   4 days ago          Up 2 minutes                            pmon
899e7f34b639        docker-lldp-sv2:latest            "/usr/bin/supervisord"   4 days ago          Up 2 minutes                            lldp
d8d419e050e6        docker-database:latest            "/usr/bin/supervisord"   4 days ago          Up 2 minutes                            database
root@vlab-01:/home/admin# systemctl stop docker
Job for docker.service canceled.
root@vlab-01:/home/admin# docker ps
CONTAINER ID        IMAGE                             COMMAND                  CREATED             STATUS              PORTS               NAMES
07edb31c2e29        cd09d29975d5                      "/usr/bin/supervisord"   3 days ago          Up About a minute                       teamd
e96db20c351a        docker-fpm-frr:latest             "/usr/bin/supervisord"   3 days ago          Up 2 minutes                            bgp
5f38ac6776e2        docker-syncd-vs:latest            "/usr/bin/supervisord"   4 days ago          Up About a minute                       syncd
25e96b649ee1        docker-dhcp-relay:latest          "/usr/bin/docker_ini…"   4 days ago          Up About a minute                       dhcp_relay
15fe114b6e9c        docker-snmp-sv2:latest            "/usr/bin/supervisord"   4 days ago          Up About a minute                       snmp
21caf4cb0468        docker-router-advertiser:latest   "/usr/bin/supervisord"   4 days ago          Up About a minute                       radv
dc801e18e9ed        docker-sonic-telemetry:latest     "/usr/bin/supervisord"   4 days ago          Up 2 minutes                            telemetry
7322f76f110d        docker-orchagent:latest           "/usr/bin/supervisord"   4 days ago          Up 2 minutes                            swss
8674e589d4c1        docker-platform-monitor:latest    "/usr/bin/docker_ini…"   4 days ago          Up 2 minutes                            pmon
899e7f34b639        docker-lldp-sv2:latest            "/usr/bin/supervisord"   4 days ago          Up 2 minutes                            lldp
d8d419e050e6        docker-database:latest            "/usr/bin/supervisord"   4 days ago          Up 2 minutes                            database
root@vlab-01:/home/admin# systemclt restart docker
bash: systemclt: command not found
root@vlab-01:/home/admin# systemctl restart docker
root@vlab-01:/home/admin# 


<4> copy db data to new image with redis 5.0.3

jipan@jipan:~/backup$ scp -r backup  admin@10.250.0.101:/home/admin/
DB4.json                                                                                                                                                                  100%   47KB   1.0MB/s   00:00    
DB2.json                                                                                                                                                                  100%  675KB   2.7MB/s   00:00    
DB0.json                                                                                                                                                                  100% 2673KB   5.5MB/s   00:00    
DB1.json                                                                                                                                                                  100% 1901KB   6.4MB/s   00:00    
DB3.json                                                                                                                                                                  100% 5823   410.2KB/s   00:00    
DB5.json                                                                                                                                                                  100%  338KB   6.6MB/s   00:00    
DB7.json                                                                                                                                                                  100%    2     0.3KB/s   00:00    
DB6.json                                                                                                                                                                  100%   11KB 639.0KB/s   00:00    
dump.rdb                                                                                                                                                                  100% 3994KB   6.7MB/s   00:00    
jipan@jipan:~/backup$ 

<5> stop redis db instance

root@vlab-01:/home/admin# systemctl stop database
root@vlab-01:/home/admin# docker ps
CONTAINER ID        IMAGE                    COMMAND                  CREATED             STATUS              PORTS               NAMES
5f38ac6776e2        docker-syncd-vs:latest   "/usr/bin/supervisord"   4 days ago          Up 21 seconds                           syncd
root@vlab-01:/home/admin# systemctl stop syncd
root@vlab-01:/home/admin# docker ps
CONTAINER ID        IMAGE                    COMMAND                  CREATED             STATUS              PORTS               NAMES
5f38ac6776e2        docker-syncd-vs:latest   "/usr/bin/supervisord"   4 days ago          Up 30 seconds                           syncd
root@vlab-01:/home/admin# docker kill syncd
syncd
root@vlab-01:/home/admin# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
root@vlab-01:/home/admin# 

<6> Let redis 5.0.3 pick up the back db data

root@vlab-01:/home/admin# docker cp backup/dump.rdb database:/var/lib/redis/dump.rdb
root@vlab-01:/home/admin# docker start  database
database
root@vlab-01:/home/admin# docker ps
CONTAINER ID        IMAGE                    COMMAND                  CREATED             STATUS              PORTS               NAMES
d8d419e050e6        docker-database:latest   "/usr/bin/supervisord"   4 days ago          Up 3 seconds                            database

<7> dump json from redis 5.0.3

root@vlab-01:/home/admin# mkdir new
root@vlab-01:/home/admin# cd new
root@vlab-01:/home/admin/new# for i in {0..7}; do 
>      redis-dump -d $i > DB$i.json 
> done
root@vlab-01:/home/admin/new# ls -l
total 5668
-rw-r--r-- 1 root root 2736644 Jun 27 13:45 DB0.json
-rw-r--r-- 1 root root 1946899 Jun 27 13:45 DB1.json
-rw-r--r-- 1 root root  690778 Jun 27 13:45 DB2.json
-rw-r--r-- 1 root root    5823 Jun 27 13:45 DB3.json
-rw-r--r-- 1 root root   48487 Jun 27 13:45 DB4.json
-rw-r--r-- 1 root root  345871 Jun 27 13:45 DB5.json
-rw-r--r-- 1 root root   10947 Jun 27 13:45 DB6.json
-rw-r--r-- 1 root root       2 Jun 27 13:45 DB7.json

<8> copy new json out and compare them with json generated with redis 3.2.4

jipan@jipan:~/backup$ scp -r admin@10.250.0.101:/home/admin/new ./
DB4.json                                                                                                                                                                  100%   47KB   3.0MB/s   00:00    
DB1.json                                                                                                                                                                  100% 1901KB  15.9MB/s   00:00    
DB2.json                                                                                                                                                                  100%  675KB  37.1MB/s   00:00    
DB6.json                                                                                                                                                                  100%   11KB   5.0MB/s   00:00    
DB7.json                                                                                                                                                                  100%    2     1.2KB/s   00:00    
DB5.json                                                                                                                                                                  100%  338KB  37.4MB/s   00:00    
DB3.json                                                                                                                                                                  100% 5823     2.8MB/s   00:00    
DB0.json                                                        
jipan@jipan:~/backup$ for i in {0..7}; do 
> jq --argfile a backup/DB0.json  --argfile b new/DB0.json -n '($a | (.. | arrays) |= sort) as $a | ($b | (.. | arrays) |= sort) as $b | $a == $b'
> done
true
true
true
true
true
true
true
true

@jipanyang
Copy link
Collaborator Author

Forgot to update the DB number in previous test (fixed to DB0.json, now DB$i.json).

jipan@jipan:~/backup$ ls -l
total 8
drwxr-xr-x 2 jipan jipan 4096 Jun 27 13:36 backup
drwxr-xr-x 2 jipan jipan 4096 Jun 27 13:51 new
jipan@jipan:~/backup$ for i in {0..7}; do  jq --argfile a backup/DB$i.json  --argfile b new/DB$i.json -n '($a | (.. | arrays) |= sort) as $a | ($b | (.. | arrays) |= sort) as $b | $a == $b'; done
true
true
true
true
true
true
true
true
jipan@jipan:~/backup$ 

@lguohan
Copy link
Collaborator

lguohan commented Jul 2, 2019

retest vsimage please

@kcudnik
Copy link
Contributor

kcudnik commented Jul 3, 2019

ok so comparison logic issue was caused by redis version change than?

@lguohan
Copy link
Collaborator

lguohan commented Jul 3, 2019

no, redis version change is fine. comparison logic issue is something else.

@lguohan lguohan merged commit 9a8202a into sonic-net:master Jul 4, 2019
@kcudnik
Copy link
Contributor

kcudnik commented Jul 4, 2019

So how come is passing now?

mssonicbld added a commit that referenced this pull request May 16, 2024
…lly (#18969)

#### Why I did it
src/sonic-swss
```
* c36333c3 - (HEAD -> master, origin/master, origin/HEAD) New p4orch development changes (#3066) (6 hours ago) [mint570]
* 26a5a1cb - Fix flex counter out-of-order issue by notifying counter operations using SelectableChannel (#3076) (10 hours ago) [Stephen Sun]
* 2f8bd9cf - Add support for ECMP and LAG hash offset (#3138) (28 hours ago) [Kumaresh Perumal]
```
#### How I did it
#### How to verify it
#### Description for the changelog
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.

6 participants