traceback in simplestreams when release folder doesn't exist

Bug #1991340 reported by Brian Murray
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu CD Images
New
High
Łukasz Zemczak

Bug Description

We ran into a Traceback when working on the Kinetic Beta release and running the following command:

ARCHES='amd64' for-project ubuntustudio publish-release dvd 20220928.1 dvd named beta

Traceback (most recent call last):
  File "/home/cdimage/bin/publish-release", line 62, in <module>
    main()
  File "/home/cdimage/bin/publish-release", line 58, in main
    publisher.publish_release(source, date, publish_type)
  File "/srv/cdimage.ubuntu.com/bin/../lib/cdimage/tree.py", line 3722, in publish_release
    self.refresh_simplestreams()
  File "/srv/cdimage.ubuntu.com/bin/../lib/cdimage/tree.py", line 1816, in refresh_simplestreams
    sstreams.generate()
  File "/srv/cdimage.ubuntu.com/bin/../lib/cdimage/simplestreams.py", line 228, in generate
    self.scan_tree()
  File "/srv/cdimage.ubuntu.com/bin/../lib/cdimage/simplestreams.py", line 342, in scan_tree
    self.scan_releases_project(project_dir, entry)
  File "/srv/cdimage.ubuntu.com/bin/../lib/cdimage/simplestreams.py", line 327, in scan_releases_project
    self.scan_target(target_dir, series, project, None, None)
  File "/srv/cdimage.ubuntu.com/bin/../lib/cdimage/simplestreams.py", line 182, in scan_target
    for file in os.listdir(target_dir):
FileNotFoundError: [Errno 2] No such file or directory: '/srv/cdimage.ubuntu.com/www/full/ubuntu/releases/kinetic/release'

I worked around it with the following cowboy as I didn't think we should have a release directory.

cdimage@ancientminister:~/cdimage$ bzr diff lib/cdimage/simplestreams.py
=== modified file 'lib/cdimage/simplestreams.py'
--- old/lib/cdimage/simplestreams.py 2021-10-21 14:17:18 +0000
+++ new/lib/cdimage/simplestreams.py 2022-09-29 23:57:30 +0000
@@ -321,9 +321,10 @@
                 # TODO: let's log this and continue
                 continue
             target_dir = os.path.join(releases_dir, entry, "release")
- # The image ID is the point version for now, since those should
- # be unique. This might still be up for discussion.
- self.scan_target(target_dir, series, project, None, None)
+ if os.path.exists(target_dir):
+ # The image ID is the point version for now, since those should
+ # be unique. This might still be up for discussion.
+ self.scan_target(target_dir, series, project, None, None)

     def scan_tree(self):
         """Scan all releases/ directories on cdimage."""

Changed in ubuntu-cdimage:
importance: Undecided → High
assignee: nobody → Łukasz Zemczak (sil2100)
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.