Fill entry['gateway'] for default IPv6 routes#1041
Conversation
Otherwise this code (https://github.com/canonical/cloud-init/blob/main/cloudinit/netinfo.py#L478) fails with ``` failed run of stage init ------------------------------------------------------------ Traceback (most recent call last): File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 652, in status_wrapper ret = functor(name, args) File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 283, in main_init sys.stderr.write("%s\n" % (netinfo.debug_info())) File "/usr/lib/python3/dist-packages/cloudinit/netinfo.py", line 496, in debug_info route_lines = route_pformat().splitlines() File "/usr/lib/python3/dist-packages/cloudinit/netinfo.py", line 480, in route_pformat r['gateway'], r['iface'], r['flags']]) KeyError: 'gateway' ------------------------------------------------------------ ```
|
CLA signing pull request: #1042 |
|
@andgein , thanks for this. Additionally, can you add a unit test at the end of test_netinfo.py? The last three tests are dealing with Also, just for context, this issue has come up before but never got over the finish line: #746 . Feel free to take any suggestions mentioned there, but personally, I don't think they are necessary because:
|
|
Hello! Thank you for this proposed change to cloud-init. This pull request is now marked as stale as it has not seen any activity in 14 days. If no activity occurs within the next 7 days, this pull request will automatically close. If you are waiting for code review and you are seeing this message, apologies! Please reply, tagging mitechie, and he will ensure that someone takes a look soon. (If the pull request is closed and you would like to continue working on it, please do tag mitechie to reopen it.) |
Fill entry['gateway'] for default IPv6 routes
Otherwise this code (https://github.com/canonical/cloud-init/blob/main/cloudinit/netinfo.py#L478) fails with
Test Steps
cloud-init initChecklist: