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

Fix application of network --mtu kickstart option in Anaconda #3678

Merged
merged 1 commit into from Nov 8, 2021

Conversation

rvykydal
Copy link
Contributor

@rvykydal rvykydal commented Nov 3, 2021

This was broken when application of kickstart network command was moved
to Anaconda.

@rvykydal rvykydal added the master Please, use the `f39` label instead. label Nov 3, 2021
Copy link
Contributor

@VladimirSlavik VladimirSlavik left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thank you!

@@ -498,6 +498,8 @@ def create_connections_from_ksdata(nm_client, network_data, device_name, ifname_
s390cfg = get_s390_settings(device_name)
_update_wired_connection_with_s390_settings(con, s390cfg)

update_connection_ethernet_settings_from_ksdata(con, network_data)
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand why this is at top level of the function here, while above you decide what kind of connection this is, and one of the options seems to be explicitly this same thing - ethernet:

    # type "802-3-ethernet"
    if is_ethernet_device(nm_client, device_name): 
        (...ethernet stuff...)

    update_connection_ethernet_settings_from_ksdata(con, network_data)

Maybe I'm mistaking them for each another because there isn't any indication how much ethernet-ish the new function is, except for its name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It applies also to virtual devices, eg bond, but as NM "802-3-ethernet" setting (it would be applied by NM to ports/slaves for virtual device connections). But your point is very good as for infiniband devices it is "infiniband" setting.
I think I should update the PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

It might be just a question of naming things :)

@rvykydal rvykydal marked this pull request as draft November 3, 2021 13:59
@rvykydal rvykydal marked this pull request as ready for review November 3, 2021 15:37
Copy link
Contributor

@VladimirSlavik VladimirSlavik left a comment

Choose a reason for hiding this comment

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

LGMT, no confusion now!

Copy link
Contributor

@poncovka poncovka left a comment

Choose a reason for hiding this comment

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

Looks good to me.

if not s_wired:
s_wired = NM.SettingWired.new()
connection.add_setting(s_wired)
s_wired.props.mtu = int(network_data.mtu)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can the conversion fail? How likely is it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you,
I hoped that such value would not make it so far and neglected this possibility, but actually it would.
Unit tests would make me think about it more:)
I'll update the PR and add unit test for the new function.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok. The value should be ideally validated and converted by pykickstart if that's possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unit test added, int conversion checked.

@rvykydal rvykydal force-pushed the apply-network-mtu-in-stage2 branch 3 times, most recently from e1e24f5 to 46b74cb Compare November 4, 2021 13:21
This was broken when application of kickstart network command was moved
to Anaconda.
@rvykydal
Copy link
Contributor Author

rvykydal commented Nov 4, 2021

/kickstart-test --testtype smoke

1 similar comment
@rvykydal
Copy link
Contributor Author

rvykydal commented Nov 5, 2021

/kickstart-test --testtype smoke

Copy link
Contributor

@poncovka poncovka left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks!

Copy link
Contributor

@M4rtinK M4rtinK left a comment

Choose a reason for hiding this comment

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

Looks good to me as well, thanks! :)

@rvykydal rvykydal merged commit 359b5f3 into rhinstaller:master Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
master Please, use the `f39` label instead.
4 participants