Using an ipv6 address as preseed file location results in an installer error

Bug #1679652 reported by bugproxy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
Invalid
High
Unassigned
preseed (Ubuntu)
Invalid
High
Dimitri John Ledkov

Bug Description

Installer version: 20101020ubuntu500
Kernel: 4.10.0-14

Description/Reproduction:
Trying to perform an IPv6-based installation using a preseed file that should be retrieved from an IPv6 URL results in this installer error:
"The file needed for preconfiguration could not be retrieved from
http://xxxxxxxxxxxxxxxx:10:100::86:49/ubuntu/name/zesty.preseed
The installation will proceed in non-automated mode."

The parameter in the parmfile looks like this:

preseed/url=http://[xxxxxxxxxxxxxx:10:100::86:49]/ubuntu/name/zesty.preseed

I also tried escaping the square brackets, but that also doesn't work

In syslog you see the following error:

Apr 4 10:22:22 main-menu[465]: (process:481): expr: warning: '^.*\[[:a-fA-F0-9]*\]': using '^' as the first character
Apr 4 10:22:22 main-menu[465]: (process:481): of a basic regular expression is not portable; it is ignored
Apr 4 10:22:22 main-menu[465]: (process:481): http://xxxxxxxxxxxxxxxx:10:100::86:49^G/ubuntu/name/zesty.preseed: Bad port number.

We had found a similar bug in Ubuntu 16.04 (https://bugzilla.linux.ibm.com/show_bug.cgi?id=137452 , Launchpad Bug LP1547629)

I have attached the logs.

Revision history for this message
bugproxy (bugproxy) wrote : syslog, hardware-summary

Default Comment by Bridge

tags: added: architecture-s39064 bugnameltc-153142 severity-high targetmilestone-inin---
Changed in ubuntu:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
affects: ubuntu → linux (Ubuntu)
Frank Heimes (fheimes)
affects: linux (Ubuntu) → debian-installer (Ubuntu)
affects: debian-installer (Ubuntu) → preseed (Ubuntu)
Changed in preseed (Ubuntu):
status: New → Confirmed
importance: Undecided → High
assignee: Skipper Bug Screeners (skipper-screen-team) → Dimitri John Ledkov (xnox)
milestone: none → ubuntu-17.05
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: New → Confirmed
bugproxy (bugproxy)
tags: added: targetmilestone-inin1704
removed: targetmilestone-inin---
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Looking at the syslog, the kernel commandline as passed to the kernel is invalid:

Apr 4 10:19:26 kernel: [ 0.406602] setup.1a06a7: Linux is running as a z/VM guest operating system in 64-bit mode
...
Apr 4 10:19:26 kernel: [ 0.424773] Kernel command line: ro locale=C cio_ignore=all,!9,!b1c0-b1c2,!eb2e s390-netdevice/qeth/choose=0.0.b1c0-0.0.b1c1-0.0.b1c2 s390-netdevice/choose_networktype=qeth netcfg/disable_dhcp=true s390-netdevice/qeth/port=0 s390-netdevice/qeth/layer2=true netcfg/get_ipaddress=fd00:10:100::86:16/80 netcfg/use_autoconfig=false netcfg/get_gateway=fd00:10:100::86:49 netcfg/get_nameservers=fd00:10:100::86:49 netcfg/get_hostname=s8330016 netcfg/get_domain=boeblingen.de.ibm.com network-console/password=xxxx DEBCONF_DEBUG=5 network-console/password-again=xxxx preseed/url=http://^Gfd00:10:100::86:49^G/ubuntu/mroesch/zesty.preseed
Apr 4 10:19:26 kernel: [ 0.426458] log_buf_len individual max cpu contribution: 4096 bytes

clearly the URL should be http://[fd00:10:100::86:49]/ubuntu/mroesch/zesty.preseed, not ^G.

Currently testing qemu/kvm

Revision history for this message
bugproxy (bugproxy) wrote :

Default Comment by Bridge

Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
importance: Undecided → High
tags: added: id-5a7c3ba47b2e2088f3a84224
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2018-04-17 03:58 EDT-------
Canonical, any update on this LP, how to proceed here? Many thx

Revision history for this message
Frank Heimes (fheimes) wrote :
Download full text (3.3 KiB)

According to the output above and my test (using 16.04.5) the issue seems to be very likely with the URL that points to the preseed file and is part of the kernel parameters:
url=http://^Gfd00:10:100::86:49^G/ubuntu/mroesch/zesty.preseed

(Btw. you can take the short form "url=" instead of "preseed/url=" is enough.)

I strongly suggest to do the following:
- modify the preseed file so that it will no longer be able to do an entire non-interactive installation, e.g. remove the disk config in the pressed.cfg (something like that is needed to be able to debug a pressed installation), but it breaks for you anyway and should land in d-i afterwards, right?
- then either go back to the main d-i menu (with "<") or open another d-i ssh session
  and start a d-i shell (Execute a shell)
- verify there how the kernel parameters look like:
  cat /proc/cmdline
  The url parameter probably looks like:
  url=http://^Gfd00:10:100::86:49^G/ubuntu/mroesch/zesty.preseed
  or
  url=ftp:// 2001:67c:1562:8020:0:ff:ff50:f170 /preseed.cfg
  or
  url=ftp://¬2001:67c:1562:8020:0:ff:ff50:f170|/preseed.cfg
- If this is the case (what I strongly assume) then there is an issue with the character encoding;
  the url parameter needs to look like this (btw. I use ftp and you have http):
  url=ftp://[2001:67c:1562:8020:0:ff:ff50:f170]/preseed.cfg
  Means a proper and full ipv6 address specified in rectangular brackets "[" and "]".
  If you cannot see "[" and "]" here and maybe other characters instead,
  go back to the config file and fix it.

If using 3270 terminal emulators like x3270 with a character set different than "U. S. English (CP 037)" (like I do use with "German CP 273) there might be a problem with the mapping of certain characters, incl. "[" and "]".
So if your parmfile is on a zVM CMS disk and you use x3270 to edit it, just switch temporarily your character set to "U. S. English (CP 037)", type these two characters for surrounding the ipv6 address and switch back to your local character set afterwards (doing so you may even see these characters flip to some others on the fly).

That should help making sure that the right characters in the correct encoding reach the kernel.

With a proper ipv6 (RA) environment in place d-i should then be able to download the preseed file.
It worked in my tests environment (using ftp and http).

One may also try to download the preseed file manually (as a test) from within an d-i shell and then copy and paste the url from the /proc/cmdline output:
# cat /proc/cmdline
ro locale=en_US auto=true priority=critical ftp://[2001:67c:1562:8020:0:ff:ff50:f170]/preseed.cfg
...
# wget ftp://[2001:67c:1562:8020:0:ff:ff50:f170]/preseed.cfg
--2018-08-02 10:51:09-- ftp://[2001:67c:1562:8020:0:ff:ff50:f170]/preseed.cfg
           => 'preseed.cfg'
Connecting to [2001:67c:1562:8020:0:ff:ff50:f170]:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD not needed.
==> SIZE preseed.cfg ... 4829
==> EPSV ... done. ==> RETR preseed.cfg ... done.
Length: 4829 (4.7K) (unauthoritative)

preseed.cfg 100%[===================>] 4.72K --.-KB/s ...

Read more...

Changed in preseed (Ubuntu):
status: Confirmed → Invalid
Changed in ubuntu-z-systems:
status: Confirmed → Invalid
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-08-07 02:07 EDT-------
IBM Bugzilla status -> closed. Invalid, Not a Bug...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.