curtin output badly broken. command errors ignored.

Bug #1371218 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin
Fix Released
Critical
Blake Rouse
curtin (Ubuntu)
Fix Released
Undecided
Blake Rouse

Bug Description

This regressed with the 'reporter' code in revno 163.
The following shows a number of issues:
 a.) cannot run as non-root (as it wants to write to /var/log/curtin_install.log)
 b.) failure codes are ignored causing stage commands to run even after one fails
 c.) output is duplicated
 d.) *old* output from /var/log/curtin_install.log is written to console

$ cat foo.cfg
stages: ['foo']
foo_commands:
  builtin: ['sh', '-c', 'echo FOO_BUILTIN; exit 1;']
  zz: ['sh', '-c', 'echo FOO_ZZ']

$ cat bar.cfg
stages: ['bar']
bar_commands:
  builtin: ['sh', '-c', 'echo BAR_BUILTIN; exit 1;']
  zz: ['sh', '-c', 'echo BAR_ZZ']

$ sudo rm /var/log/curtin_install.log

$ ./bin/curtin -v install --config=foo.cfg my-source
'reporter' not found in config file.
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/ubuntu/curtin.dist/curtin/commands/install.py", line 121, in _run_thread
    with io.open(INSTALL_LOG, 'a') as writer, \
IOError: [Errno 13] Permission denied: '/var/log/curtin_install.log'

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/ubuntu/curtin.dist/curtin/commands/install.py", line 121, in _run_thread
    with io.open(INSTALL_LOG, 'a') as writer, \
IOError: [Errno 13] Permission denied: '/var/log/curtin_install.log'

[Errno 13] Permission denied: '/var/log/curtin_install.log'

$ sudo ./bin/curtin -v install --config=foo.cfg my-source
'reporter' not found in config file.

FOO_BUILTIN
FOO_BUILTIN

FOO_BUILTIN
FOO_BUILTIN

FOO_ZZ
FOO_ZZ

$ sudo ./bin/curtin -v install --config=bar.cfg my-source
'reporter' not found in config file.
FOO_BUILTIN
FOO_ZZ
FOO_BUILTIN
FOO_ZZ
Installation finished.
Installation finished.BAR_BUILTIN
BAR_BUILTIN

FOO_BUILTIN
FOO_ZZ
Installation finished.BAR_BUILTIN
FOO_BUILTIN
FOO_ZZ
Installation finished.BAR_BUILTIN

BAR_ZZ
BAR_ZZ

Changed in curtin:
assignee: nobody → Blake Rouse (blake-rouse)
status: New → Triaged
status: Triaged → In Progress
importance: Undecided → Critical
Changed in curtin (Ubuntu):
status: New → Confirmed
assignee: nobody → Blake Rouse (blake-rouse)
Changed in curtin:
status: In Progress → Fix Committed
Changed in curtin (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package curtin - 0.1.0~bzr190-0ubuntu1

---------------
curtin (0.1.0~bzr190-0ubuntu1) utopic; urgency=medium

  * New upstream snapshot.
    * add log reporter (LP: #1369129, LP: #1371218)
    * allow debug messages of helper programs to be seen
    * fix 'make check'
    * handle utf-8 output correctly. (LP: #1370249)
    * set root device correctly on ppc64 (LP: #1371133)
    * call update-grub to ensure grub.cfg is written (LP: #1373137)
    * fix dd-tgz mode, only call partprobe on target device.
 -- Scott Moser <email address hidden> Fri, 26 Sep 2014 17:26:34 -0400

Changed in curtin (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Scott Moser (smoser) wrote : Fixed in Curtin 17.1

This bug is believed to be fixed in curtin in 17.1. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in curtin:
status: Fix Committed → Fix Released
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.