Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bsd/net_v1 format: read MTU from interface config #930

Merged
merged 1 commit into from
Jul 1, 2021

Conversation

goneri
Copy link
Contributor

@goneri goneri commented Jun 27, 2021

Proposed Commit Message

bsd/net_v1 format: read MTU from interface config

We read the MTU from the subnet entries. With the v1 format, the MTU can
be set at the root level of the interface entry in the `config` section.

Limitation, we won't set the MTU if the interface use DHCP. This
would require a bit of refactoring.

Also simplify/clarify how we pass the target variable in `cloudinit.net.bsd`.

See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256309
Reported-by: Andrey Fesenko

Additional Context

Test Steps

Checklist:

  • [ x] My code follows the process laid out in the documentation
  • [ x] I have updated or added any unit tests accordingly
  • [ x] I have updated or added any documentation accordingly

@goneri
Copy link
Contributor Author

goneri commented Jun 27, 2021

@f0andrey, can you give this a try?

@goneri goneri force-pushed the freebsd_bz_256309 branch 2 times, most recently from 722672a to 7c879f2 Compare June 27, 2021 02:34
@goneri goneri changed the title freebsd/net_v1 format: read MTU from root freebsd/net_v1 format: read MTU from interface level struct Jun 27, 2021
@goneri goneri changed the title freebsd/net_v1 format: read MTU from interface level struct bsd/net_v1 format: read MTU from interface level struct Jun 27, 2021
@goneri goneri changed the title bsd/net_v1 format: read MTU from interface level struct bsd/net_v1 format: read MTU from interface config Jun 27, 2021
@f-andrey
Copy link

I'm check this patch FreeBSD guest with NoCloud and SmartOS datasources. Work fine.

Thanks.

Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good. I just have some minor testing comments inline.

@goneri goneri force-pushed the freebsd_bz_256309 branch from 7c879f2 to d575182 Compare July 1, 2021 19:40
We read the MTU from the subnet entries. With the v1 format, the MTU can
be set at the root level of the interface entry in the `config` section.

Limitation, we won't set the MTU if the interface use DHCP. This
would require a bit of refactoring.

Also simplify/clarify how we pass the target variable in `cloudinit.net.bsd`.

See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256309
Reported-by: Andrey Fesenko
@goneri goneri force-pushed the freebsd_bz_256309 branch from d575182 to 7117c20 Compare July 1, 2021 20:55
Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@TheRealFalcon TheRealFalcon merged commit db51b65 into canonical:main Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants