Private PPA has a pending publication for hours

Bug #2017522 reported by Jürgen Gmach
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Jürgen Gmach

Bug Description

Reported by Andy Whitcroft in internal ~Launchpad channel at UTC 0930.

Related branches

Revision history for this message
Jürgen Gmach (jugmac00) wrote :

relevant logfile ouput

```
2023-04-24 09:45:08 ERROR Unhandled exception
Traceback (most recent call last):
  File "/srv/launchpad.net/production/launchpad-rev-90e2150bef31b411d7bae5c4032c7e320fcaaec8/lib/lp/services/scripts/base.py", line 93, in log_unhandled_exceptions_func
    return func(self, *args, **kw)
  File "/srv/launchpad.net/production/launchpad-rev-90e2150bef31b411d7bae5c4032c7e320fcaaec8/lib/lp/services/scripts/base.py", line 371, in lock_and_run
    self.run(use_web_security=use_web_security, isolation=isolation)
  File "/srv/launchpad.net/production/launchpad-rev-90e2150bef31b411d7bae5c4032c7e320fcaaec8/lib/lp/services/scripts/base.py", line 93, in log_unhandled_exceptions_func
    return func(self, *args, **kw)
  File "/srv/launchpad.net/production/launchpad-rev-90e2150bef31b411d7bae5c4032c7e320fcaaec8/lib/lp/services/scripts/base.py", line 321, in run
    self.main()
  File "/srv/launchpad.net/production/launchpad-rev-90e2150bef31b411d7bae5c4032c7e320fcaaec8/lib/lp/archivepublisher/scripts/publishdistro.py", line 710, in main
    archive_id, reset_store=reset_store_between_archives
  File "/srv/launchpad.net/production/launchpad-rev-90e2150bef31b411d7bae5c4032c7e320fcaaec8/lib/lp/archivepublisher/scripts/publishdistro.py", line 582, in processArchive
    self.publishArchive(archive, publisher)
  File "/srv/launchpad.net/production/launchpad-rev-90e2150bef31b411d7bae5c4032c7e320fcaaec8/lib/lp/archivepublisher/scripts/publishdistro.py", line 541, in publishArchive
    archive, dirty_suite
  File "/srv/launchpad.net/production/launchpad-rev-90e2150bef31b411d7bae5c4032c7e320fcaaec8/lib/lp/archivepublisher/scripts/publishdistro.py", line 467, in syncOVALDataFilesForSuite
    staged_oval_data_dir, dest_dir
  File "/srv/launchpad.net/production/launchpad-rev-90e2150bef31b411d7bae5c4032c7e320fcaaec8/lib/lp/archivepublisher/scripts/publishdistro.py", line 441, in synchronizeSecondDirectoryWithFirst
    os.unlink(str(second_dir / file))
IsADirectoryError: [Errno 21] Is a directory: '/srv/launchpad.net/ppa-archive/cloud-images/gke-1.22/ubuntu/dists/focal/main/oval/by-hash'
2023-04-24 09:45:08 INFO OOPS-22780febd6b786ee481d93d0f31b7db0
+ /srv/launchpad.net/production/launchpad/cronscripts/publishing/../../scripts/publish-distro.py -v --private-ppa -d ubuntu
lockfile: Sorry, giving up on "/srv/launchpad.net/ppa-archive/.lock"
++ echo 'Could not claim lock file.'
Could not claim lock file.
++ exit 1
```

Revision history for this message
Jürgen Gmach (jugmac00) wrote :

=> regression from recent changes for OVAL data distribution

Revision history for this message
Jürgen Gmach (jugmac00) wrote :

Cowboy deployed at UTC 1146 by @ballot.

```
diff --git a/lib/lp/archivepublisher/scripts/publishdistro.py b/lib/lp/archivepublisher/scripts/publishdistro.py
index 754c0bf3144..ea515f17dd7 100644
--- a/lib/lp/archivepublisher/scripts/publishdistro.py
+++ b/lib/lp/archivepublisher/scripts/publishdistro.py
@@ -438,7 +438,10 @@ def synchronizeSecondDirectoryWithFirst(self, first_dir, second_dir):
             copy(str(first_dir / file), str(second_dir))

         for file in files_to_delete:
- os.unlink(str(second_dir / file))
+ try:
+ os.unlink(str(second_dir / file))
+ except IsADirectoryError:
+ pass

         return bool(files_to_copy) or bool(files_to_delete)
```

Revision history for this message
Jürgen Gmach (jugmac00) wrote :

Last occurrence of the issue before the cowboy OOPS-1f4f70ff67b93d667fcfc4680644a7f9

Revision history for this message
Jürgen Gmach (jugmac00) wrote :

Cowboy has been applied, and the publisher resumed work.

Jürgen Gmach (jugmac00)
Changed in launchpad:
importance: Undecided → High
assignee: nobody → Jürgen Gmach (jugmac00)
status: New → In Progress
Jürgen Gmach (jugmac00)
Changed in launchpad:
status: In Progress → Fix Committed
Colin Watson (cjwatson)
Changed in launchpad:
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.