Thanks for the thorough bug report. After some conversation in our IRC channel, we agree that your proposed idea of doing a check similar to:
if gateway not in ip_subnet: # add on-link to config
would be a good addition.
I noticed that you already submitted a PR at https://github.com/canonical/cloud-init/pull/1931 , so we'll track development there.
Thanks for the thorough bug report. After some conversation in our IRC channel, we agree that your proposed idea of doing a check similar to:
if gateway not in ip_subnet:
# add on-link to config
would be a good addition.
I noticed that you already submitted a PR at https:/ /github. com/canonical/ cloud-init/ pull/1931 , so we'll track development there.