Skip to contentSkip to conversation

Upgrade to Stretch

PATCH In review Wei Liu 5 participants 58 messages Oct 31, 2017 – May 8, 2018 1 message not in the archive

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

v2 cover Upgrade to Stretch

First version of this series can be found at [0].

This version contains workaround for Arndale boards. They are now functional.

A bunch of test cases failed:

1. Rumpkernel tests -- I've sent an email to Antti for advice.
2. Windows tests -- They don't look different from normal flights.
3. memdisk-try-append -- Osstest couldn't find some file. I don't think it is related to the code I modified.
4. guest-localmigrate/x10 for xl-qcow2 test -- Guest kernel bug.
5. nested hvm amd, pvhv2 -- Expected failure.

Example flight:
http://logs.test-lab.xenproject.org/osstest/logs/115404/

The armhf d-i failure is fixed with an additional patch ("Skip bootloader installaion for arm32 on Stretch) on top of the code for 15404, in:

http://logs.test-lab.xenproject.org/osstest/logs/115404/

Cc Julien Grall <[email protected]>

[0] <[email protected]>

Wei Liu (19):
gitignore: ignore vim swap file
ts-xen-build-prep: only install w3c-dtd-xhtml for suites <Stretch
ts-xen-build-prep: install packages for suites >jessie
ts-xen-install: install some packages on stretch Debian.pm: use sysvinit-core instead of systemd
ts-leak-check: suppress systemd-shim, which leaks in stretch
ts-host-install: don't use the new nic naming scheme
ts-guests-nbd-mirror: use target_{get,put}file_root to transfter cfg
ts-debian-fixup: merge origin extra= to our own
ts-debian-fixup: use correct resume device
ts-debian-hvm-install: disable new nic naming scheme
ts-xen-build-prep: install e2fslibs-dev
TestSupport: add dpkg option when installing packages
ts-guests-nbd-mirror: make it work with stretch
Add clk_ignore_unused for stretch for arm hosts
Set mac address in interfaces(5) if force-mac-address is set Skip bootloader installation for arm32 in Stretch
make-flight: don't test pvgrub for Xen XXX
Switch to Debian Stretch

 .gitignore             |  1 +
 Osstest.pm             |  2 +-
 Osstest/Debian.pm      | 19 ++++++++++++++++--
 Osstest/TestSupport.pm |  3 ++-
 make-flight            | 17 +++++++++++++++-
 production-config      |  2 ++
 ts-debian-fixup        | 14 ++++++++++++-
 ts-debian-hvm-install  | 13 ++++++++++++
 ts-guests-nbd-mirror   | 54 ++++++++++++++++++++++++++++++++++++++++++++------
 ts-host-install        |  4 ++++
 ts-leak-check          |  1 +
 ts-xen-build-prep      | 15 +++++++++++++-
 ts-xen-install         |  3 +++
 13 files changed, 135 insertions(+), 13 deletions(-)
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
author
#1 lore raw

PATCH v2 1/19 gitignore: ignore vim swap file

---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)
.gitignore +1 -0
index 425506b..f7e5b77 100644
@@ -1,5 +1,6 @@
 *~
 *.bak
+*.swp
 tmp
 *.tmp
 bisection.ps
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
author
#2 lore raw

PATCH v2 2/19 ts-xen-build-prep: only install w3c-dtd-xhtml for suites <Stretch

In reply to Wei Liu

That package is not included in Stretch.

That package was installed because libvirt build needed it. However libvirt builds fine without it in Stretch.

---
 ts-xen-build-prep | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
ts-xen-build-prep +4 -1
index 3e98364..7718cff 100755
@@ -206,9 +206,12 @@ sub prep () {
                       libglib2.0-dev liblzma-dev pkg-config
                       autoconf automake libtool xsltproc
                       libxml2-utils libxml2-dev
-                      libdevmapper-dev w3c-dtd-xhtml libxml-xpath-perl
+                      libdevmapper-dev libxml-xpath-perl
                       ccache nasm checkpolicy ebtables);
 
+    if ($ho->{Suite} =~ m/squeeze|wheezy|jessie/) {
+	push(@packages, "w3c-dtd-xhtml");
+    }
     if ($ho->{Suite} !~ m/squeeze|wheezy/) {
 	push(@packages, qw(ocaml-nox ocaml-findlib));
     }
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Acked-by on v2 2/19
#3 lore raw

Re: [OSSTEST PATCH v2 02/19] ts-xen-build-prep: only install w3c-dtd-xhtml for suites <Stretch

Wei Liu writes ("[OSSTEST PATCH v2 02/19] ts-xen-build-prep: only install w3c-dtd-xhtml for suites <Stretch"):

Quoted 4 lines

That package is not included in Stretch.

That package was installed because libvirt build needed it. However libvirt builds fine without it in Stretch.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#4 lore raw

PATCH v2 3/19 ts-xen-build-prep: install packages for suites >jessie

In reply to Wei Liu

Stubdom build needs texinfo.

Libvirt build needs autopoint.

QEMU build needs libpciaccess-dev.

---
 ts-xen-build-prep | 4 ++++
 1 file changed, 4 insertions(+)
ts-xen-build-prep +4 -0
index 7718cff..80bfb30 100755
@@ -221,6 +221,10 @@ sub prep () {
 	# jessie (>jessie?)
 	push(@packages, "libnl-route-3-dev");
     }
+    if ($ho->{Suite} !~ m/squeeze|wheezy|jessie/) {
+        push(@packages, qw(texinfo autopoint libpciaccess-dev));
+    }
+
     target_install_packages($ho, @packages);
     target_cmd_root($ho, "chmod -R a+r /usr/share/git-core/templates");
     # workaround for Debian #595728
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
author
#5 lore raw

PATCH v2 4/19 ts-xen-install: install some packages on stretch

In reply to Wei Liu

The "route" command is now in that package.

libnl is needed when running xl.

---
 ts-xen-install | 3 +++
 1 file changed, 3 insertions(+)
ts-xen-install +3 -0
index ec907c5..d4c25c7 100755
@@ -57,6 +57,9 @@ sub packages () {
                                libsdl1.2debian libglib2.0-0 liblzma5
 			       qemu-utils
                                netcat-openbsd));
+    if ($ho->{Suite} =~ m/stretch/) {
+        target_install_packages($ho, 'net-tools libnl-route-3-200');
+    }
     if ($ho->{Suite} =~ m/jessie/) {
         target_install_packages($ho, 'libnl-route-3-200');
     }
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#6 lore raw

Re: [OSSTEST PATCH v2 04/19] ts-xen-install: install some packages on stretch

Wei Liu writes ("[OSSTEST PATCH v2 04/19] ts-xen-install: install some packages on stretch"):

Quoted 3 lines

The "route" command is now in that package.

libnl is needed when running xl.

...

ts-xen-install sub packages () { · line 62

Quoted 3 lines
ts-xen-install +3 -0
+    if ($ho->{Suite} =~ m/stretch/) {
+        target_install_packages($ho, 'net-tools libnl-route-3-200');
+    }

We want to do this indefinitely, don't we ? So it should be
!~ m/squeeze|wheezy|jessie/
?

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#7 lore raw

PATCH v2 5/19 Debian.pm: use sysvinit-core instead of systemd

In reply to Wei Liu

Install that packages for suites >wheezy, because they use systemd as the default init.

---
 Osstest/Debian.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Osstest/Debian.pm +1 -1
index 845027a..e7fb020 100644
@@ -827,7 +827,7 @@ sub preseed_base ($$$;@) {
 
     # Systemd doesn't honor osstest-confirm-booted service, which
     # breaks ts-leak-check.  Fall back to SysV init for now.
-    if ( $suite =~ /jessie/ ) {
+    if ( $suite !~ /squeeze|wheezy/ ) {
        preseed_hook_command($ho, 'late_command', $sfx, <<END)
 in-target apt-get install -y sysvinit-core
 END
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Acked-by on v2 5/19
#8 lore raw

Re: [OSSTEST PATCH v2 05/19] Debian.pm: use sysvinit-core instead of systemd

Wei Liu writes ("[OSSTEST PATCH v2 05/19] Debian.pm: use sysvinit-core instead of systemd"):

Quoted 2 lines

Install that packages for suites >wheezy, because they use systemd as the default init.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#9 lore raw

PATCH v2 6/19 ts-leak-check: suppress systemd-shim, which leaks in stretch

In reply to Wei Liu
---
 ts-leak-check | 1 +
 1 file changed, 1 insertion(+)
ts-leak-check +1 -0
index 678d069..41e6245 100755
@@ -202,6 +202,7 @@ xenstore /vm
 xenstore /libxl
 
 process .* udevd
+process .* /.+/systemd-shim
 
 file /var/run/xenstored/db
 file /var/run/xenstored/db.debug
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
author
#10 lore raw

PATCH v2 7/19 ts-host-install: don't use the new nic naming scheme

In reply to Wei Liu
---
 ts-host-install | 4 ++++
 1 file changed, 4 insertions(+)
ts-host-install +4 -0
index 11c14a7..7339858 100755
@@ -271,6 +271,10 @@ END
     # why this is repeated.
     push @hocmdline, "console=$console" unless $console eq "NONE";
 
+    # Don't use "Predictable Network Interface Names"
+    # https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
+    push @hocmdline, "net.ifnames=0" if $ho->{Suite} =~ m/stretch/;
+
     push @hocmdline,
         get_host_property($ho, "linux-boot-append $ho->{Suite}", ''),
         get_host_property($ho, "linux-boot-append $ho->{Suite} $r{arch}", '');
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

A message that is not in the archive (sent off-list or not yet received): [email protected]

#12 lore raw

Re: [OSSTEST PATCH v2 07/19] ts-host-install: don't use the new nic naming scheme

Quoted 1 line · Julien Grall

Hi Wei/Ian,

Hi,

Quoted 7 lines

I have tried this series on Arm64 hardware. I am able to boot and install Debian on AMD Seattle (laxton{0,1}). But I don't get network when using Cavium Thunder-X (rochester{0,1}) after reboot.

Looking into more details, the interface naming is not the same between the installer and after reboot. In the former, eth4 is used whilst the latter uses eth5 for the same interface (USB network dongle).

I have tried to use 'interface force' property to impose eth4, without much luck. The interface naming is still eth5 after reboot.

I was wondering if you have any idea how to solve the naming scheme issue?

I dug a bit more, so 'force interface' will create the /etc/udev/rules.d/70-persistent-net.rules for the installer initrd.

However, it does not get copied to the installed Debian. For the moment, I workaround this by copying the file in overlay/ so it get installed.

With that, I manage to get the network in the installed Debian. I guess this is not the right way. What would be the right way?

Cheers,

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
author
#13 lore raw

Re: [OSSTEST PATCH v2 07/19] ts-host-install: don't use the new nic naming scheme

Quoted 18 lines · Julien Grall
Quoted 1 line · Julien Grall

Hi Wei/Ian,

Hi,

Quoted 11 lines

I have tried this series on Arm64 hardware. I am able to boot and install Debian on AMD Seattle (laxton{0,1}). But I don't get network when using Cavium Thunder-X (rochester{0,1}) after reboot.

Looking into more details, the interface naming is not the same between the installer and after reboot. In the former, eth4 is used whilst the latter uses eth5 for the same interface (USB network dongle).

I have tried to use 'interface force' property to impose eth4, without much luck. The interface naming is still eth5 after reboot.

Quoted 8 lines
Quoted 1 line

I was wondering if you have any idea how to solve the naming scheme issue?

I dug a bit more, so 'force interface' will create the /etc/udev/rules.d/70-persistent-net.rules for the installer initrd.

However, it does not get copied to the installed Debian. For the moment, I workaround this by copying the file in overlay/ so it get installed.

I tried that as well, but that's wrong.

That would make the generated rule get copied in to the host initrd, which ends up being used as the guests initrd (at least on x86), then the guest will hijack the host's IP address (!).

Quoted 3 lines

With that, I manage to get the network in the installed Debian. I guess this is not the right way. What would be the right way?

See v3 of this series, which has a patch named:

Set mac address in interfaces(5) if force-mac-address is set

That should work on ARM, too.

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#14 lore raw

Re: [OSSTEST PATCH v2 07/19] ts-host-install: don't use the new nic naming scheme

Wei Liu writes ("Re: [Xen-devel] [OSSTEST PATCH v2 07/19] ts-host-install: don't use the new nic naming scheme"):

Quoted 12 lines · Julien Grall
Quoted 5 lines

I dug a bit more, so 'force interface' will create the /etc/udev/rules.d/70-persistent-net.rules for the installer initrd.

However, it does not get copied to the installed Debian. For the moment, I workaround this by copying the file in overlay/ so it get installed.

I tried that as well, but that's wrong.

That would make the generated rule get copied in to the host initrd, which ends up being used as the guests initrd (at least on x86), then the guest will hijack the host's IP address (!).

???

1. persistent-net.rules contains information saying "if nic with address aa:bb:cc:dd:ee:ff shows up, call it eth2; also, do not call anything else eth2". So it has nothing to do with ip addresses.

2. initrds don't need to bring up the network so I'm not sure why this would end up there. If it does, we could add something to the initramfs-tools config to stop it.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#15 lore raw

Re: [OSSTEST PATCH v2 07/19] ts-host-install: don't use the new nic naming scheme

Quoted 14 lines · Ian Jackson

Wei Liu writes ("Re: [Xen-devel] [OSSTEST PATCH v2 07/19] ts-host-install: don't use the new nic naming scheme"):

Quoted 12 lines · Julien Grall
Quoted 5 lines

I dug a bit more, so 'force interface' will create the /etc/udev/rules.d/70-persistent-net.rules for the installer initrd.

However, it does not get copied to the installed Debian. For the moment, I workaround this by copying the file in overlay/ so it get installed.

I tried that as well, but that's wrong.

That would make the generated rule get copied in to the host initrd, which ends up being used as the guests initrd (at least on x86), then the guest will hijack the host's IP address (!).

Quoted 5 lines

???

1. persistent-net.rules contains information saying "if nic with address aa:bb:cc:dd:ee:ff shows up, call it eth2; also, do not call anything else eth2". So it has nothing to do with ip addresses.

The rule is generated by osstest, which says "please make this nic have mac address XXXX". That would cause the guest to have the same mac address as the host. When the guest is up and asks DHCP server for an IP, it gets the host's IP.

Quoted 5 lines

2. initrds don't need to bring up the network so I'm not sure why this would end up there. If it does, we could add something to the initramfs-tools config to stop it.

initramfs-tools does that. I'm not aware of an option to stop it from doing that.

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#16 lore raw

Re: [OSSTEST PATCH v2 07/19] ts-host-install: don't use the new nic naming scheme

Wei Liu writes ("Re: [Xen-devel] [OSSTEST PATCH v2 07/19] ts-host-install: don't use the new nic naming scheme"):

Quoted 9 lines · Ian Jackson
Quoted 3 lines

1. persistent-net.rules contains information saying "if nic with address aa:bb:cc:dd:ee:ff shows up, call it eth2; also, do not call anything else eth2". So it has nothing to do with ip addresses.

The rule is generated by osstest, which says "please make this nic have mac address XXXX". That would cause the guest to have the same mac address as the host. When the guest is up and asks DHCP server for an IP, it gets the host's IP.

persistent-net.rules (at least the parts of it generated by persistent-net-generator) does not change the mac addresses of nics. It matches according to the mac address and changes their "names".

I hope the osstest-generated one is no different. I'm not even sure it's possible to change the mac address from a udev rule and if it is certainly nothing near us should do it.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#17 lore raw

Re: [OSSTEST PATCH v2 07/19] ts-host-install: don't use the new nic naming scheme

Quoted 11 lines · Ian Jackson

Wei Liu writes ("Re: [Xen-devel] [OSSTEST PATCH v2 07/19] ts-host-install: don't use the new nic naming scheme"):

Quoted 9 lines · Ian Jackson
Quoted 3 lines

1. persistent-net.rules contains information saying "if nic with address aa:bb:cc:dd:ee:ff shows up, call it eth2; also, do not call anything else eth2". So it has nothing to do with ip addresses.

The rule is generated by osstest, which says "please make this nic have mac address XXXX". That would cause the guest to have the same mac address as the host. When the guest is up and asks DHCP server for an IP, it gets the host's IP.

Quoted 8 lines

persistent-net.rules (at least the parts of it generated by persistent-net-generator) does not change the mac addresses of nics. It matches according to the mac address and changes their "names".

I hope the osstest-generated one is no different. I'm not even sure it's possible to change the mac address from a udev rule and if it is certainly nothing near us should do it.

It is rather different. It is a hack put in by IanC to deal with unreliable USB nic. IIRC the rule invokes ip to set the mac address.

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#18 lore raw

Re: [OSSTEST PATCH v2 07/19] ts-host-install: don't use the new nic naming scheme

Wei Liu writes ("Re: [Xen-devel] [OSSTEST PATCH v2 07/19] ts-host-install: don't use the new nic naming scheme"):

Quoted 2 lines

It is rather different. It is a hack put in by IanC to deal with unreliable USB nic. IIRC the rule invokes ip to set the mac address.

Yikes.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#19 lore raw

Re: [OSSTEST PATCH v2 07/19] ts-host-install: don't use the new nic naming scheme

Ian Jackson writes ("Re: [Xen-devel] [OSSTEST PATCH v2 07/19] ts-host-install: don't use the new nic naming scheme"):

Quoted 5 lines

Wei Liu writes ("Re: [Xen-devel] [OSSTEST PATCH v2 07/19] ts-host-install: don't use the new nic naming scheme"):

Quoted 2 lines

It is rather different. It is a hack put in by IanC to deal with unreliable USB nic. IIRC the rule invokes ip to set the mac address.

Yikes.

I have looked at this again. Part of the difficulty is the confusion between these two things:

1. Making the same NICs show up with the same names in each of the installer and every boot. Without this, the network configuration in /etc/network/interfaces (written by the installer) does not work, and also osstest is not able to properly configure the bridging (in /etc/network/interfaces, again).

2. On some broken NICs the MAC address has to be set manually. This is the function of
ff9e0d8cbd9e "ts-host-install: Add force-mac-address host flag"
Obviously this can only possibly work if there is only one NIC.

In Debian, in jessie and earlier, (1) is achieved by /lib/udev/rules.d/75-persistent-net-generator.rules. That maintains a persistent database of MAC address <-> name mappings, in /etc/udev/rules.d/70-persistent-net.rules. When a previously seen NIC shows up, it is renamed by 70-persistent-net.rules. When a not-previously-seen NIC shows up, 75-persistent-net-generator.rules selects a new unique eth* name for it, adds a rule to 70-persistent-net.rules, and renames the NIC.

For guests which share the host's initrd this works fine because the guest has a new MAC address. Its NIC therefore gets a new name. It does not matter that that name is probably eth1 or something. (Or, maybe, if the host has many NICs, eth7 or something.)

In Debian upstream in stretch and later, (1) is achieved by the new kernel netname scheme (which this patch disables). I don't know exactly how it is implemented, but the basic idea is to (mostly) use the MAC address in the name. These names are inconvenient to work with because they are opaque, and they break some of osstest's (IMO reasonable) assumptions.

I think that we should fix (1) by copying jessie's /lib/udev/rules.d/75-persistent-net-generator.rules into installs of stretch and later. We will have to also copy the 70-persistent-net.rules generated in the installer into the target system. I think Julien has patches to do that ?

(2) is a different kettle of fish entirely. It is slightly unfortunate that ff9e0d8cbd9e edits 70-persistent-net.rules rather than providing its own rules file - that is confusing.

I think ff9e0d8cbd9e avoids breaking guests which share the hosts initrd, on jessie, simply because 70-persistent-net.rules is not in the initrd at all.

Discussion surrounding
"[16/19] Set mac address in interfaces(5) if force -mac-address is set"
suggests to me that in stretch, 70-persistent-net.rules *is* in the initrd if it exists. This is odd because I thought stretch had dropped official support for this scheme.

Overall I think the right solution for stretch is:

* Set net.ifnames=0 as this patch does.

* Use the installer early command hook to install 75-persistent-net-generator.rules in the initramfs.

* If the installer does not do this already, use an installer late command hook to copy 70-persistent-net.rules from the installer to the target.

The above will fix (1) by reverting everything to the way it works on jessie. To fix (2) (which maybe worked as it was on jessie by chance),

* Use an early command hook to install something like the udev rule in ff9e0d8cbd9e but not into 70-persistent-net.rules. Instead, put it in 69-fixup-broken-nic.rules or something. That rule will not make it into the installed system so will cause no trouble for any guests.

* Use a late command hook to fix the mac address in /e/n/i, as done in "[16/19] Set mac address in interfaces(5)..."

Does everyone agree ?

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#20 lore raw

PATCH v2 8/19 ts-guests-nbd-mirror: use target_{get, put}file_root to transfter cfg

In reply to Wei Liu

The original code used target_cmd_output_root which caused a trailing new line to be deleted, which caused libvirt converter to fail.

It wasn't discovered until now because we appended too many "\n".

Use target_{get,put}file_root to do the job.

---
 ts-guests-nbd-mirror | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
ts-guests-nbd-mirror +5 -2
index ca8300d..3032204 100755
@@ -115,8 +115,11 @@ sub shuffleconfigs () {
 	my $gn= $gns[$i];
 	my $gho= $ghos[$i];
 	my $cfgpath= $r{ "$gho->{Guest}_cfgpath" };
-	my $cfgdata= target_cmd_output_root($sho,"cat $cfgpath");
-	target_putfilecontents_root_stash($cho,10,$cfgdata,$cfgpath);
+	my $file= $cfgpath;
+	$file=~ s,/,-,g;
+	$file= "$stash/".hostnamepath($cho)."--$file";
+	target_getfile_root($sho, 60, $cfgpath, $file);
+	target_putfile_root($cho, 60, $file, $cfgpath);
     }
 }
 
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#21 lore raw

Re: [OSSTEST PATCH v2 08/19] ts-guests-nbd-mirror: use target_{get, put}file_root to transfter cfg

Wei Liu writes ("[OSSTEST PATCH v2 08/19] ts-guests-nbd-mirror: use target_{get,put}file_root to transfter cfg"):

Quoted 6 lines

The original code used target_cmd_output_root which caused a trailing new line to be deleted, which caused libvirt converter to fail.

It wasn't discovered until now because we appended too many "\n".

Use target_{get,put}file_root to do the job.

Maybe target_getfilecontents and stashfilecontents and target_putfilecontents would be easier and also better ?

It is usually better to use the existing facilities for inventing stash file names because they check for uniqueness.

Or maybe you want to invent `target_getfile_stash' which uses open_unique_stashfile and target_getfile, and returns the filename.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#22 lore raw

Re: [OSSTEST PATCH v2 08/19] ts-guests-nbd-mirror: use target_{get, put}file_root to transfter cfg

Quoted 6 lines · Ian Jackson

Wei Liu writes ("[OSSTEST PATCH v2 08/19] ts-guests-nbd-mirror: use target_{get,put}file_root to transfter cfg"):

Quoted 5 lines

The original code used target_cmd_output_root which caused a trailing new line to be deleted, which caused libvirt converter to fail.

It wasn't discovered until now because we appended too many "\n".

Quoted 8 lines
Quoted 1 line

Use target_{get,put}file_root to do the job.

Maybe target_getfilecontents and stashfilecontents and target_putfilecontents would be easier and also better ?

It is usually better to use the existing facilities for inventing stash file names because they check for uniqueness.

There is no target_getfilecontents, and the method I used is used throughout osstest code.

Quoted 3 lines

Or maybe you want to invent `target_getfile_stash' which uses open_unique_stashfile and target_getfile, and returns the filename.

Let me see if I can invent something after fixing those more important issues.

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#23 lore raw

PATCH v2 9/19 ts-debian-fixup: merge origin extra= to our own

In reply to Wei Liu

The original extra= was not removed, so there were two extra= in the resulting config file.

It wasn't a problem for xl because the second extra= took precedence. However libvirt tests would only pick up the first extra= -- they worked by chance.

Fix this issue by merging the original.

---
 ts-debian-fixup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ts-debian-fixup +1 -1
index f29971d..288766d 100755
@@ -175,7 +175,7 @@ sub otherfixupcfg () {
         $extra .= " iommu=soft";
     }
 
-    $cfg .= "\nextra='$extra'\n";
+    $cfg =~ s/^extra\s*=\s*['"](.*)['"]/extra = '$1 $extra'/mg;
 };
 
 sub writecfg () {
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#24 lore raw

Re: [OSSTEST PATCH v2 09/19] ts-debian-fixup: merge origin extra= to our own

Wei Liu writes ("[OSSTEST PATCH v2 09/19] ts-debian-fixup: merge origin extra= to our own"):

Quoted 6 lines

The original extra= was not removed, so there were two extra= in the resulting config file.

It wasn't a problem for xl because the second extra= took precedence. However libvirt tests would only pick up the first extra= -- they worked by chance.

...

ts-debian-fixup sub otherfixupcfg () { · line 178

Quoted 2 lines
ts-debian-fixup +1 -1
-    $cfg .= "\nextra='$extra'\n";
+    $cfg =~ s/^extra\s*=\s*['"](.*)['"]/extra = '$1 $extra'/mg;

Isn't this a no-op if there is no extra= already ?

Also you use s///g but AFAICT multiple extra would already be an error of some kind and editing them all doesn't seem to make sense...

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#25 lore raw

Re: [OSSTEST PATCH v2 09/19] ts-debian-fixup: merge origin extra= to our own

Quoted 4 lines · Ian Jackson

Wei Liu writes ("[OSSTEST PATCH v2 09/19] ts-debian-fixup: merge origin extra= to our own"):

Quoted 3 lines

The original extra= was not removed, so there were two extra= in the resulting config file.

Quoted 8 lines
Quoted 3 lines

It wasn't a problem for xl because the second extra= took precedence. However libvirt tests would only pick up the first extra= -- they worked by chance.

...

ts-debian-fixup sub otherfixupcfg () { · line 178

Quoted 2 lines
ts-debian-fixup +1 -1
-    $cfg .= "\nextra='$extra'\n";
+    $cfg =~ s/^extra\s*=\s*['"](.*)['"]/extra = '$1 $extra'/mg;

Isn't this a no-op if there is no extra= already ?

Right. We will need to test if there is already extra=.

Quoted 4 lines

Also you use s///g but AFAICT multiple extra would already be an error of some kind and editing them all doesn't seem to make sense...

Yeah, removing the 'g' should be fine.

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#26 lore raw

PATCH v2 10/19 ts-debian-fixup: use correct resume device

In reply to Wei Liu

See code comment for explanation.

---
 ts-debian-fixup | 12 ++++++++++++
 1 file changed, 12 insertions(+)
ts-debian-fixup +12 -0
index 288766d..9a63c61 100755
@@ -175,6 +175,18 @@ sub otherfixupcfg () {
         $extra .= " iommu=soft";
     }
 
+    # There might be stale entries in /etc/initramfs-tools/conf.d/resume which
+    # get stored in the initramfs. That introduces delay in guest booting which
+    # might cause tests to fail.
+    #
+    # This is particularly prominent in stretch when it tries to scan for the
+    # inexistent device(s) for a long time. See also Debian bug #784810.
+    #
+    # Override that in kernel command line with the correct swap partition.
+    $cfg =~ m/'phy:.+-swap,(xvda\d+),.*'/;
+    $extra .= " resume=/dev/$1";
+    logm("change resume device to $1");
+
     $cfg =~ s/^extra\s*=\s*['"](.*)['"]/extra = '$1 $extra'/mg;
 };
 
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#27 lore raw

Re: [OSSTEST PATCH v2 10/19] ts-debian-fixup: use correct resume device

Wei Liu writes ("[OSSTEST PATCH v2 10/19] ts-debian-fixup: use correct resume device"):

Quoted 1 line

See code comment for explanation.

...

Quoted 1 line

+ $cfg =~ m/'phy:.+-swap,(xvda\d+),.*'/;

This is quite a careless regexp!

ts-debian-fixup sub otherfixupcfg () { · line 188

Quoted 2 lines
ts-debian-fixup +2 -0
+    $extra .= " resume=/dev/$1";
+    logm("change resume device to $1");

Can't we just say "noresume" or something ?

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#28 lore raw

PATCH v2 11/19 ts-debian-hvm-install: disable new nic naming scheme

In reply to Wei Liu

This is required to fix nested hvm test. The L1 host is installed by this script. We want the L1 host to not use the new nic naming scheme.

---
 ts-debian-hvm-install | 13 +++++++++++++
 1 file changed, 13 insertions(+)
ts-debian-hvm-install +13 -0
index 54d5d1c..afe8dc9 100755
@@ -114,6 +114,19 @@ set -ex
 in-target sed -i 's/^deb *cdrom/#&/g' /etc/apt/sources.list
 END
 
+    # Do not use "Predictable Network Interface Names" -- this can break
+    # nested HVM tests.
+    # https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
+    #
+    # See also
+    # https://www.debian.org/releases/stretch/example-preseed.txt
+    my $netifnames = "";
+    $netifnames = <<END if $ho->{Suite} =~ m/stretch/;
+d-i debian-installer/add-kernel-opts string net.ifnames=0
+END
+
+    $preseed_file .= "$netifnames";
+
     $preseed_file .= preseed_hook_cmds();
 
     return $preseed_file;
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#29 lore raw

Re: [OSSTEST PATCH v2 11/19] ts-debian-hvm-install: disable new nic naming scheme

Wei Liu writes ("[OSSTEST PATCH v2 11/19] ts-debian-hvm-install: disable new nic naming scheme"):

Quoted 2 lines

This is required to fix nested hvm test. The L1 host is installed by this script. We want the L1 host to not use the new nic naming scheme.

Without this, and without the scheme that was in jessie and earlier, machines with multiple nics can find that the nic names change unpredictably, breaking stuff.

AIUI Julien has patches to drop in the network-*-generator things from jessie. We should have those.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#30 lore raw

PATCH v2 12/19 ts-xen-build-prep: install e2fslibs-dev

In reply to Wei Liu

The in-tree libfsimage ext2fs implementation can't handle 64bit enabled ext4, which is the default in stretch.

Installing e2fslibs-dev causes libfsimage to pick up the packaged ext2fs implementation.

---
 ts-xen-build-prep | 6 ++++++
 1 file changed, 6 insertions(+)
ts-xen-build-prep +6 -0
index 80bfb30..8b4b08a 100755
@@ -225,6 +225,12 @@ sub prep () {
         push(@packages, qw(texinfo autopoint libpciaccess-dev));
     }
 
+    # The in-tree ext4 support in libfsimage can't cope with 64bit ext4 on
+    # 32bit build. Use the packaged library.
+    if ($ho->{Suite} !~ m/squeeze|wheezy|jessie/) {
+        push(@packages, qw(e2fslibs-dev));
+    }
+
     target_install_packages($ho, @packages);
     target_cmd_root($ho, "chmod -R a+r /usr/share/git-core/templates");
     # workaround for Debian #595728
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#31 lore raw

Re: [OSSTEST PATCH v2 12/19] ts-xen-build-prep: install e2fslibs-dev

Wei Liu writes ("[OSSTEST PATCH v2 12/19] ts-xen-build-prep: install e2fslibs-dev"):

Quoted 5 lines

The in-tree libfsimage ext2fs implementation can't handle 64bit enabled ext4, which is the default in stretch.

Installing e2fslibs-dev causes libfsimage to pick up the packaged ext2fs implementation.

This should be documented in xen.git:INSTALL I think ?

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#32 lore raw

PATCH v2 13/19 TestSupport: add dpkg option when installing packages

In reply to Wei Liu

Upgrading configuration file of nbd-client is controlled by dpkg in stretch. Add dpkg option to keep old configuration file(s).

---
 Osstest/TestSupport.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Osstest/TestSupport.pm +2 -1
index 6d5e667..238be9e 100644
@@ -527,7 +527,8 @@ sub target_run_apt {
     my ($ho, @aptopts) = @_;
     target_cmd_root($ho,
         "DEBIAN_PRIORITY=critical UCF_FORCE_CONFFOLD=y \\
-            with-lock-ex -w /var/lock/osstest-apt apt-get @aptopts", 3000);
+            with-lock-ex -w /var/lock/osstest-apt \\
+            apt-get -o Dpkg::Options::=\"--force-confold\" @aptopts", 3000);
 }
 sub target_install_packages {
     my ($ho, @packages) = @_;
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#33 lore raw

Re: [OSSTEST PATCH v2 13/19] TestSupport: add dpkg option when installing packages

Wei Liu writes ("[OSSTEST PATCH v2 13/19] TestSupport: add dpkg option when installing packages"):

Quoted 2 lines

Upgrading configuration file of nbd-client is controlled by dpkg in stretch. Add dpkg option to keep old configuration file(s).

I don't think w just want to suppress all these conffile conflicts.

Instead, perhaps it is possible to install nbd-client first and then configure it, avoiding this problem.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#34 lore raw

Re: [OSSTEST PATCH v2 13/19] TestSupport: add dpkg option when installing packages

Quoted 8 lines · Ian Jackson

Wei Liu writes ("[OSSTEST PATCH v2 13/19] TestSupport: add dpkg option when installing packages"):

Quoted 2 lines

Upgrading configuration file of nbd-client is controlled by dpkg in stretch. Add dpkg option to keep old configuration file(s).

I don't think w just want to suppress all these conffile conflicts.

Instead, perhaps it is possible to install nbd-client first and then configure it, avoiding this problem.

AIUI the confi file is installed first because we want nbd-client to get configured and starts automatically after installation.

It might work if we install nbd-client first, install config file and then restart the service. I will need to try.

Wei.

Quoted 2 lines

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#35 lore raw

PATCH v2 14/19 ts-guests-nbd-mirror: make it work with stretch

In reply to Wei Liu

On the server side, only add oldstyle= and port= on Wheezy and Jessie. Stretch doesn't support or need those anymore.

On the client side, generate new style configuration file.

---
 ts-guests-nbd-mirror | 47 +++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 43 insertions(+), 4 deletions(-)
ts-guests-nbd-mirror +43 -4
index 3032204..7bcc02c 100755
@@ -60,15 +60,19 @@ sub configserver () {
 [generic]
     user = root
 END
-    $scfg .= <<END unless $sho->{Suite} =~ m/sarge|lenny|squeeze/;
+
+    $scfg .= <<END if $sho->{Suite} =~ m/wheezy|jessie/;
     oldstyle = true
 END
+
     foreach my $v (@vols) {
 	$v->{Port}= unique_incrementing_runvar("${srvhost}_nextport",4000);
 	$v->{Path}= "/dev/$v->{Gho}{Vg}/$v->{Lv}";
 	$scfg.=<<END;
 [export$v->{Ix}]
     exportname = $v->{Path}
+END
+	$scfg.=<<END if $sho->{Suite} =~ m/wheezy|jessie/;
     port = $v->{Port}
 END
     }
@@ -79,9 +83,7 @@ END
     target_install_packages($sho, qw(nbd-server));
 }
 
-sub configclient () {
-    target_cmd_root($cho, "dpkg --purge nbd-client ||:");
-
+sub configclient_pre_stretch () {
     my $mydaemon= '/root/nbd-client-async';
     target_putfilecontents_root_stash($cho,10,<<'END',$mydaemon);
 #!/bin/sh
@@ -107,7 +109,44 @@ NBD_PORT[$v->{Ix}]=$v->{Port}
 END
     }
     target_putfilecontents_root_stash($cho,10,$ccfg,"/etc/nbd-client");
+}
+
+sub configclient_stretch () {
+    my $ccfg = <<END;
+# generated by $0
+END
+
+    foreach my $v (@vols) {
+	my $nbddev = "nbd$v->{Ix}";
+	$ccfg .= <<END;
+$nbddev $sho->{Name} export$v->{Ix}
+END
+    }
+
+    target_putfilecontents_root_stash($cho,10,$ccfg,"/etc/nbdtab");
+}
+
+sub configclient () {
+    target_cmd_root($cho, "dpkg --purge nbd-client ||:");
+
+    if ($cho->{Suite} !~ m/stretch/) {
+        configclient_pre_stretch();
+    } else {
+        configclient_stretch();
+    }
+
     target_install_packages($cho, qw(nbd-client));
+
+    if ($cho->{Suite} !~ m/squeeze|wheezy|jessie/) {
+	foreach my $v (@vols) {
+	    my $nbddev = "nbd$v->{Ix}";
+	    target_cmd_root($cho, <<END);
+mkdir -p /dev/$v->{Gho}{Vg}
+if ! test -L $v->{Path}; then ln -s /dev/$nbddev $v->{Path}; fi
+END
+	}
+	target_cmd_root($cho, "/etc/init.d/nbd-client start");
+    }
 }
 
 sub shuffleconfigs () {
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#36 lore raw

Re: [OSSTEST PATCH v2 14/19] ts-guests-nbd-mirror: make it work with stretch

Wei Liu writes ("[OSSTEST PATCH v2 14/19] ts-guests-nbd-mirror: make it work with stretch"):

Quoted 2 lines

On the server side, only add oldstyle= and port= on Wheezy and Jessie. Stretch doesn't support or need those anymore.

...

ts-guests-nbd-mirror NBD_PORT[$v->{Ix}]=$v->{Port} · line 133

Quoted 2 lines
ts-guests-nbd-mirror +2 -0
+    if ($cho->{Suite} !~ m/stretch/) {
+        configclient_pre_stretch();

This will go wrong in buster. Your match needs to be inverted and the set of suites too, so that unknown suites get the new behaviour.

It's probably easier to swap the limbs of the if.

ts-guests-nbd-mirror NBD_PORT[$v->{Ix}]=$v->{Port} · line 146

Quoted 8 lines
ts-guests-nbd-mirror +8 -0
+
+    if ($cho->{Suite} !~ m/squeeze|wheezy|jessie/) {
+	foreach my $v (@vols) {
+	    my $nbddev = "nbd$v->{Ix}";
+	    target_cmd_root($cho, <<END);
+mkdir -p /dev/$v->{Gho}{Vg}
+if ! test -L $v->{Path}; then ln -s /dev/$nbddev $v->{Path}; fi
+END

This seems to duplicate code in what is now configclient_pre_stretch.

I also don't understand the logic that says:
- on stretch, do the post-stretch thing, and make this symlink
- on squeeze..jessie, do the pre-stretch thing, and make this symlink
- on sarge, do the pre-stretch thing, and make the symlink twice
?

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#37 lore raw

Re: [OSSTEST PATCH v2 14/19] ts-guests-nbd-mirror: make it work with stretch

Quoted 12 lines · Ian Jackson

Wei Liu writes ("[OSSTEST PATCH v2 14/19] ts-guests-nbd-mirror: make it work with stretch"):

Quoted 2 lines

On the server side, only add oldstyle= and port= on Wheezy and Jessie. Stretch doesn't support or need those anymore.

...

ts-guests-nbd-mirror NBD_PORT[$v->{Ix}]=$v->{Port} · line 133

Quoted 2 lines
ts-guests-nbd-mirror +2 -0
+    if ($cho->{Suite} !~ m/stretch/) {
+        configclient_pre_stretch();

This will go wrong in buster. Your match needs to be inverted and the set of suites too, so that unknown suites get the new behaviour.

It's probably easier to swap the limbs of the if.

Quoted 10 lines

ts-guests-nbd-mirror NBD_PORT[$v->{Ix}]=$v->{Port} · line 146

Quoted 8 lines
ts-guests-nbd-mirror +8 -0
+
+    if ($cho->{Suite} !~ m/squeeze|wheezy|jessie/) {
+	foreach my $v (@vols) {
+	    my $nbddev = "nbd$v->{Ix}";
+	    target_cmd_root($cho, <<END);
+mkdir -p /dev/$v->{Gho}{Vg}
+if ! test -L $v->{Path}; then ln -s /dev/$nbddev $v->{Path}; fi
+END

This seems to duplicate code in what is now configclient_pre_stretch.

The snippet is duplicate but there isn't a better way to do it.

In pre stretch function, the snippet is put into the client config file and nbd-client will run it.

New ndb-client config file is different. I don't think it can run shell script anymore.

Quoted 4 lines

I also don't understand the logic that says:
- on stretch, do the post-stretch thing, and make this symlink
- on squeeze..jessie, do the pre-stretch thing, and make this symlink

They are both needed by osstest.

Quoted 1 line

- on sarge, do the pre-stretch thing, and make the symlink twice

I don't follow. There is no sarge here. I don't think that's relevant anymore. If you like, I can list squeeze and sarge in the pre stretch listing.

Wei.

Quoted 3 lines

?

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#38 lore raw

Re: [OSSTEST PATCH v2 14/19] ts-guests-nbd-mirror: make it work with stretch

Quoted 37 lines · Wei Liu
Quoted 12 lines · Ian Jackson

Wei Liu writes ("[OSSTEST PATCH v2 14/19] ts-guests-nbd-mirror: make it work with stretch"):

Quoted 2 lines

On the server side, only add oldstyle= and port= on Wheezy and Jessie. Stretch doesn't support or need those anymore.

...

ts-guests-nbd-mirror NBD_PORT[$v->{Ix}]=$v->{Port} · line 133

Quoted 2 lines
ts-guests-nbd-mirror +2 -0
+    if ($cho->{Suite} !~ m/stretch/) {
+        configclient_pre_stretch();

This will go wrong in buster. Your match needs to be inverted and the set of suites too, so that unknown suites get the new behaviour.

It's probably easier to swap the limbs of the if.

Quoted 10 lines

ts-guests-nbd-mirror NBD_PORT[$v->{Ix}]=$v->{Port} · line 146

Quoted 8 lines
ts-guests-nbd-mirror +8 -0
+
+    if ($cho->{Suite} !~ m/squeeze|wheezy|jessie/) {
+	foreach my $v (@vols) {
+	    my $nbddev = "nbd$v->{Ix}";
+	    target_cmd_root($cho, <<END);
+mkdir -p /dev/$v->{Gho}{Vg}
+if ! test -L $v->{Path}; then ln -s /dev/$nbddev $v->{Path}; fi
+END

This seems to duplicate code in what is now configclient_pre_stretch.

The snippet is duplicate but there isn't a better way to do it.

In pre stretch function, the snippet is put into the client config file and nbd-client will run it.

New ndb-client config file is different. I don't think it can run shell script anymore.

Quoted 4 lines

I also don't understand the logic that says:
- on stretch, do the post-stretch thing, and make this symlink
- on squeeze..jessie, do the pre-stretch thing, and make this symlink

Quoted 8 lines

They are both needed by osstest.

Quoted 1 line

- on sarge, do the pre-stretch thing, and make the symlink twice

I don't follow. There is no sarge here. I don't think that's relevant anymore. If you like, I can list squeeze and sarge in the pre stretch listing.

BTW my assumption is anyone who runs osstest in the wild will have at least wheezy at this point. If you think otherwise, please let me know.

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#39 lore raw

PATCH v2 15/19 Add clk_ignore_unused for stretch for arm hosts

In reply to Wei Liu

Without that parameter we lose uart output.

---
 Osstest/Debian.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Osstest/Debian.pm +1 -1
index e7fb020..2bfd5ae 100644
@@ -240,7 +240,7 @@ END
 	push @xenkopt, $xenkopt;
 	# http://bugs.xenproject.org/xen/bug/45
 	push @xenkopt, "clk_ignore_unused"
-	    if $ho->{Suite} =~ m/wheezy|jessie/;
+	    if $ho->{Suite} =~ m/wheezy|jessie|stretch/;
 
 	$xenkopt = join ' ', @xenkopt;
 	logm("Dom0 Linux options: $xenkopt");
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Acked-by on v2 15/19
#40 lore raw

Re: [OSSTEST PATCH v2 15/19] Add clk_ignore_unused for stretch for arm hosts

Wei Liu writes ("[OSSTEST PATCH v2 15/19] Add clk_ignore_unused for stretch for arm hosts"):

Quoted 1 line

Without that parameter we lose uart output.

In this patch we are propagating a workaroound further into the future. This is an opportunity to prod the people responsible for the bug.

Julien, is this workaround still needed ?
If so, what are the plans for a proper fix ?

But, the osstest patch is

Thanks,
Ian.

Quoted 21 lines
---
 Osstest/Debian.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Osstest/Debian.pm +1 -1
index e7fb020..2bfd5ae 100644
@@ -240,7 +240,7 @@ END
 	push @xenkopt, $xenkopt;
 	# http://bugs.xenproject.org/xen/bug/45
 	push @xenkopt, "clk_ignore_unused"
-	    if $ho->{Suite} =~ m/wheezy|jessie/;
+	    if $ho->{Suite} =~ m/wheezy|jessie|stretch/;
 
 	$xenkopt = join ' ', @xenkopt;
 	logm("Dom0 Linux options: $xenkopt");
Signature · 1 line
2.11.0

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#41 lore raw

PATCH v2 16/19 Set mac address in interfaces(5) if force-mac-address is set

In reply to Wei Liu

ff9e0d8cbd generated a udev rule for setting the mac address. But that udev rule is not copied into the target so reboot after installation will fail.

We can copy the udev rule to target system so the reboot after installation works, but then the generated udev rules will end up in initramfs, which means the guest (which uses host's initrd) will use the same rune to set conflicting mac address.

Put the mac address in interfaces(5). We still need to keep the udev rule for the initrd overlay otherwise host installation will fail.

---
 Osstest/Debian.pm | 10 ++++++++++
 1 file changed, 10 insertions(+)
Osstest/Debian.pm +10 -0
index 2bfd5ae..2c3bcf4 100644
@@ -1207,6 +1207,16 @@ END
 	preseed_hook_command($ho, 'late_command', $sfx, $cmds);
     }
 
+    my $wantphysif= get_host_property($ho,'interface force','auto');
+    if ($wantphysif ne 'auto' && $ho->{Flags}{'force-mac-address'}) {
+	preseed_hook_command($ho, 'late_command', $sfx, <<END);
+#!/bin/sh
+set -ex
+
+sed -i 's/\\(iface\\s*$wantphysif\\s*inet.*\\)/\\1\\n    hwaddress $ho->{Ether}/' /target/etc/network/interfaces
+END
+    }
+
     if ( $ho->{Flags}{'need-uboot-bootscr'} ) {
 	my @bootargs = uboot_common_kernel_bootargs($ho);
 
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Acked-by on v2 16/19
#42 lore raw

Re: [OSSTEST PATCH v2 16/19] Set mac address in interfaces(5) if force-mac-address is set

Wei Liu writes ("[OSSTEST PATCH v2 16/19] Set mac address in interfaces(5) if force-mac-address is set"):

Quoted 11 lines

ff9e0d8cbd generated a udev rule for setting the mac address. But that udev rule is not copied into the target so reboot after installation will fail.

We can copy the udev rule to target system so the reboot after installation works, but then the generated udev rules will end up in initramfs, which means the guest (which uses host's initrd) will use the same rune to set conflicting mac address.

Put the mac address in interfaces(5). We still need to keep the udev rule for the initrd overlay otherwise host installation will fail.

...

Osstest/Debian.pm END · line 1217

Quoted 2 lines
Osstest/Debian.pm +2 -0
+sed -i 's/\\(iface\\s*$wantphysif\\s*inet.*\\)/\\1\\n    hwaddress $ho->{Ether}/' /target/etc/network/interfaces
+END

Lovely!

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#43 lore raw

PATCH v2 17/19 Skip bootloader installation for arm32 in Stretch

In reply to Wei Liu
---
 Osstest/Debian.pm | 5 +++++
 1 file changed, 5 insertions(+)
Osstest/Debian.pm +5 -0
index 2c3bcf4..b2d5007 100644
@@ -1027,6 +1027,11 @@ END
 	$preseed_file.= (<<END);
 d-i     nobootloader/confirmation_common boolean true
 END
+        # Stretch has a different method to skip bootloader installation
+        $preseed_file.= (<<END);
+d-i     grub-installer/skip boolean true
+d-i     lilo-installer/skip boolean true
+END
 
         # Debian Bug #771949 means that update-menu-list always
         # generates a full absolute path to the kernel + initrd, while
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Acked-by on v2 17/19
#44 lore raw

Re: [OSSTEST PATCH v2 17/19] Skip bootloader installation for arm32 in Stretch

Wei Liu writes ("[OSSTEST PATCH v2 17/19] Skip bootloader installation for arm32 in Stretch"):

Quoted 1 line

But some minor style questions:

Osstest/Debian.pm END · line 1033

Quoted 12 lines
Osstest/Debian.pm +4 -0
index 2c3bcf4..b2d5007 100644
@@ -1027,6 +1027,11 @@ END
 	$preseed_file.= (<<END);
 d-i     nobootloader/confirmation_common boolean true
 END
+        # Stretch has a different method to skip bootloader installation
+        $preseed_file.= (<<END);
+d-i     grub-installer/skip boolean true
+d-i     lilo-installer/skip boolean true

Why not fold this into the same here document ?

I would put the comments in the preseed file, for both versions, eg:

+# jessie and earlier:
d-i nobootloader/confirmation_common boolean true
+# stretch and later:
+d-i grub-installer/skip boolean true
+d-i lilo-installer/skip boolean true

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#45 lore raw

PATCH v2 18/19 make-flight: don't test pvgrub for Xen XXX

In reply to Wei Liu

XXX Need to pin down the version of Xen when the upgrade to stretch is complete because osstest configuration is branched for each version.

---
 make-flight | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
make-flight +16 -1
index 76620c1..b0f1e69 100755
@@ -827,7 +827,22 @@ test_matrix_do_one () {
   #do_passthrough_tests
 
   do_pygrub_tests
-  do_pvgrub_tests
+
+  # pvgrub1 tests for version < XXX only
+  case "$xenbranch" in
+  xen-4.3-testing) test_pvgrub=y ;;
+  xen-4.4-testing) test_pvgrub=y ;;
+  xen-4.5-testing) test_pvgrub=y ;;
+  xen-4.6-testing) test_pvgrub=y ;;
+  xen-4.7-testing) test_pvgrub=y ;;
+  xen-4.8-testing) test_pvgrub=y ;;
+  xen-4.9-testing) test_pvgrub=y ;;
+  *)               test_pvgrub=n ;;
+  esac
+
+  if [ x$test_pvgrub = xy ]; then
+      do_pvgrub_tests
+  fi
 
   do_xtf_tests
   do_livepatch_tests
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
author
#46 lore raw

cover Keep pvgrub tests

These are extra patches to replace

make-flight: don't test pvgrub for Xen XXX

so that we can keep pvgrub tests.

See
http://logs.test-lab.xenproject.org/osstest/logs/115518/

Wei Liu (2):
ts-debian-di-install: use gho to pick d-i
make-flight: guest should use jessie to test pvgrub

 make-flight          | 8 ++++----
 ts-debian-di-install | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
author
#47 lore raw

PATCH 1/2 ts-debian-di-install: use gho to pick d-i

The original code used ho which gave us the host suite, but we wanted the guest suite.

---
 ts-debian-di-install | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
ts-debian-di-install +2 -2
index 6007971..361a171 100755
@@ -152,8 +152,8 @@ sub setup_netboot($$$)
 	die if $r{ "$gho->{Guest}_netboot_kernel" }
 	||     $r{ "$gho->{Guest}_netboot_ramdisk" };
 
-	my $di_path = $c{TftpPath}.'/'.$ho->{Tftp}{DiBase}.'/'.${arch}.'/'.
-	    debian_guest_di_version($ho).'-'.$ho->{Suite};
+	my $di_path = $c{TftpPath}.'/'.$gho->{Tftp}{DiBase}.'/'.${arch}.'/'.
+	    debian_guest_di_version($gho).'-'.$gho->{Suite};
 
         if (${arch} =~ m/amd64|i386/) {
 	    $kernel = "$di_path/vmlinuz-xen";
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
author
#49 lore raw

PATCH 2/2 make-flight: guest should use jessie to test pvgrub

In reply to Wei Liu

Stretch has 64bit feature enabled for ext4, which pvgrub can't cope. We want to continue to test pvgrub, so specify jessie in the guest suite field.

---
 make-flight | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
make-flight +4 -4
index 76620c1..9c5399b 100755
@@ -578,8 +578,8 @@ do_pvgrub_tests () {
   job_create_test test-$xenarch$kern-$dom0arch-amd64-pvgrub     \
     test-debian-di xl $xenarch $dom0arch                        \
       debian_arch=amd64                                         \
-      debian_suite=$guestsuite                                  \
-      debian_di_version=$guest_di_version                       \
+      debian_suite=jessie                                       \
+      debian_di_version=`getconfig_TftpDiVersion_suite jessie`  \
       debian_method=netboot                                     \
       debian_bootloader=pvgrub                                  \
       all_hostflags=$most_hostflags                             \
@@ -587,8 +587,8 @@ do_pvgrub_tests () {
   job_create_test test-$xenarch$kern-$dom0arch-i386-pvgrub      \
     test-debian-di xl $xenarch $dom0arch                        \
       debian_arch=i386                                          \
-      debian_suite=$guestsuite                                  \
-      debian_di_version=$guest_di_version                       \
+      debian_suite=jessie                                       \
+      debian_di_version=`getconfig_TftpDiVersion_suite jessie`  \
       debian_method=netboot                                     \
       debian_bootloader=pvgrub                                  \
       all_hostflags=$most_hostflags
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#50 lore raw

Re: [OSSTEST PATCH 2/2] make-flight: guest should use jessie to test pvgrub

Wei Liu writes ("[OSSTEST PATCH 2/2] make-flight: guest should use jessie to test pvgrub"):

Quoted 3 lines

Stretch has 64bit feature enabled for ext4, which pvgrub can't cope. We want to continue to test pvgrub, so specify jessie in the guest suite field.

I'm not entirely comfortable with the hardcoding here, but I guess few people are still using osstest configured to use squeeze so I think it will do.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#51 lore raw

Re: [OSSTEST PATCH v2 18/19] make-flight: don't test pvgrub for Xen XXX

In reply to Wei Liu

Wei Liu writes ("[OSSTEST PATCH v2 18/19] make-flight: don't test pvgrub for Xen XXX"):

Quoted 2 lines

XXX Need to pin down the version of Xen when the upgrade to stretch is complete because osstest configuration is branched for each version.

I don't understand this.

make-flight test_matrix_do_one () { · line 841

Quoted 11 lines
make-flight +11 -0
+  # pvgrub1 tests for version < XXX only
+  case "$xenbranch" in
+  xen-4.3-testing) test_pvgrub=y ;;
+  xen-4.4-testing) test_pvgrub=y ;;
+  xen-4.5-testing) test_pvgrub=y ;;
+  xen-4.6-testing) test_pvgrub=y ;;
+  xen-4.7-testing) test_pvgrub=y ;;
+  xen-4.8-testing) test_pvgrub=y ;;
+  xen-4.9-testing) test_pvgrub=y ;;
+  *)               test_pvgrub=n ;;
+  esac

I don't understand what the relationship is between pvgrub1 and stretch, nor how this relates to Xen releases.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#52 lore raw

PATCH v2 19/19 Switch to Debian Stretch

In reply to Wei Liu
---
 Osstest.pm        | 2 +-
 production-config | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
Osstest.pm +1 -1
index ceb62ca..f2e4dfa 100644
@@ -86,7 +86,7 @@ our %c = qw(
 
     Images images
 
-    DebianSuite jessie
+    DebianSuite stretch
     DebianMirrorSubpath debian
 
     TestHostKeypairPath id_rsa_osstest
production-config +2 -0
index 0e6a51e..251d82f 100644
@@ -93,10 +93,12 @@ TftpNetbootGroup osstest
 # Update with ./mg-debian-installer-update(-all)
 TftpDiVersion_wheezy 2016-06-08
 TftpDiVersion_jessie 2017-04-06
+TftpDiVersion_stretch 2017-10-11
 
 # For ISO installs
 DebianImageVersion_wheezy 7.2.0
 DebianImageVersion_jessie 8.2.0
+DebianImageVersion_stretch 9.2.1
 
 # These should normally be the same.
 # Update with ./mg-cpu-microcode-update
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
author
#54 lore raw
In reply to Wei Liu
Quoted 13 lines · Wei Liu

First version of this series can be found at [0].

This version contains workaround for Arndale boards. They are now functional.

A bunch of test cases failed:

1. Rumpkernel tests -- I've sent an email to Antti for advice.
2. Windows tests -- They don't look different from normal flights.
3. memdisk-try-append -- Osstest couldn't find some file. I don't think it is related to the code I modified.
4. guest-localmigrate/x10 for xl-qcow2 test -- Guest kernel bug.
5. nested hvm amd, pvhv2 -- Expected failure.

Quoted 7 lines

Example flight:
http://logs.test-lab.xenproject.org/osstest/logs/115404/

The armhf d-i failure is fixed with an additional patch ("Skip bootloader installaion for arm32 on Stretch) on top of the code for 15404, in:

http://logs.test-lab.xenproject.org/osstest/logs/115404/

This should be 115433.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

author
#55 lore raw
Quoted 17 lines · Wei Liu
Quoted 16 lines · Wei Liu

First version of this series can be found at [0].

This version contains workaround for Arndale boards. They are now functional.

A bunch of test cases failed:

1. Rumpkernel tests -- I've sent an email to Antti for advice.
2. Windows tests -- They don't look different from normal flights.
3. memdisk-try-append -- Osstest couldn't find some file. I don't think it is related to the code I modified.
4. guest-localmigrate/x10 for xl-qcow2 test -- Guest kernel bug.
5. nested hvm amd, pvhv2 -- Expected failure.

Example flight:
http://logs.test-lab.xenproject.org/osstest/logs/115404/

Quoted 6 lines
Quoted 4 lines

The armhf d-i failure is fixed with an additional patch ("Skip bootloader installaion for arm32 on Stretch) on top of the code for 15404, in:

http://logs.test-lab.xenproject.org/osstest/logs/115404/

This should be 115433.

And a complete run of the series:

http://logs.test-lab.xenproject.org/osstest/logs/115436/

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#56 lore raw
In reply to Wei Liu

Hi Wei,

Quoted 3 lines · Wei Liu

First version of this series can be found at [0].

This version contains workaround for Arndale boards. They are now functional.

I need the following patch [1] to use that branch on Arm64 boxes.

Also, on Thunder-X I needed a hack to keep the interface name consistent between the installer and Debian (see discussion on patch #7). Looking at the discussion I am not sure what is the way forward to fix it.

Cheers,

[1]

commit 26badf528e343d3fc540b61490011d391f2360a8

Author: Julien Grall <[email protected]>
Date:   Tue Feb 20 11:54:51 2018 +0000

stretch: Use chainloading when booting using GRUB on Arm64

The GRUB package in Stretch is not able to boot Xen on Arm64. Use chainloading as we did for Jessie for the time being.

Note that a bug has been filled on Debian to integrate Xen pactches for the next release (see [1]).

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=884770

Osstest/Debian.pm +1 -1
index b2d5007..2a2efa0 100644
@@ -437,7 +437,7 @@ sub setupboot_grub2 ($$$$) {
     # Grub2 on Jessie/arm* doesn't do multiboot, so we must chainload.
     my $need_uefi_chainload =
         get_host_property($ho, "firmware", "") eq "uefi" &&
-        $ho->{Suite} =~ m/jessie/ && $r{arch} =~ m/^arm/;
+        $ho->{Suite} =~ m/jessie|stretch/ && $r{arch} =~ m/^arm/;
 
     my $parsemenu= sub {
         my $f= bl_getmenu_open($ho, $rmenu, "$stash/$ho->{Name}--grub.cfg.1");
Quoted 58 lines

A bunch of test cases failed:

1. Rumpkernel tests -- I've sent an email to Antti for advice.
2. Windows tests -- They don't look different from normal flights.
3. memdisk-try-append -- Osstest couldn't find some file. I don't think it is related to the code I modified.
4. guest-localmigrate/x10 for xl-qcow2 test -- Guest kernel bug.
5. nested hvm amd, pvhv2 -- Expected failure.

Example flight:
http://logs.test-lab.xenproject.org/osstest/logs/115404/

The armhf d-i failure is fixed with an additional patch ("Skip bootloader installaion for arm32 on Stretch) on top of the code for 15404, in:

http://logs.test-lab.xenproject.org/osstest/logs/115404/

Cc Julien Grall <[email protected]>

[0] <[email protected]>

Wei Liu (19):
gitignore: ignore vim swap file
ts-xen-build-prep: only install w3c-dtd-xhtml for suites <Stretch
ts-xen-build-prep: install packages for suites >jessie
ts-xen-install: install some packages on stretch Debian.pm: use sysvinit-core instead of systemd
ts-leak-check: suppress systemd-shim, which leaks in stretch
ts-host-install: don't use the new nic naming scheme
ts-guests-nbd-mirror: use target_{get,put}file_root to transfter cfg
ts-debian-fixup: merge origin extra= to our own
ts-debian-fixup: use correct resume device
ts-debian-hvm-install: disable new nic naming scheme
ts-xen-build-prep: install e2fslibs-dev
TestSupport: add dpkg option when installing packages
ts-guests-nbd-mirror: make it work with stretch
Add clk_ignore_unused for stretch for arm hosts
Set mac address in interfaces(5) if force-mac-address is set Skip bootloader installation for arm32 in Stretch
make-flight: don't test pvgrub for Xen XXX
Switch to Debian Stretch

  .gitignore             |  1 +
  Osstest.pm             |  2 +-
  Osstest/Debian.pm      | 19 ++++++++++++++++--
  Osstest/TestSupport.pm |  3 ++-
  make-flight            | 17 +++++++++++++++-
  production-config      |  2 ++
  ts-debian-fixup        | 14 ++++++++++++-
  ts-debian-hvm-install  | 13 ++++++++++++
  ts-guests-nbd-mirror   | 54 ++++++++++++++++++++++++++++++++++++++++++++------
  ts-host-install        |  4 ++++
  ts-leak-check          |  1 +
  ts-xen-build-prep      | 15 +++++++++++++-
  ts-xen-install         |  3 +++
  13 files changed, 135 insertions(+), 13 deletions(-)
Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
author
#57 lore raw
Quoted 5 lines · Julien Grall

Hi Wei,

Quoted 2 lines · Wei Liu

First version of this series can be found at [0].

Quoted 8 lines
Quoted 1 line

This version contains workaround for Arndale boards. They are now functional.

I need the following patch [1] to use that branch on Arm64 boxes.

Also, on Thunder-X I needed a hack to keep the interface name consistent between the installer and Debian (see discussion on patch #7). Looking at the discussion I am not sure what is the way forward to fix it.

IIRC Ian suggested you copy one of the udev rules from Jessie's d-i to the initrd osstest generated for stretch, and perhaps copy it to the installed OS as well. I can't remember which files and don't have a jessie system to hand.

Ian?

Quoted 26 lines

Cheers,

[1]

commit 26badf528e343d3fc540b61490011d391f2360a8

Author: Julien Grall <[email protected]>
Date:   Tue Feb 20 11:54:51 2018 +0000

stretch: Use chainloading when booting using GRUB on Arm64

The GRUB package in Stretch is not able to boot Xen on Arm64. Use chainloading as we did for Jessie for the time being.

Note that a bug has been filled on Debian to integrate Xen pactches for the next release (see [1]).

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=884770

Osstest/Debian.pm +0 -0
index b2d5007..2a2efa0 100644

Osstest/Debian.pm sub setupboot_grub2 ($$$$) { · line 437

Quoted 1 line
Osstest/Debian.pm +0 -0
@@ -437,7 +437,7 @@ sub setupboot_grub2 ($$$$) {
     # Grub2 on Jessie/arm* doesn't do multiboot, so we must chainload.

Please also update the comment here.

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#58 lore raw

Wei Liu writes ("Re: [OSSTEST PATCH v2 00/19] Upgrade to Stretch"):

Quoted 4 lines

IIRC Ian suggested you copy one of the udev rules from Jessie's d-i to the initrd osstest generated for stretch, and perhaps copy it to the installed OS as well. I can't remember which files and don't have a jessie system to hand.

75-persistent-net-generator.rules
which is in /lib/udev/rules.d on jessie but would go in /etc on a stretch system. It will make 70-persistent-net.rules.

IDK if stretch installer will naturally copy 70-persistent-net.rules to the installed system. If not then a hook will have to be used to do that too, so that the device name(s) assigned during the install are replicated on the installed system.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel