maas-import-pxe-files fails to update ephemeral images

Bug #1182646 reported by Andres Rodriguez
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
maas (Ubuntu)
Fix Released
High
Unassigned
Raring
Fix Released
High
Unassigned

Bug Description

Wed, 22 May 2013 21:54:59 +0100: finished. wrote to /var/lib/maas/ephemeral/.working/maas-import-ephemerals.mnccmE/precise/amd64/dist-root.tar.gz
cmd failed: maas-provision install-pxe-image --arch=amd64 --subarch=generic --release=precise --purpose=commissioning --image=/tmp/tmp.KQXnCcCqmc --symlink=xinstall
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/lib/python2.7/dist-packages/provisioningserver/__main__.py", line 39, in <module>
    main()
  File "/usr/lib/python2.7/dist-packages/provisioningserver/utils.py", line 400, in __call__
    self.execute(argv)
  File "/usr/lib/python2.7/dist-packages/provisioningserver/utils.py", line 395, in execute
    args.handler.run(args)
  File "/usr/lib/python2.7/dist-packages/provisioningserver/pxe/install_image.py", line 165, in run
    install_dir(args.image, destination, args.symlink)
  File "/usr/lib/python2.7/dist-packages/provisioningserver/pxe/install_image.py", line 127, in install_dir
    os.symlink(old, sdest)
OSError: [Errno 17] File exists
failed to install tftp image [rel: precise, arch: amd64: name: maas-precise-daily-amd64-ephemeral-20130520]

[Impact]
If new ephemeral images are ready to be installed, maas-import-* scripts fail because it cannot overwrite a symlink that has been created to support FPI. This prevents maas from importing new ephemeral images.

[Test Case]
1. Install maas.
2. maas-import-pxe-files
3. edit /etc/maas/import_ephemerals and add STREAM="daily"
4. run maas-import-pxe-files again, it will download a newer ephemeral image and will fail to install it.
5. Apply the fix.
6. Run maas-import-pxe-files again, and it will install the image successfully.

[Regression Potential]
Minimal, this make sure that a new image being imported gets installed successfully.

Changed in maas (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Changed in maas (Ubuntu Raring):
importance: Undecided → High
Changed in maas (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package maas - 1.3+bzr1461+dfsg-0ubuntu3

---------------
maas (1.3+bzr1461+dfsg-0ubuntu3) saucy; urgency=low

  * debian/patches:
    - 99-fix-ipmi-stat-lp1086160.patch: Drop. The following patch removes
      the need for this fix. (LP: #1171988)
    - 99-fix-ipmi-lp1171418.patch: Do not check current node state when
      executing an ipmi command, which ensures that nodes are always
      turned on/off regardless of their power state. This fixes corner
      cases found when running automated tests. (LP: #1171418)
    - 99-fix-comissioning-lp1131418.patch: Fixes the commissioning process,
      allowing nodes to successfully commission, when tag's with no
      definition have been created. This issue will only appear when these
      special tags are created. (LP: #1131418)
    - 99-import-raring-images-lp1182642.patch: Enables the import of raring
      images by default (LP: #1182642)
    - 99-fix-new-image-install-lp1182646.patch: Fixes the installation of
      new ephemeral images, that fail due to not being able to overwrite
      a symlink. (LP: #1182646)
 -- Andres Rodriguez <email address hidden> Tue, 23 Apr 2013 14:02:33 -0400

Changed in maas (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in maas (Ubuntu Raring):
status: New → Confirmed
description: updated
Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello Andres, or anyone else affected,

Accepted maas into raring-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/maas/1.3+bzr1461+dfsg-0ubuntu2.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 maas (Ubuntu Raring):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Andres Rodriguez (andreserl) wrote :

I have tested this and works as expected!

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package maas - 1.3+bzr1461+dfsg-0ubuntu2.1

---------------
maas (1.3+bzr1461+dfsg-0ubuntu2.1) raring-proposed; urgency=low

  * debian/patches:
    - 99-fix-ipmi-stat-lp1086160.patch: Drop. The following patch removes
      the need for this fix. (LP: #1171988)
    - 99-fix-ipmi-lp1171418.patch: Do not check current node state when
      executing an ipmi command, which ensures that nodes are always
      turned on/off regardless of their power state. This fixes corner
      cases found when running automated tests. (LP: #1171418)
    - 99-fix-comissioning-lp1131418.patch: Fixes the commissioning process,
      allowing nodes to successfully commission, when tag's with no
      definition have been created. This issue will only appear when these
      special tags are created. (LP: #1131418)
    - 99-import-raring-images-lp1182642.patch: Enables the import of raring
      images by default (LP: #1182642)
    - 99-fix-new-image-install-lp1182646.patch: Fixes the installation of
      new ephemeral images, that fail due to not being able to overwrite
      a symlink. (LP: #1182646)
 -- Andres Rodriguez <email address hidden> Tue, 23 Apr 2013 14:02:33 -0400

Changed in maas (Ubuntu Raring):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of this Stable Release Update 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 regresssions.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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