-
Notifications
You must be signed in to change notification settings - Fork 34
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
AutoYaST: Support to configure the network during the first stage by default #1059
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86b4f21
to
b3efed2
Compare
This reverts commit cfd95bc.
imobachgs
reviewed
May 21, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few comments (especially for the future). Thanks a lot for taking care of it. I know it was a lot of work and testing. 😉.
imobachgs
approved these changes
May 22, 2020
✔️ Public Jenkins job #150 successfully finished |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is related to yast/yast-autoinstallation#606 where the problem and solutions are already described, so, use it as a base context.
Problem (specific to this module)
There are some issues we should fix in order to write the configuration during the first stage.
1. Udev rules are not refreshed after writting
The InterfacesWriter did not refreshed the written udev rules in case of an autoinstallation as we can see here:
https://github.com/yast/yast-network/pull/1059/files#diff-48ec4731f89821c19dc203da64dc00a5L108
But during the first stage, the imported network configuration can be applied before the proposal, and, at that point, a rename of the interfaces is needed. Thus, we should distinguish between being at the end of the installation (already chrooted) or not.
By now, we have added a parameter which determines whether the writer should also reload the configuration or not.
2. Udev rules are written to the inst-sys and need to be copied to the target system
The
udev_persistent
agent or in generalnon y2 agents
do not permit to change the agent root locationhttps://yastgithubio.readthedocs.io/en/latest/development-tips/#changing-the-root-location-for-agents
in case that we are at the end of the instalation, the files inst-sys files are copied before written. If the config is written later as it is, at least the udev rules should be copied.
3. Linuxrc and imported configuration is somehow merge even when keep_install_network is failse
The autoinst reader uses the current sysconfig as the base one
f4abc6a#diff-6dc211a0076a98b7941e86c01765b477L51
Applying the changes imported over it. But only interfaces are needed in order to update properly the associated udev rules, and also for removing the ones not imported, specially if it is selected to not keep the linuxrc configured network.
4. The NetworkAutoyast checks the profile directly and writes the config based on the presence of the second_stage
If the idea is to remove the networking section during autosetup, the networking section will not be present when calling it at the end of the installation. Thus, the module need to be updated. But also, it checks whether the second stage is present or not in order to write the config.
The config should not be written again in case it was already configured before the proposal and the check of the second stage does not make sense anymore
/761872905d0b162fc5f46329398763f1116d69d8#diff-24ba5c89e21a968be8706d02f59adb43L314
Solution
Tests