curtin hook does not execute /opt/curtin/finalize

Bug #1328521 reported by Scott Moser
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin
Fix Released
High
Scott Moser
curtin (Ubuntu)
Fix Released
High
Unassigned
Trusty
Fix Released
High
Unassigned

Bug Description

As reported by Gabriel (and Blake)
There is a small [but crippling] bug in:

http://bazaar.launchpad.net/~curtin-dev/curtin/trunk/view/head:/curtin/commands/hook.py#L41

that particular join will not have the desired effect. The second parameter must not contain a leading /. or it will become the root path.

>>> import os
>>>
>>> root_p = "/root"
>>> os.path.join(root_p, '/opt/curtin')
'/opt/curtin'
>>> os.path.join(root_p, 'opt/curtin')
'/root/opt/curtin'

SRU curtin
==========

[Impact]

 This bug doesn't allow curtin to execute /opt/curtin/finalize which is needed for finalizing the provided directory for the default target mount point during a curtin installation.

This fix needs to be backported to the stable release so that program can have the originally intended functionality.

This upload fixes the bug by enabling the finalize script to execute as originally intended.

[Test Case]

To reproduce the bug, follow the original bug report description. This can be verified by using a Python interpreter and the code changes that the patch supplies.

[Regression Potential]

Since the script was not executing as originally intended there would only be regressions in the event that other "band-aid" fixes were committed upstream to circumvent the undesirable effect that this had. This isn't the case so we believe the probability of this causing a regression is low.

Revision history for this message
Scott Moser (smoser) wrote :

fix-comitted in revno 130.

Changed in curtin:
assignee: nobody → Scott Moser (smoser)
importance: Undecided → High
status: New → Fix Committed
Changed in curtin (Ubuntu):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

  * New upstream snapshot.
    * add utility for parsing /etc/network/interfaces
    * aarm64 support [Newell Jensen]
      * run update-initramfs in aarm64
      * create boot partition when necessary (LP: #1338851 LP: #1340942)
    * know kernel mapping for utopic (3.16)
    * properly write fstype into /etc/fstab per provided fstype
    * add support for disk images as type 'dd-tgz'
    * correctly call finalize in target (LP: #1328521)
    * support invoking tar with --xattrs if available (LP: #1307636)
    * increase size of uefi partition to 512M (LP: #1306164)
 -- Scott Moser <email address hidden> Tue, 22 Jul 2014 18:53:38 -0400

Changed in curtin (Ubuntu):
status: Triaged → Fix Released
Scott Moser (smoser)
Changed in curtin (Ubuntu Trusty):
status: New → Confirmed
importance: Undecided → High
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Scott, or anyone else affected,

Accepted curtin into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/curtin/0.1.0~bzr195-0ubuntu1~14.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in curtin (Ubuntu Trusty):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Andres Rodriguez (andreserl) wrote :

We have tested this and confirm it works as expected, marking verification-done

tags: added: verification-done
removed: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for curtin has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
curtin (0.1.0~bzr195-0ubuntu1~14.04.1) trusty-proposed; urgency=medium

  * New upstream snapshot.
    - hardware enablement: ppc64 support (LP: #1386394)
    - hardware enablement: know kernel mapping for utopic (hwe-u = 3.16)
      (LP: #1386394)
    - feature: support installing disk images including windows. (LP: #1386394)
    - feature: support creating swap file (LP: #1386394)
    - feature: support reporting logs back to MAAS (LP: #1386394)
    - feature: enable logging of installation to /var/log/curtin/install.log
      (LP: #1378910)
    - bug fix: extract tar files with xattr support when available (LP: #1313550)
    - bug fix: fix broken use of os.path.join for curtin hooks (LP: #1328521)
    - bug fix: util.subp to decode command output as utf-8 (LP: #1370249).
    - bug fix: call update-grub to ensure that /boot/grub/grub.cfg is created
      (LP: #1373137)
    - bug fix: do not use '--acl' when extracting tar files (LP: #1382632)
      as it inadvertently writes default directory acls.
    - bug fix: invoke lsblk with '--output' rather than '--out' to avoid
      ambiguity in newer versions of lsblk (LP: #1386275)
    - internal: part2bd helper added in helpers/common
    - internal: helpers: inherit curtin_verbosity (make the helper tools
      verbose if curtin invoked with verbose flags)
 -- Scott Moser <email address hidden> Mon, 27 Oct 2014 20:58:43 -0400

Changed in curtin (Ubuntu Trusty):
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.