Report boot images no directory traceback

Bug #1301809 reported by Adam Collard on 2014-04-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Critical
Raphaël Badin
1.5
Critical
Raphaël Badin
maas (Ubuntu)
Undecided
Unassigned

Bug Description

After upgrading from 1.5+bzr1977-0ubuntu4 to 1.5+bzr2204-0ubuntu1, I get a traceback in the logs regarding reporting of boot images.

[2014-04-03 08:28:43,277: INFO/MainProcess] Received task: provisioningserver.tasks.report_boot_images[9f6e6aad-c7b2-40cf-9a06-1d532ace23a2] expires:[2014-04-03 08:33:42.337439+00:00]
[2014-04-03 08:28:45,796: ERROR/Worker-5] report_boot_images: [Errno 2] No such file or directory: '/var/lib/maas/boot-resources//current/'
[2014-04-03 08:28:45,851: ERROR/MainProcess] Task provisioningserver.tasks.report_boot_images[9f6e6aad-c7b2-40cf-9a06-1d532ace23a2] raised unexpected: OSError(2, 'No such file or directory')
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/celery/app/trace.py", line 218, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/celery/app/trace.py", line 398, in __protected_call__
    return self.run(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/provisioningserver/tasks.py", line 93, in wrapper
    func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/provisioningserver/tasks.py", line 409, in report_boot_images
    boot_images.report_to_server()
  File "/usr/lib/python2.7/dist-packages/provisioningserver/boot_images.py", line 68, in report_to_server
    BootConfig.load_from_cache()['boot']['storage'] + '/current/')
  File "/usr/lib/python2.7/dist-packages/provisioningserver/boot/tftppath.py", line 138, in list_boot_images
    potential_archs = list_subdirs(tftproot)
  File "/usr/lib/python2.7/dist-packages/provisioningserver/boot/tftppath.py", line 72, in list_subdirs
    for subdir in os.listdir(directory)
OSError: [Errno 2] No such file or directory: '/var/lib/maas/boot-resources//current/'

ubuntu@atlas:~⟫ dpkg -l '*maas*'|cat
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===================================-=============================-============-===============================================================================
ii maas 1.5+bzr2204-0ubuntu1 all MAAS server all-in-one metapackage
ii maas-cli 1.5+bzr2204-0ubuntu1 all MAAS command line API tool
ii maas-cluster-controller 1.5+bzr2204-0ubuntu1 all MAAS server cluster controller
ii maas-common 1.5+bzr2204-0ubuntu1 all MAAS server common files
ii maas-dhcp 1.5+bzr2204-0ubuntu1 all MAAS DHCP server
ii maas-dns 1.5+bzr2204-0ubuntu1 all MAAS DNS server
ii maas-region-controller 1.5+bzr2204-0ubuntu1 all MAAS server complete region controller
ii maas-region-controller-min 1.5+bzr2204-0ubuntu1 all MAAS Server minimum region controller
ii python-django-maas 1.5+bzr2204-0ubuntu1 all MAAS server Django web framework
ii python-maas-client 1.5+bzr2204-0ubuntu1 all MAAS python API client
ii python-maas-provisioningserver 1.5+bzr2204-0ubuntu1 all MAAS server provisioning libraries

Related branches

Adam Collard (adam-collard) wrote :

After I asked the cluster controller to import boot images, the directory was created and report_boot_images tasks are now reported as successful.

Perhaps this is a packaging bug to create that directory upfront? Not sure whose responsibility it is, but marking as affecting Ubuntu MAAS too.

Raphaël Badin (rvb) wrote :

Well, it's the reporting task that broke because of the absence of '/var/lib/maas/boot-resources/current/'. The easiest way to fix this is to change the reporting task so that it copes with that.

Changed in maas:
importance: Undecided → Critical
status: New → Triaged
Raphaël Badin (rvb) on 2014-04-03
Changed in maas:
milestone: none → 14.10
assignee: nobody → Raphaël Badin (rvb)
status: Triaged → In Progress
Raphaël Badin (rvb) on 2014-04-03
Changed in maas:
status: In Progress → Fix Committed
Changed in maas (Ubuntu):
status: New → Confirmed
Changed in maas:
milestone: 14.10 → none
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers