I found that if a dvr_snat-mode l3-agent isn't a master for a certain router, the l3-agent will destroy the metadata-proxy process in the router' namespace. Therefore, when a l3-agent on a compute node is started with dvr_snat mode, the instances on this compute node can't access the metadata proxy service and fails to run command 'curl http://169.254.169.254'. So If dvr_snat-mode l3-agents on all compute nodes don't destroy metadata-proxy processes in the standby router namespace, the instances on compute nodes can fetch metadata.
I found that if a dvr_snat-mode l3-agent isn't a master for a certain router, the l3-agent will destroy the metadata-proxy process in the router' namespace. Therefore, when a l3-agent on a compute node is started with dvr_snat mode, the instances on this compute node can't access the metadata proxy service and fails to run command 'curl http:// 169.254. 169.254'. So If dvr_snat-mode l3-agents on all compute nodes don't destroy metadata-proxy processes in the standby router namespace, the instances on compute nodes can fetch metadata.