Bug 245426 - net/cloud-init 20.1 breaks EC2 instance network
Summary: net/cloud-init 20.1 breaks EC2 instance network
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-07 16:08 UTC by jeremiah.snapp
Modified: 2020-05-01 23:31 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (andrey)


Attachments
Failed cloud-init output (5.02 KB, text/plain)
2020-04-07 16:08 UTC, jeremiah.snapp
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description jeremiah.snapp 2020-04-07 16:08:34 UTC
Created attachment 213159 [details]
Failed cloud-init output

Yesterday I had to start installing the py37-cloud-init package in my FreeBSD 11 & 12 amd64 Amazon EC2 instances because py27-cloud-init is no longer available.

Other than changing the default_user in /usr/local/etc/cloud/cloud.cfg I am using the default cloud-init config.

The py37-cloud-init package bumps cloud-init to version 20.1 which seems to have a bug in cloud-init's Local stage because when one of my EC2 instances boots its network connection breaks after running the "service routing restart" command at this line.

https://github.com/canonical/cloud-init/blob/20.1/cloudinit/net/freebsd.py#L167

Reference: cloud-init's Local stage
https://cloudinit.readthedocs.io/en/latest/topics/boot.html#local

I attached the last few lines of the cloud-init output to this issue.

While debugging the issue I was able to install the net/cloud-init port and add "GH_TAGNAME= e30599c103ff926e8cbf38f36d1ba071918fc386" to its Makefile so it would use the latest commit from Canonical's cloud-init repo. This built successfully and worked without breaking the network connection.

I prefer to use the package instead of the port so I'm currently working around the broken network issue by disabling cloud-init's network configuration step which doesn't seem necessary for my needs. I'm disabling that step by putting the following config into /usr/local/etc/cloud/cloud.cfg.d/disable-cloud-init-network-configuration.cfg.

network:
  config: disabled

Reference: disabling cloud-init network configuration
https://cloudinit.readthedocs.io/en/latest/topics/network-config.html#disabling-network-configuration

I'm not familiar enough with FreeBSD's port/package maintenance to know what to suggest for a fix.
Comment 1 Andrey Fesenko 2020-04-07 21:56:15 UTC
If interesting i'm make -devel version port
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244058

changing default options doesn't seem to be the best idea for me.

Maybe you should temporarily change the variables in your image template.
Comment 2 Andrey Fesenko 2020-04-07 21:59:59 UTC
https://github.com/canonical/cloud-init/releases/tag/ubuntu%2F20.1-10-g71af48df-0ubuntu3

This version fix you guest, if yes i'm will try patch for update
Comment 3 jeremiah.snapp 2020-04-10 05:58:09 UTC
(In reply to Andrey Fesenko from comment #2)

I am sorry, I did not test tag ubuntu/20.1-10-g71af48df-0ubuntu3 so I do not know if it would fix the problem I was having. I only tested the commit  e30599c103ff926e8cbf38f36d1ba071918fc386 from the master branch.
Comment 4 Andrey Fesenko 2020-05-01 23:31:52 UTC
New release ready Bug #246109