#63 koji-fix-build-symlink traceback when dir in DEFAULT and other volume
Closed: Fixed by mikem. Opened by kevin.

If a build was incompletely moved to another volume, leaving the DEFAULT volume content there and the new volume content there, running koji-fix-build-symlink gives:

# ./koji-fix-build-symlink --test --tag f32
koji-tools/src/bin/./koji-fix-build-symlink:467: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead                                                                          
  logger.warn('Unexpected base volume content: %s', basedir)      
2023-03-04 18:15:17,064 2650168 [WARNING] koji.fixsymlinks`: Unexpected base volume content: /mnt/koji
/packages/mutter/3.36.1/5.fc32                                                                        
2023-03-04 18:15:17,064 2650168 [ERROR] koji.fixsymlinks`: Unable to fix symlink                     
Traceback (most recent call last):                                                                    
  File "/root/koji-tools/src/bin/./koji-fix-build-symlink", line 431, in run                         
    self.fix_symlink()                                                                               
  File "/root/koji-tools/src/bin/./koji-fix-build-symlink", line 468, in fix_symlink                 
    self.fail('vol_symlink.not_a_link')                                                              
    ^^^^^^^^^                                                                                        
AttributeError: 'BuildHandler' object has no attribute 'fail'

It would be nice for it to report this case/fix it nicely.


I've added #74 to fix the error at least.

The script doesn't attempt to fix this case because it's not something that can be safely automated. If there is stray content here, it probably needs a human to look.

If this is happening so often that automated fixes are required, lmk and we can probably manage to recover in some cases.

Commit e8ff3b94 fixes this issue

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/koji/koji-tools/issues/63

Please continue any further discussion there.

Metadata
Related Pull Requests