Skip to content

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

Merged
TheRealFalcon merged 1 commit into
canonical:mainfrom
goneri:freebsd_bz_256309
Jul 1, 2021
Merged

bsd/net_v1 format: read MTU from interface config#930
TheRealFalcon merged 1 commit into
canonical:mainfrom
goneri:freebsd_bz_256309

Conversation

@goneri
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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

Thanks.

Copy link
Copy Markdown
Contributor

@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.

Comment thread tests/unittests/test_net_freebsd.py Outdated
Comment thread tests/unittests/test_net_freebsd.py Outdated
@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
Copy Markdown
Contributor

@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