Hide Forgot
Description of problem: The command in the setDefaultGatway function in waagent is incorrect. Version-Release number of selected component (if applicable): WALinuxAgent-2.0.16-1.el6 How reproducible: Always Steps to Reproduce: 1. Prepare a VM on Azure and login. 2. Enable the verbose log. Enable the error log of the "setDefaultGateway" function in class AbstractDistro # vi /etc/waagent.conf, set Logs.Verbose=y # vi /usr/sbin/waagent, find the "setDefaultGatway" function in class AbstractDistro, set "chk_err=True" 3. service waagent restart 4. Check the /var/log/waagent.log Actual results: The set default gateway command is "/sbin/route add default gw172.19.0.1" which is incorrect, so that it cannot be executed successfully. Messages in /var/log/waagent.log: 2016/04/08 02:52:39 Set default gateway: 172.19.0.1 2016/04/08 02:52:39 /sbin/route add default gw172.19.0.1 2016/04/08 02:52:39 ERROR:CalledProcessError. Error Code is 7 2016/04/08 02:52:39 ERROR:CalledProcessError. Command string was /sbin/route add default gw172.19.0.1 2016/04/08 02:52:39 ERROR:CalledProcessError. Command result was SIOCADDRT: No such device Expected results: The set default gateway command is correct. Additional info: The root cause is there's no space between "gw" and gateway address in the setDefaultGateway function in class AbstractDistro.
Fixed in WALinuxAgent-2.1.5. Verify and close it. *** This bug has been marked as a duplicate of bug 1360493 ***