Agent still fetching config from old ip address after server relocation

We had to relocate our exiting rancher infrastructure from subnet 192.168.1.0/24 to 192.168.5.0/24

I updated all config settings that I can and re-registered the agents. They appear in rancher interface with their new ip addresses, however they are not able to start existing containers.

All containers previously running and also newly launched containers are stuck in “Networking” state

Only containers with NET_ADMIN flag are able to run after relocation.

I upgraded rancher to latest version and rerun the registration command multiple times with no success.

If I tail Network Agent logs the only things I can see is this log message repeating over and over

The system is going down NOW! Sent SIGTERM to all processes Sent SIGKILL to all processes Requesting system reboot INFO: Downloading agent http://192.168.1.205:8080/v1/configcontent/configscripts The system is going down NOW! Sent SIGTERM to all processes Sent SIGKILL to all processes Requesting system reboot INFO: Downloading agent http://192.168.1.205:8080/v1/configcontent/configscripts

where 192.168.1.205 is the old ip address of rancher server.

How can I fix this?

Thanks.