platinasystems / go

Other
9 stars 68 forks source link

Modified redisd to notify for eth0 ip change,issue 80 #115

Open atmecs123 opened 6 years ago

atmecs123 commented 6 years ago

Event is generated in netlink.go and it is notified to redisd for eth0 ip change.Old connection is closed.

Before change = siddhant@invader41:~$ netstat -nlp | grep 6379 (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) tcp 0 0 172.17.2.31:6379 0.0.0.0: LISTEN - tcp 0 0 127.0.0.1:6379 0.0.0.0: LISTEN - tcp6 0 0 fe80::5218:4cff:fe:6379 ::: LISTEN - tcp6 0 0 ::1:6379 ::: LISTEN -

After change= siddhant@invader41:~$ netstat -nlp | grep 6379 (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) tcp 0 0 172.17.2.95:6379 0.0.0.0: LISTEN - tcp 0 0 127.0.0.1:6379 0.0.0.0: LISTEN - tcp6 0 0 fe80::5218:4cff:fe:6379 ::: LISTEN - tcp6 0 0 ::1:6379 ::: LISTEN -

Connect through redis-cli from i29 with changed ip. siddhant@invader29:~$ redis-cli -h 172.17.2.95 172.17.2.95:6379>

atmecs123 commented 6 years ago

@fszyang @dlobete Please review the changes for issue 80.