action #102176
closedTest the feature "Enable Installer to Configure VLAN on s390x"
Description
Motivation¶
It is not clear on how to test the feature.
Task¶
- Get familiar with the https://jira.suse.com/browse/SLE-18631
- Clarify if we can have a setup that will allow to test the feature;
Specify in the ticket how to use the setup, or specify impediments that do not allow to do so.
Assign QA ticket in JIRA, assign it to yourself and mark as Done as soon as it will be tested: https://jira.suse.com/browse/SLE-19611
Updated by oorlov about 3 years ago
- Tags deleted (
qe-yast-refinement) - Subject changed from Investigate how to test the feature "Enable Installer to Configure VLAN on s390x" to [16h] Investigate how to test the feature "Enable Installer to Configure VLAN on s390x"
Possible hint: https://github.com/openSUSE/linuxrc/pull/275
Updated by JRivrain about 3 years ago
- Status changed from Workable to In Progress
- Assignee set to JRivrain
Updated by JRivrain about 3 years ago
Assuming the feature is to have a command-line menu before the installer starts on s390, that lets us setup a VLAN device and ID (even though the UI also allows it...).
It depends how deeply we want to test the feature. If we just want to probe that the VLAN dialog appears on s390 by default, that will be piece of cake, as it will be shown by default as soon as it's implemented. Meanwhile, and on other architectures, It can already be tested by adding netsetup=vlanid linemode=1 to the linuxrc command line, in grub.
It is possible to use openvswitch, which is already what we use for multi-machine tests. It is not without risk as we have to bind a bridge device to an actual interface. DON'T MESS UP PRODUCTION SERVERS BEFORE READING THE INSTRUCTIONS CAREFULLY !
EDIT: this setup does not work but some of it could still be useful.¶
Simple way, if you have a machine accessing internet with eth0 and another dedicated to vlan on eth1 and you're doing a bare-metal install:
$ ovs-vsctl add-br br0
$ ovs-vsctl add-port br0 eth1
$ ovs-vsctl add-port br0 tap0 tag=1
$ ovs-vsctl add-port br0 tap1 tag=1
Then when we install the OS on the VM, we select eth1, vlan 1.
but if we have only one interface and use libvirt (eg on a laptop) the instructions are a bit more tricky. here is what I figured out:
1 - Setup a bridge device¶
(imagine the bridge device as a physical network switch)
ovs-vsctl add-br br0
if we get "database connection failed", we may need the following command first:
/usr/share/openvswitch/scripts/ovs-ctl start
Then:
AFTER THAT POINT THE IP OF WLAN0 IS NO LONGER AVAILABLE (think about it before implementing on production!)
ovs-vsctl add-port br0 wlan0
this is pretty much like plugging wlan0 to a network switch called br0.
2 - Set up an IP :¶
If we want to access the external network, we need to transfer the IP to the bridge:
ip addr flush dev wlan0
ps -ef |grep dhclient
kill -9 (dhclient's PID)
ip link set br0 up
dhclient br0
3 - If we're using QEMU (NOT for libvirt, see 3 bis below if you use it)¶
let's create the device for the VM and add it to vlan 1:
tunctl -t tap0
ip link set tap0 up
ovs-vsctl add-port br0 tap0 tag=1
3 bis - If we're using libvirt¶
Method 1:
This would be the more robust than method 2 way but requires altering the libvirt's virtual network config.
Follow the instructions here: https://blog.scottlowe.org/2012/11/07/using-vlans-with-ovs-and-libvirt/.
Method 2:
Advantage of this method: could probably be used on production without altering the virtual network configuration.
we need to edit the VM NIC's xml as explained here: https://docs.openvswitch.org/en/latest/howto/libvirt/ (they use the name "ovsbr" for the bridge name, in our example we are using br0 instead as "source bridge")
Once we start the VM, we should see a new interface popping up if we type "ip a". We can also see it if we type "ovs-vsctl show". For example if the new interface is vnet3, add it to the vlan 1:
ovs-vsctl set port vnet3 tag=1
5 - Once the installer started¶
Now in the installer if we are on s390, we should see the menu as here, allowing us to set the vlan ID: https://jira.suse.com/secure/attachment/160830/netsetup-vlanid-linemode.png
Set it to "1". If we are simulating this on an x86 laptop, we need to enter "netsetup=vlanid linemode=1" as command-line argument in grub to access it.
Open some terminal.
"ip a" should show an interface called eth0.1 (or so, depending on the interface's name:
3: eth0.1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 52:54:00:6c:6c:b5 brd ff:ff:ff:ff:ff:ff
inet6 fe80::5054:ff:fe6c:6cb5/64 scope link
valid_lft forever preferred_lft forever
and the file /proc/net/vlan/config should show it as well:
LAN Dev name | VLAN ID
Name-Type: VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD
eth0.1 | 1 | eth0
2 - Verify that the vlan actually works
(still WIP: it does not seem to really work,I don't know how to setup the environment to properly mimic a 802.1q vlan: vlan IDs set in Yast do not seem to have any effect).
Repeat the point 3 or 3bis on a different VM.
Then allow communication between the two VMS:
iptables -A FORWARD -i br0 -o br0 -j ACCEPT
For more instructions on how to create a VLAN for with openvswitch see here: https://docs.openvswitch.org/en/latest/howto/vlan/ and here: https://docs.openvswitch.org/en/latest/faq/vlan
Updated by JRivrain about 3 years ago
- Status changed from In Progress to Blocked
I do not really know how to set-up an environment that would reproduce a 802.1q VLAN. I think it would be valuable to test this in "real" context, and would allow to set-up a multi-machine test in openQA, but I just don't have the knowledge to set this up. I asked some questions to a few persons, if I get some answers we could unblock this ticket, or we can just consider that only verifying the the config files are altered as expected is "good enough".
Updated by JERiveraMoya almost 3 years ago
- Subject changed from [16h] Investigate how to test the feature "Enable Installer to Configure VLAN on s390x" to Test the feature "Enable Installer to Configure VLAN on s390x"
- Status changed from Blocked to Feedback
As agreed, this ticket become the real testing of the feature and not just the investigation.
As suggested by @oorlov and according to description in this ticket, please @JRivrain, assign the QA Jira ticket to yourself (maybe you have done that already and it is not visible for the rest, that is fine) and add your findings in the Dev ticket (not the QA one).
Updated by JRivrain almost 3 years ago
- Status changed from Feedback to In Progress
Updated by JRivrain almost 3 years ago
- Status changed from In Progress to Closed
follow-up tickets created
Updated by JERiveraMoya almost 3 years ago
- Status changed from Workable to In Progress
Updated by JRivrain almost 3 years ago
- Status changed from In Progress to Blocked
I still don't see the feature in the product, we should sort this out next week with Yast devs.
Updated by JERiveraMoya over 2 years ago
just saw your comment here, I moved the task in Jira to In-progress, perhaps too fast :)
Yes, let's check together as well.
Updated by JRivrain over 2 years ago
- Status changed from Blocked to Feedback
I marked the task as done but with comments:
"I got confused by the feature request description, as it looks like this feature of having the vlan menu by default is wanted in a context of installing from local repository, which then requires to use install= option which makes the "vlan menu" not to appear.
But, as this vlan menu can be spawned by using netsetup=1, which is pretty straightforward, I don't see any quality problem here. I marked the QA task as done.
"
I validated the feature on SLE-15-SP4-Online-s390x-Snapshot-202203-2 as follows: start a s390 VM with virt-manager, booting from installation DVD. once the menu appear, enter a VLAN ID. Then see that ip a shows a device called eth0.1, and /proc/net/vlan/config shows the VLAN interface.