[Bug 2151640] [NEW] Falling back to default sources raises AttributeError if archive.ubuntu.com is unreachable

Simon Johnsson 2151640 at bugs.launchpad.net
Wed May 6 15:48:32 UTC 2026


Public bug reported:

If the upgrader fails its url_downloadable check from
http://archive.ubuntu.com (while apt update succeeds), it will prompt
for the default sources to be restored. If yes is selected, an
AttributeError will be raised as the _addDefaultSources() function
attempts to set a property (suites) without a setter.

Example:


Reading cache

Checking package manager

Reading package lists... 0%

Reading package lists... 100%

Reading package lists... Done

Building dependency tree... 0%

Building dependency tree... 0%

Building dependency tree... 50%

Building dependency tree... 50%

Building dependency tree... Done

Reading state information... 0%
 
Reading state information... 0%
 

Reading state information... Done

0% [Working]                                                                 
0% [Working]                                                                 
0% [Connecting to archive.ubuntu.com]                                        
0% [Connecting to archive.ubuntu.com]                                        
0% [Connecting to archive.ubuntu.com (104.20.28.246)]                        
0% [Connecting to archive.ubuntu.com (104.20.28.246)]                        
0% [Connecting to archive.ubuntu.com (104.20.28.246)]                        
0% [Connecting to archive.ubuntu.com (104.20.28.246)]                        
0% [Connected to archive.ubuntu.com (104.20.28.246)]                         
0% [Connected to archive.ubuntu.com (104.20.28.246)]                         
0% [Waiting for headers] [Connecting to security.ubuntu.com]                 
0% [Waiting for headers] [Connecting to security.ubuntu.com]                 
0% [Waiting for headers]                                                     
0% [Waiting for headers]                                                     
0% [Waiting for headers] [Connected to security.ubuntu.com (172.66.152.176)] 
0% [Waiting for headers] [Connected to security.ubuntu.com (172.66.152.176)] 
0% [Waiting for headers] [Waiting for headers]                               
0% [Waiting for headers] [Waiting for headers]                               
Hit http://archive.ubuntu.com/ubuntu noble InRelease                         

0% [Waiting for headers]                                                     
0% [Waiting for headers]                                                     
0% [Waiting for headers] [Waiting for headers]                               
0% [Waiting for headers] [Waiting for headers]                               
Hit http://security.ubuntu.com/ubuntu noble-security InRelease               

0% [Waiting for headers]                                                     
0% [Waiting for headers]                                                     
87% [Waiting for headers]                                                    
87% [Waiting for headers]                                                    
87% [Waiting for headers]                                                    
87% [Waiting for headers]                                                    
95% [Waiting for headers]                                                    
95% [Waiting for headers]                                                    
Hit http://archive.ubuntu.com/ubuntu noble-updates InRelease                 

95% [Working]                                                                
95% [Working]                                                                
95% [Waiting for headers]                                                    
95% [Waiting for headers]                                                    
97% [Waiting for headers]                                                    
97% [Waiting for headers]                                                    
Hit http://archive.ubuntu.com/ubuntu noble-backports InRelease               

97% [Working]                                                                
97% [Working]                                                                
97% [Working]                                                                
97% [Working]                                                                
99% [Working]                                                                
99% [Working]                                                                
Fetched 0 B in 0s (0 B/s)                                                    

Reading package lists... 0%
      
Reading package lists... 100%
    

Reading package lists... Done

Building dependency tree... 0%
   
Building dependency tree... 0%
   
Building dependency tree... 50%
  
Building dependency tree... 50%
  

Building dependency tree... Done

Reading state information... 0%
  
Reading state information... 0%
  

Reading state information... Done
No snaps are installed yet. Try 'snap install hello-world'.

Checking for installed snaps

Calculating snap size requirements

Updating repository information

Required apt sources are missing

This is probably because one or more of the following mirrors are 
out-of-date or unreachable: 

http://archive.ubuntu.com/ubuntu

Would you like to continue the upgrade using default sources? If you 
select 'No', the upgrade will be aborted. 

Continue [yN] y

Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-7d18weqn/resolute", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/tmp/ubuntu-release-upgrader-7d18weqn/DistUpgrade/DistUpgradeMain.py", line 235, in main
    if app.run():
       ^^^^^^^^^
  File "/tmp/ubuntu-release-upgrader-7d18weqn/DistUpgrade/DistUpgradeController.py", line 2014, in run
    return self.fullUpgrade()
           ^^^^^^^^^^^^^^^^^^
  File "/tmp/ubuntu-release-upgrader-7d18weqn/DistUpgrade/DistUpgradeController.py", line 1876, in fullUpgrade
    if not self.updateDeb822Sources():
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/ubuntu-release-upgrader-7d18weqn/DistUpgrade/DistUpgradeController.py", line 1061, in updateDeb822Sources
    if not self.rewriteDeb822Sources():
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/ubuntu-release-upgrader-7d18weqn/DistUpgrade/DistUpgradeController.py", line 1048, in rewriteDeb822Sources
    self._addDefaultSources()
  File "/tmp/ubuntu-release-upgrader-7d18weqn/DistUpgrade/DistUpgradeController.py", line 805, in _addDefaultSources
    e.suites = sorted([self.toDist, self.toDist + '-updates'],
    ^^^^^^^^
AttributeError: property 'suites' of 'ExplodedDeb822SourceEntry' object has no setter

*** Send problem report to the developers?

After the problem report has been sent, please fill out the form in the
automatically opened web browser.

What would you like to do? Your options are:
  S: Send report (39.4 KB)
  V: View report
  K: Keep report file for sending later or copying to somewhere else
  I: Cancel and ignore future crashes of this program version
  C: Cancel
Please choose (S/V/K/I/C): c


=== Command terminated with exit status 1 (Wed May  6 15:45:29 2026) ===

** Affects: ubuntu-release-upgrader (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubuntu-release-upgrader in
Ubuntu.
https://bugs.launchpad.net/bugs/2151640

Title:
  Falling back to default sources raises AttributeError if
  archive.ubuntu.com is unreachable

Status in ubuntu-release-upgrader package in Ubuntu:
  New

Bug description:
  If the upgrader fails its url_downloadable check from
  http://archive.ubuntu.com (while apt update succeeds), it will prompt
  for the default sources to be restored. If yes is selected, an
  AttributeError will be raised as the _addDefaultSources() function
  attempts to set a property (suites) without a setter.

  Example:

  
  Reading cache

  Checking package manager

  Reading package lists... 0%

  Reading package lists... 100%

  Reading package lists... Done

  Building dependency tree... 0%

  Building dependency tree... 0%

  Building dependency tree... 50%

  Building dependency tree... 50%

  Building dependency tree... Done

  Reading state information... 0%
   
  Reading state information... 0%
   

  Reading state information... Done

  0% [Working]                                                                 
  0% [Working]                                                                 
  0% [Connecting to archive.ubuntu.com]                                        
  0% [Connecting to archive.ubuntu.com]                                        
  0% [Connecting to archive.ubuntu.com (104.20.28.246)]                        
  0% [Connecting to archive.ubuntu.com (104.20.28.246)]                        
  0% [Connecting to archive.ubuntu.com (104.20.28.246)]                        
  0% [Connecting to archive.ubuntu.com (104.20.28.246)]                        
  0% [Connected to archive.ubuntu.com (104.20.28.246)]                         
  0% [Connected to archive.ubuntu.com (104.20.28.246)]                         
  0% [Waiting for headers] [Connecting to security.ubuntu.com]                 
  0% [Waiting for headers] [Connecting to security.ubuntu.com]                 
  0% [Waiting for headers]                                                     
  0% [Waiting for headers]                                                     
  0% [Waiting for headers] [Connected to security.ubuntu.com (172.66.152.176)] 
  0% [Waiting for headers] [Connected to security.ubuntu.com (172.66.152.176)] 
  0% [Waiting for headers] [Waiting for headers]                               
  0% [Waiting for headers] [Waiting for headers]                               
  Hit http://archive.ubuntu.com/ubuntu noble InRelease                         

  0% [Waiting for headers]                                                     
  0% [Waiting for headers]                                                     
  0% [Waiting for headers] [Waiting for headers]                               
  0% [Waiting for headers] [Waiting for headers]                               
  Hit http://security.ubuntu.com/ubuntu noble-security InRelease               

  0% [Waiting for headers]                                                     
  0% [Waiting for headers]                                                     
  87% [Waiting for headers]                                                    
  87% [Waiting for headers]                                                    
  87% [Waiting for headers]                                                    
  87% [Waiting for headers]                                                    
  95% [Waiting for headers]                                                    
  95% [Waiting for headers]                                                    
  Hit http://archive.ubuntu.com/ubuntu noble-updates InRelease                 

  95% [Working]                                                                
  95% [Working]                                                                
  95% [Waiting for headers]                                                    
  95% [Waiting for headers]                                                    
  97% [Waiting for headers]                                                    
  97% [Waiting for headers]                                                    
  Hit http://archive.ubuntu.com/ubuntu noble-backports InRelease               

  97% [Working]                                                                
  97% [Working]                                                                
  97% [Working]                                                                
  97% [Working]                                                                
  99% [Working]                                                                
  99% [Working]                                                                
  Fetched 0 B in 0s (0 B/s)                                                    

  Reading package lists... 0%
        
  Reading package lists... 100%
      

  Reading package lists... Done

  Building dependency tree... 0%
     
  Building dependency tree... 0%
     
  Building dependency tree... 50%
    
  Building dependency tree... 50%
    

  Building dependency tree... Done

  Reading state information... 0%
    
  Reading state information... 0%
    

  Reading state information... Done
  No snaps are installed yet. Try 'snap install hello-world'.

  Checking for installed snaps

  Calculating snap size requirements

  Updating repository information

  Required apt sources are missing

  This is probably because one or more of the following mirrors are 
  out-of-date or unreachable: 

  http://archive.ubuntu.com/ubuntu

  Would you like to continue the upgrade using default sources? If you 
  select 'No', the upgrade will be aborted. 

  Continue [yN] y

  Traceback (most recent call last):
    File "/tmp/ubuntu-release-upgrader-7d18weqn/resolute", line 8, in <module>
      sys.exit(main())
               ^^^^^^
    File "/tmp/ubuntu-release-upgrader-7d18weqn/DistUpgrade/DistUpgradeMain.py", line 235, in main
      if app.run():
         ^^^^^^^^^
    File "/tmp/ubuntu-release-upgrader-7d18weqn/DistUpgrade/DistUpgradeController.py", line 2014, in run
      return self.fullUpgrade()
             ^^^^^^^^^^^^^^^^^^
    File "/tmp/ubuntu-release-upgrader-7d18weqn/DistUpgrade/DistUpgradeController.py", line 1876, in fullUpgrade
      if not self.updateDeb822Sources():
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/ubuntu-release-upgrader-7d18weqn/DistUpgrade/DistUpgradeController.py", line 1061, in updateDeb822Sources
      if not self.rewriteDeb822Sources():
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/ubuntu-release-upgrader-7d18weqn/DistUpgrade/DistUpgradeController.py", line 1048, in rewriteDeb822Sources
      self._addDefaultSources()
    File "/tmp/ubuntu-release-upgrader-7d18weqn/DistUpgrade/DistUpgradeController.py", line 805, in _addDefaultSources
      e.suites = sorted([self.toDist, self.toDist + '-updates'],
      ^^^^^^^^
  AttributeError: property 'suites' of 'ExplodedDeb822SourceEntry' object has no setter

  *** Send problem report to the developers?

  After the problem report has been sent, please fill out the form in the
  automatically opened web browser.

  What would you like to do? Your options are:
    S: Send report (39.4 KB)
    V: View report
    K: Keep report file for sending later or copying to somewhere else
    I: Cancel and ignore future crashes of this program version
    C: Cancel
  Please choose (S/V/K/I/C): c

  
  === Command terminated with exit status 1 (Wed May  6 15:45:29 2026) ===

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/2151640/+subscriptions





More information about the foundations-bugs mailing list