[Bug 1630909] Re: failing console access on s390x

ChristianEhrhardt 1630909 at bugs.launchpad.net
Wed Feb 8 14:27:31 UTC 2017


I hit the same - or very very similar - on ppc64el today.

After a:
adt-buildvm-ubuntu-cloud -a ppc64el -r zesty -s 20G -m http://ports.ubuntu.com/ubuntu-ports

Things are not working.

-serial there maps to hvc consoles.
The first is always the normal boot console and that is fine as it eventually is a login console.
But the root console on ttyS1 socket is not set up correctly.
The second -serial argument that autopkgtest adds is mapped to hvc1 by the guest.
That and the fact that the setup commands did not run correctly renders it useless.

To get it working let the guest spawn a root console on hvc1 and autpkgtest will works there:
To do so I went into the base image:
$ sudo kvm -m 2048 -smp 4 -nographic -net nic,model=virtio -net user,hostfwd=tcp::10022-:22 -drive file=/home/ubuntu/cpaelzer/adt-zesty-ppc64el-cloud.img,cache=unsafe,if=virtio,index=0

There I placed a modified version of the autpkgtest.service file (hvc1 instead of ttyS1)
[Unit]                                                                              
Description=autopkgtest root shell on hvc1                                         
ConditionPathExists=/dev/hvc1                                                      
                                                                                    
[Service]                                                                           
ExecStart=/bin/sh
StandardInput=tty-fail                                                              
StandardOutput=tty                                                               
StandardError=tty                                                                
TTYPath=/dev/hvc1                                                               
SendSIGHUP=yes                                                                   
# ignore I/O errors on unusable hvc1                                            
SuccessExitStatus=0 208 SIGHUP SIGINT SIGTERM SIGPIPE                            
                                                                                 
[Install]                                                                        
WantedBy=multi-user.target

And finally I had to explicitly enable it in this case:
$ systemctl enable autopkgtest


When reproducing with the double -serial arg set in direct invocation I could confirm that htere is now a /bin/sh spawned on hvc1

After shutting down from that autopkgtest worked on ppc64el

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to autopkgtest in Ubuntu.
https://bugs.launchpad.net/bugs/1630909

Title:
  failing console access on s390x

Status in autopkgtest package in Ubuntu:
  New

Bug description:
  Hi,
  as discussed on IRC a bit I wanted to create an s390x ADT environment but failed to do so.
  It seems the extra consoles are not created correctly.

  This dumps that state so far to be debugged and fixed later on - or
  for whoever runs into the same to find it via searching.

  Creating a new image works as long as one specifies the alternative
  ports mirror

  sudo ~/autopkgtest-4.1/tools/autopkgtest-buildvm-ubuntu-cloud -v
  --arch=s390x --mirror=http://ports.ubuntu.com/ubuntu-ports -r yakkety
  -s 10G

  But then running a test fails like this:
  (yes I know old syntax)
  sudo ~/autopkgtest-4.1/runner/adt-run -ddd --shell-fail --apt-upgrade --no-built-binaries --source neutron_9.0.0~rc3-0ubuntu1.dsc --- adt-virt-qemu --cpus 4 --ram-size=2048 ~/autopkgtest-yakkety-s390x.img
  adt-run: WARNING: "adt-run" is deprecated, please use "autopkgtest" (see manpage)
  adt-run: DBG: Parsed options: Namespace(apt_pocket=[], auto_control=True, build_parallel=None, copy=[], env=[], gainroot=None, logfile=None, output_dir=None, set_lang=None, setup_commands=['(apt-get update || (sleep 15; apt-get update) || (sleep 60; apt-get update) || false) && $(which eatmydata || true) apt-get dist-upgrade -y -o Dpkg::Options::="--force-confnew"'], shell=False, shell_fail=True, summary=None, timeout_build=None, timeout_copy=None, timeout_factor=1.0, timeout_install=None, timeout_short=None, timeout_test=None, user=None, verbosity=2)                                                                                                                           
  adt-run: DBG: Remaining arguments: ['--no-built-binaries', '--source', 'neutron_9.0.0~rc3-0ubuntu1.dsc']                                                                  
  adt-run: DBG: Interpreted actions: ['--no-built-binaries', '--source', 'neutron_9.0.0~rc3-0ubuntu1.dsc']                                                                  
  adt-run: DBG: Virt runner arguments: ['adt-virt-qemu', '--cpus', '4', '--ram-size=2048', '/home/ubuntu/autopkgtest-yakkety-s390x.img']                                    
  adt-run: DBG: testbed init                                                                                                                                                
  adt-run [04:29:22]: version @version@
  adt-run [04:29:22]: host s1lp5; command line: /home/ubuntu/autopkgtest-4.1/runner/adt-run -ddd --shell-fail --apt-upgrade --no-built-binaries --source 'neutron_9.0.0~rc3-0ubuntu1.dsc' --- adt-virt-qemu --cpus 4 --ram-size=2048 /home/ubuntu/autopkgtest-yakkety-s390x.img                                                                       
  adt-run: DBG: got reply from testbed: ok
  adt-run: DBG: testbed open, scratch=None                                                                                                                                  
  adt-run: DBG: sending command to testbed: open                                                                                                                            
  adt-run: DBG: got reply from testbed: Using SCSI scheme.                                                                                                                  
  adt-run: DBG: TestbedFailure sent `open', got `Using SCSI scheme.', expected `ok...'                                                                                      
  adt-run: DBG: testbed stop                                                                                                                                                
  adt-run: DBG: testbed close, scratch=None                                                                                                                                 
  adt-run: DBG: sending command to testbed: quit                                                                                                                            
  qemu-system-s390x: terminating on signal 15 from pid 53355
  <VirtSubproc>: failure: timed out waiting for "login prompt on ttyS0"


  After discussing on IRC I understood that it checks for a loginn on ttyS0 or as fallback a root shell on ttyS1.
  But it seems none of those get spawned.

  I was able to boot the image just fine with:
  sudo qemu-system-s390x -m 2048 -smp 4 -nographic -net nic,model=virtio -net user,hostfwd=tcp::10022-:22 -drive file=/home/ubuntu/autopkgtest-yakkety-s390x.img,cache=unsafe,if=virtio,index=0 -enable-kvm

  But one has to note that in this case the default console is
  automatically connected to stdio (due to -nographics) and the mode it
  a sclp console.

  I can add a virtio-serial console and get a valid non sclp console by appending:
  -chardev socket,path=/tmp/port0,server,nowait,id=port0-char -device virtio-serial -device virtserialport,id=port1,name=org.fedoraproject.port.0,chardev=port0-char

  I can add more serial consoles on unix sockets as autopkgttest does, but nothing appears on these sockets (only monitor gets some content).
  -serial unix:/tmp/testadt/ttyS0,server,nowait  -serial unix:/tmp/testadt/ttyS1,server,nowait -monitor unix:/tmp/testadt/monitor,server,nowait

  In the guest no device appears for any of those, so no tty can spawn on them:
  ll /dev/tty*
  crw-rw-rw- 1 root   tty 5,  0 Oct  6 00:18 /dev/tty
  crw------- 1 ubuntu tty 4, 65 Oct  6 05:16 /dev/ttysclp0

  
  I feel I should know how to configure it further to get valid consoles, but I'd read some docs first so documenting the current state for now.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/autopkgtest/+bug/1630909/+subscriptions



More information about the foundations-bugs mailing list