Figured it out myself in the end.
Again, a firewall issue. As you can see below where the tun0 interface on creation is connected to the firewall zone of OpenWrt. This has to happen before the routes are created. this can be achieved by adding
route-delay 10
to the client config file of openwrt.
If this parameter is not set, then OpenVPN will try and set the route before the firewall has attached tun0 to the vpn firewall zone and the route add actions will fail.
Problem! Firewall aconfig occurs after attempt to route. Route will fail:
Apr 16 05:08:47 Router8111215 daemon.notice openvpn(custom_config)[6296]: SENT CONTROL [openvpnserver]: 'PUSH_REQUEST' (status=1)
Apr 16 05:08:48 Router8111215 daemon.notice openvpn(custom_config)[6296]: PUSH: Received control message: 'PUSH_REPLY,route-gateway x.y.z.193,redirect-gateway def1,topology subnet,ping 10,ping-restart 60,ifconfig x.y.z.196 255.255.255.0'
Apr 16 05:08:48 Router8111215 daemon.notice openvpn(custom_config)[6296]: OPTIONS IMPORT: timers and/or timeouts modified
Apr 16 05:08:48 Router8111215 daemon.notice openvpn(custom_config)[6296]: OPTIONS IMPORT: --ifconfig/up options modified
Apr 16 05:08:48 Router8111215 daemon.notice openvpn(custom_config)[6296]: OPTIONS IMPORT: route options modified
Apr 16 05:08:48 Router8111215 daemon.notice openvpn(custom_config)[6296]: OPTIONS IMPORT: route-related options modified
Apr 16 05:08:48 Router8111215 daemon.warn openvpn(custom_config)[6296]: WARNING: potential conflict between --remote address x.y.z.173] and --ifconfig address pair [x.y.z.196, 255.255.255.0] -- this is a warning only that is triggered when local/remote addresses exist
Apr 16 05:08:48 Router8111215 daemon.notice openvpn(custom_config)[6296]: TUN/TAP device tun0 opened
Apr 16 05:08:48 Router8111215 daemon.notice openvpn(custom_config)[6296]: TUN/TAP TX queue length set to 100
Apr 16 05:08:48 Router8111215 daemon.notice openvpn(custom_config)[6296]: /sbin/ifconfig tun0 x.y.z.196 netmask 255.255.255.0 mtu 1500 broadcast x.y.z.255
Apr 16 05:08:48 Router8111215 daemon.notice openvpn(custom_config)[6296]: /sbin/route add -net x.y.z.173 netmask 255.255.255.255 gw 192.168.20.1
Apr 16 05:08:48 Router8111215 daemon.notice openvpn(custom_config)[6296]: /sbin/route add -net 0.0.0.0 netmask 128.0.0.0 gw x.y.z.193
Apr 16 05:08:48 Router8111215 daemon.notice openvpn(custom_config)[6296]: /sbin/route add -net 128.0.0.0 netmask 128.0.0.0 gw x.y.z.193
Apr 16 05:08:48 Router8111215 daemon.notice openvpn(custom_config)[6296]: Initialization Sequence Completed
Apr 16 05:08:49 Router8111215 user.notice ifup: Enabling Router Solicitations on vpn (tun0)
Apr 16 05:08:49 Router8111215 user.info firewall: removing vpn (tun0) from zone vpn
Apr 16 05:08:49 Router8111215 user.info firewall: adding vpn (tun0) to zone vpn
After setting "route-delay 10"
Apr 16 04:59:04 Router8111215 daemon.notice openvpn(custom_config)[5835]: SENT CONTROL [openvpnserver]: 'PUSH_REQUEST' (status=1)
Apr 16 04:59:04 Router8111215 daemon.notice openvpn(custom_config)[5835]: PUSH: Received control message: 'PUSH_REPLY,route-gateway x.y.z.193,redirect-gateway def1,topology subnet,ping 10,ping-restart 60,ifconfig x.y.z.196 255.255.255.0'
Apr 16 04:59:04 Router8111215 daemon.notice openvpn(custom_config)[5835]: OPTIONS IMPORT: timers and/or timeouts modified
Apr 16 04:59:04 Router8111215 daemon.notice openvpn(custom_config)[5835]: OPTIONS IMPORT: --ifconfig/up options modified
Apr 16 04:59:04 Router8111215 daemon.notice openvpn(custom_config)[5835]: OPTIONS IMPORT: route options modified
Apr 16 04:59:04 Router8111215 daemon.notice openvpn(custom_config)[5835]: OPTIONS IMPORT: route-related options modified
Apr 16 04:59:04 Router8111215 daemon.warn openvpn(custom_config)[5835]: WARNING: potential conflict between --remote address [x.y.z.173] and --ifconfig address pair [x.y.z.196, 255.255.255.0] -- this is a warning only that is triggered when local/remote addresses exist
Apr 16 04:59:04 Router8111215 daemon.notice openvpn(custom_config)[5835]: TUN/TAP device tun0 opened
Apr 16 04:59:04 Router8111215 daemon.notice openvpn(custom_config)[5835]: TUN/TAP TX queue length set to 100
Apr 16 04:59:04 Router8111215 daemon.notice openvpn(custom_config)[5835]: /sbin/ifconfig tun0 x.y.z.196 netmask 255.255.255.0 mtu 1500 broadcast x.y.z.255
Apr 16 04:59:05 Router8111215 user.notice ifup: Enabling Router Solicitations on vpn (tun0)
Apr 16 04:59:05 Router8111215 user.info firewall: removing vpn (tun0) from zone vpn
Apr 16 04:59:06 Router8111215 user.info firewall: adding vpn (tun0) to zone vpn
Apr 16 04:59:14 Router8111215 daemon.notice openvpn(custom_config)[5835]: /sbin/route add -net x.y.z.173 netmask 255.255.255.255 gw 192.168.20.1
Apr 16 04:59:14 Router8111215 daemon.notice openvpn(custom_config)[5835]: /sbin/route add -net 0.0.0.0 netmask 128.0.0.0 gw x.y.z.193
Apr 16 04:59:14 Router8111215 daemon.notice openvpn(custom_config)[5835]: /sbin/route add -net 128.0.0.0 netmask 128.0.0.0 gw x.y.z.193
Apr 16 04:59:14 Router8111215 daemon.notice openvpn(custom_config)[5835]: Initialization Sequence Completed