Hello community, here is the log from the commit of package yast2-network for openSUSE:Factory checked in at 2020-07-30 10:00:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-network (Old) and /work/SRC/openSUSE:Factory/.yast2-network.new.3592 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-network" Thu Jul 30 10:00:14 2020 rev:429 rq:823372 version:4.3.15 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-network/yast2-network.changes 2020-07-21 15:48:33.988160370 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-network.new.3592/yast2-network.changes 2020-07-30 10:00:29.751235380 +0200 @@ -1,0 +2,14 @@ +Wed Jul 29 10:47:01 UTC 2020 - Imobach Gonzalez Sosa <[email protected]> + +- AutoYaST: do not crash when the <host> section is present + (bsc#1174643). +- 4.3.15 + +------------------------------------------------------------------- +Tue Jul 28 08:45:12 UTC 2020 - Knut Anderssen <[email protected]> + +- Do not crash when configuring an IPv6 route through AutoYaST + (bsc#1174353) +- 4.3.14 + +------------------------------------------------------------------- Old: ---- yast2-network-4.3.13.tar.bz2 New: ---- yast2-network-4.3.15.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-network.spec ++++++ --- /var/tmp/diff_new_pack.XPdEIN/_old 2020-07-30 10:00:30.703235949 +0200 +++ /var/tmp/diff_new_pack.XPdEIN/_new 2020-07-30 10:00:30.703235949 +0200 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 4.3.13 +Version: 4.3.15 Release: 0 Summary: YaST2 - Network Configuration License: GPL-2.0-only ++++++ yast2-network-4.3.13.tar.bz2 -> yast2-network-4.3.15.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.13/doc/autoinstallation.md new/yast2-network-4.3.15/doc/autoinstallation.md --- old/yast2-network-4.3.13/doc/autoinstallation.md 2020-07-17 14:19:09.000000000 +0200 +++ new/yast2-network-4.3.15/doc/autoinstallation.md 2020-07-29 13:04:27.000000000 +0200 @@ -1,47 +1,73 @@ -Introduction -============ +# Networking Configuration During Autoinstallation -A regular installation of SUSE Linux Enterprise Server 15 SP2 is performed in a single stage. The auto-installation process, however, has been divided in two stages. (see https://documentation.suse.com/sles/15-SP1/single-html/SLES-autoyast/#overviewandconcept for further details) +## About This Document -Thus, **before SLE-15-SP3**, the proper configuration of the network according to the given profile was done during the `configuration stage`, more commonly known as the 'second stage' of the auto-installation. +Since SUSE Linux Enterprise 12, the manual installation is performed in a single stage. However, the +autoinstallation process is still divided in two different stages (see +https://documentation.suse.com/sles/15-SP1/single-html/SLES-autoyast/#overviewandconcept for further +details). -There has been some effort trying to move the network configuration logic to the `first stage` but, that is something that was only partially addressed. +Thus, **before SLE-15-SP3**, the proper configuration of the network according to the given profile +was done during the *configuration stage*, more commonly known as the *second stage* of the +autoinstallation. -The idea is, that, **since SLE-15-SP3**, the AutoYaST network configuration, by default, will be done during the `first stage`, and the networking section will be removed completely from the profile in order to not call the lan auto client in the second stage in case of enabled. +**Since SLE-15-SP3**, the AutoYaST network configuration takes place during the *first stage*, removing +the networking section from the profile so it is not processed during the second stage anymore. -> **Note**: An option to explicitly force the configuration of the network during the `second stage` is expected to be added, but it is still pending. +> **Note**: An option to explicitly force the configuration of the network during the `second stage` +> is expected to be added, but it is still pending. -First Stage ------------ +## Network Configuration Overview -The network configuration for the first stage currently defined in the control -file takes part in these clients (**inst_autoinit**, **inst_autosetup** and -**inst_finish**). +There are two different aspects of the network configuration that we should bear in mind when trying +to understand how AutoYaST sets up the network. The first is *which configuration* is going to be used +and the second is *when it gets applied*. -- **inst_autoinit:** Autoinit will call iSCSI or FCOE clients if they are - enabled in Linuxrc and will try to fetch and process the profile. +- Which configuration? + - Keep the configuration from _Linuxrc_ (`keep_install_network=true`). + - Use the configuration specified in the profile. + - Merge both configurations (having a configuration in the profile and `keep_install_network=true`). -- **inst_autosetup:** This client is responsible for importing the networking - section from the profile when it exist, and, in case that the `setup_before_proposal` - or a `semi-automatic` configuration is specified, it will also write the - networking configuration at this point and before the registration takes place. - (**FIXME:** online media registration is done during autoinit). - -- **inst_finish:** At the end it will call **save_network** client which copies - udev rules and ifcfg files from the running system when needed, and which is - also responsible for writing several proposals like virtualization, DNS and - network service as well as writing the configuration according to the profile - when it is not written by **inst_autosetup**. +- When to apply it? + - By default, at the end of the 1st stage (when the installation is done) + - Before the installation/registration takes place (`setup_before_proposal=true`) + +### Involved Clients (1st Stage) +The network configuration for the first stage defined in the control file is performed by clients: -There are two ways to give a profile to _AutoYaST_, with (`autoyast` or with `autoyast2` parameters). The main difference is that `autoyast` leaves the fetching of the profile to YaST, which means that _Linuxrc_ does not need to configure the network, while for `autoyast` _Linuxrc_ fetches the profile and may need to configure the network. +- **inst_autoinit:** It calls iSCSI or FCOE clients if they are enabled in _Linuxrc_ and tries to + fetch and process the profile. + +- **inst_autosetup:** This client is responsible for importing the networking section from the + profile when it exists. If `setup_before_proposal` is set to `true` or a `semi-automatic` + configuration is specified, it also writes the networking configuration at this point and before + the registration takes place (**FIXME:** online media registration takes place during + **inst_autoinit**, is will not work). + +- **save_network:** It is called by the **inst_finish** client and it copies the udev rules and the + ifcfg files from the running system if needed. Moreover, it is responsible for writing several + proposals, like virtualization, DNS and network service. Finally, it takes care of writing the + configuration according to the profile if it was not writting by **inst_autosetup** in advance. + +### Fetching the Profile + +Depending on the argument used to specify which profile _AutoYaST_ should use, the fetching process is different. + +- **autoyast**: YaST fetches the profile, so _Linuxrc_ does not need to set up the network in advance. +- **autoyast2**: _Linuxrc_ is the responsible for fetching the profile so, depending where the + profile is located, it might need to configure the network. + +How the profile is fetched is not the only difference between both options, but the differences are +out of the scope of this document. -Linuxrc configuration (minimal_configuration) ---------------------------------------------- +## Use Cases -When the network is configured through linuxrc, the network configuration is written to the inst-sys and it can be decided whether the configuration should be copied to the target system or not using the `keep_install_network` option. +### Linuxrc configuration (minimal configuration) -### Example: +When the network is set up through _Linuxrc_, the configuration is written to the inst-sys and, +depending on the value of the `keep_install_network` element, it can be copied or not to the target +system. **linuxrc options:** ifcfg=eth0=dhcp autoyast=http://192.1681.122.1/control-files/minimal.xml @@ -62,8 +88,8 @@ </profile> ``` -> **Note:** By default, the linuxrc configuration will be keeped, which means that -omitting the section is the same as defining it with that only option. +> **Note:** By default, the _Linuxrc_ configuration is copied, which means that omitting the +networking section is the same as: ```xml <networking> @@ -73,8 +99,8 @@ **Expected Results:** - With this configuration autosetup won't write anything because there is no networking section, - but as linuxrc network configuration was given, the ifcfg-file exists in the running system. +With this configuration, autosetup does not write anything because there is no networking section, +but as _Linuxrc_ network configuration was given, the ifcfg-file exists in the running system. ```xml # cat /etc/sysconfig/network/ifcfg-eth0 @@ -82,25 +108,23 @@ STARTMODE='auto' ``` -> **Note:** In order to check the configuration written by linuxrc before the autoinstallation has started you can use the pass to linuxrc the start_shell=1 option - - Therefore, when `save_network` is called by `inst_finish` it will copy the udev rules - and the sysconfig network configuration. +> **Note:** In order to check the configuration written by _Linuxrc_ before the autoinstallation has +> started you can use the pass to linuxrc the startshell=1 option - About DNS, as no network section is provided, it will write the configuration proposed by - NetworkAutoconfiguration. +Therefore, when `save_network` is called by `inst_finish` it copies the udev rules and the sysconfig +network configuration. -Setup before proposal ---------------------- +About DNS, as no network section is provided, it just writes the configuration proposed by +[NetworkAutoconfiguration](https://github.com/yast/yast-network/blob/a6114782eb8ab2c4864a43a0bcf8f5ed136df53f/src/lib/network/network_autoconfiguration.rb). - There are cases where the profile is not fetched from the network and the network - configuration is only defined in the profile. - - Specially, when the network configuration is complex with multiple interfaces involved or when the installation is done in a specific network segment but then the system will be moved to another location or network segment with a different configuration than the used during the installation. +### Anticipating the Network Configuration (setup_before_proposal) - One of this special cases could require that the network is configured before the registration happens. That can be done with the `setup_before_proposal` option. +There might be some cases where you would need to apply the configuration described in the profile +to be used during the installation. For instance, think of a complex network configuration that +might be hard to set up using _Linuxrc_. -### Example: +The `setup_before_proposal` element allows to specify that the network must be set up even before +the registration happens. **linuxrc options:** `autoyast=usb:///autoinst.xml` @@ -172,16 +196,19 @@ </host> ``` -AutoYaST explicit configuration -------------------------------- +### Writing the Configuration at the End -However, in most of the cases, the network configuration will just be written at the end of the `first stage` becoming the efective one once the target system is boot. The configuration defined in the profile will be merged with the one defined by linuxrc unless the `keep_install_network` options is false. +However, in most of the cases, the network configuration will just be written at the end of the +*first stage*, becoming efective once the target system boots. The configuration defined in the +profile is merged with the one defined by _Linuxrc_ unless the `keep_install_network` option is +set to `false`. **Example:** **linuxrc options:** `ifcfg=eth0=dhcp autoyast=http://192.1681.122.1/control-files/bonding.xml` ```xml +<?xml version="1.0" encoding="utf-8"?> <networking> <setup_before_proposal config:type="boolean">false</setup_before_proposal> <keep_install_network config:type="boolean">false</keep_install_network> @@ -195,10 +222,10 @@ <bootproto>static</bootproto> <device>bond0</device> <ipaddr>192.168.122.61</ipaddr> - <netmask>255.255.255.0</netmask> - <network>192.168.122.0</network> - <prefixlen>24</prefixlen> - <startmode>auto</startmode> + <netmask>255.255.255.0</netmask> + <network>192.168.122.0</network> + <prefixlen>24</prefixlen> + <startmode>auto</startmode> </interface> <interface> <bootproto>none</bootproto> @@ -211,6 +238,7 @@ <startmode>auto</startmode> </interface> </interfaces> + <net-udev config:type="list"> <rule> <name>eth1</name> @@ -228,12 +256,13 @@ <routes config:type="list"> <route> <destination>default</destination> - <gateway>192.168.122.1</gateway> - <netmask>-</netmask> - <device>bond0</device> + <gateway>192.168.122.1</gateway> + <netmask>-</netmask> + <device>bond0</device> </route> </routes> </routing> + <dns> <hostname>vikingo-test</hostname> <dhcp_hostname config:type="boolean">true</dhcp_hostname> @@ -248,4 +277,3 @@ </dns> </networking> ``` - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.13/package/yast2-network.changes new/yast2-network-4.3.15/package/yast2-network.changes --- old/yast2-network-4.3.13/package/yast2-network.changes 2020-07-17 14:19:09.000000000 +0200 +++ new/yast2-network-4.3.15/package/yast2-network.changes 2020-07-29 13:04:27.000000000 +0200 @@ -1,4 +1,18 @@ ------------------------------------------------------------------- +Wed Jul 29 10:47:01 UTC 2020 - Imobach Gonzalez Sosa <[email protected]> + +- AutoYaST: do not crash when the <host> section is present + (bsc#1174643). +- 4.3.15 + +------------------------------------------------------------------- +Tue Jul 28 08:45:12 UTC 2020 - Knut Anderssen <[email protected]> + +- Do not crash when configuring an IPv6 route through AutoYaST + (bsc#1174353) +- 4.3.14 + +------------------------------------------------------------------- Thu Jul 16 08:45:00 UTC 2020 - Knut Anderssen <[email protected]> - Permit to write networking config changes without touching the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.13/package/yast2-network.spec new/yast2-network-4.3.15/package/yast2-network.spec --- old/yast2-network-4.3.13/package/yast2-network.spec 2020-07-17 14:19:09.000000000 +0200 +++ new/yast2-network-4.3.15/package/yast2-network.spec 2020-07-29 13:04:27.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 4.3.13 +Version: 4.3.15 Release: 0 Summary: YaST2 - Network Configuration License: GPL-2.0-only diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.13/src/lib/network/network_autoyast.rb new/yast2-network-4.3.15/src/lib/network/network_autoyast.rb --- old/yast2-network-4.3.13/src/lib/network/network_autoyast.rb 2020-07-17 14:19:09.000000000 +0200 +++ new/yast2-network-4.3.15/src/lib/network/network_autoyast.rb 2020-07-29 13:04:27.000000000 +0200 @@ -138,25 +138,8 @@ # # If the installer is running in 1st stage mode only, then the configuration # is also written - # - # @param [Boolean] write forces instant writing of the configuration - # @return [Boolean] true when configuration was present and loaded from the profile - def configure_hosts(write: false) - log.info("NetworkAutoYast: Hosts configuration") - - if ay_host_section.empty? - Host.Write(gui: false) - - return true - end - - hosts_config = (ay_host_section["hosts"] || {}).map do |host| - # we need to guarantee order of the items here - [host["host_address"] || "", host["names"] || []] - end - hosts_config = hosts_config.to_h.delete_if { |k, v| k.empty? || v.empty? } - - configure_submodule(Host, "hosts" => hosts_config, write: write) + def configure_hosts + Host.Write(gui: false) end # Checks if the profile asks for keeping installation network configuration @@ -172,10 +155,6 @@ # @return [Hash] networking section hash attr_writer :ay_networking_section - # setter for host section. Should be done during import. - # @return [Hash] host section hash - attr_writer :ay_host_section - private # Merges two maps with dns related values. @@ -222,49 +201,5 @@ def ay_networking_section @ay_networking_section || {} end - - # Returns host section of the current AY profile - # - # Note that autoyast transforms the host's subsection - # into: - # { - # hosts => [ - # # first <host_entry> - # { - # "host_address" => <ip>, - # "names" => [list, of, names] - # } - # # second <host_entry> - # ... - # ] - # } - # - # return <Hash> with hosts configuration - def ay_host_section - @ay_host_section || {} - end - - # Configures given yast submodule according AY configuration - # - # It takes data from AY profile transformed into a format expected by the YaST - # sub module's Import method. - # - # It imports the profile, configures the module and writes the configuration. - # Writing the configuration is optional when second stage is available and mandatory - # when running autoyast installation with first stage only. - def configure_submodule(yast_module, ay_config, write: false) - return false if !ay_config - - yast_module.Import(ay_config) - - # Results of imported values semantic check. - # Return true in order to not call the NetworkAutoconfiguration.configure_hosts - return true unless AutoInstall.valid_imported_values - - log.info("Write configuration instantly: #{write}") - yast_module.Write(gui: false) if write - - true - end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.13/src/lib/y2network/autoinst_profile/route_section.rb new/yast2-network-4.3.15/src/lib/y2network/autoinst_profile/route_section.rb --- old/yast2-network-4.3.13/src/lib/y2network/autoinst_profile/route_section.rb 2020-07-17 14:19:09.000000000 +0200 +++ new/yast2-network-4.3.15/src/lib/y2network/autoinst_profile/route_section.rb 2020-07-29 13:04:27.000000000 +0200 @@ -124,7 +124,7 @@ end IPV4_MASK = "255.255.255.255".freeze - IPV6_MASK = "fffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff".freeze + IPV6_MASK = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff".freeze # Returns the netmask # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.13/src/modules/Host.rb new/yast2-network-4.3.15/src/modules/Host.rb --- old/yast2-network-4.3.13/src/modules/Host.rb 2020-07-17 14:19:09.000000000 +0200 +++ new/yast2-network-4.3.15/src/modules/Host.rb 2020-07-29 13:04:27.000000000 +0200 @@ -160,8 +160,6 @@ set_names(ip, names) end - NetworkAutoYast.instance.ay_host_section = settings - true end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.13/test/y2network/autoinst_profile/route_section_test.rb new/yast2-network-4.3.15/test/y2network/autoinst_profile/route_section_test.rb --- old/yast2-network-4.3.13/test/y2network/autoinst_profile/route_section_test.rb 2020-07-17 14:19:09.000000000 +0200 +++ new/yast2-network-4.3.15/test/y2network/autoinst_profile/route_section_test.rb 2020-07-29 13:04:27.000000000 +0200 @@ -30,6 +30,17 @@ to: to, interface: interface, gateway: gateway, options: options ) end + + let(:route_ipv6) do + Y2Network::Route.new( + to: to_ipv6, interface: interface_ipv6, gateway: gateway_ipv6 + ) + end + + let(:to_ipv6) { IPAddr.new("2001:DB8:100::/32") } + let(:interface_ipv6) { double("interface", name: "eth1") } + let(:gateway_ipv6) { IPAddr.new("fe80::216:3eff:fe6d:c04") } + let(:to) { IPAddr.new("192.168.122.0/24") } let(:interface) { double("interface", name: "eth0") } let(:gateway) { IPAddr.new("192.168.122.1") } @@ -66,6 +77,8 @@ it "initializes the gateway value" do section = described_class.new_from_network(route) expect(section.gateway).to eq("192.168.122.1") + section_ipv6 = described_class.new_from_network(route_ipv6) + expect(section_ipv6.gateway).to eq("fe80::216:3eff:fe6d:c04") end context "when the gateway is missing" do @@ -80,6 +93,8 @@ it "initializes the netmask value" do section = described_class.new_from_network(route) expect(section.netmask).to eq("255.255.255.0") + section_ipv6 = described_class.new_from_network(route_ipv6) + expect(section_ipv6.netmask).to eq("ffff:ffff::") end context "when it is the default route" do
