Bug 1281775
| Summary: | spacewalk-data-fsck should emit an error when there is totally wrong path instead of ValueError | ||
|---|---|---|---|
| Product: | Red Hat Satellite 5 | Reporter: | Jan Hutař <jhutar> |
| Component: | Other | Assignee: | Gennadii Altukhov <galtukho> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Dimitar Yordanov <dyordano> |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 570 | CC: | dyordano, galtukho, tkasparek, tlestach |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-06-21 12:10:19 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1358815 | ||
This was found when working on bug 1201007 Taking... spacewalk.git: 81e1a9c3a4edde4e760cc6b866b762c782db1b18 changes to fix: 0) Added processing of ValueError exception |
Description of problem: spacewalk-data-fsck should emit an error when there is totally wrong path instead of "ValueError: too many values to unpack" Version-Release number of selected component (if applicable): spacewalk-backend-tools-2.3.3-33.el6sat.noarch How reproducible: always Steps to Reproduce: 1. # spacewalk-sql -i rhnschema=# update rhnPackage set path = 'redhat/1/5ea/enca/1.16-1.el6/x86_64/<hash>/FOOBAR/enca-1.16-1.el6.x86_64.rpm' where id=16330; 2. # mkdir /var/satellite/redhat/1/5ea/enca/1.16-1.el6/x86_64/<hash>/FOOBAR/ # cp /var/satellite/redhat/1/5ea/enca/1.16-1.el6/x86_64/<hash>/enca-1.16-1.el6.x86_64.rpm /var/satellite/redhat/1/5ea/enca/1.16-1.el6/x86_64/<hash>/FOOBAR/ 3. # spacewalk-data-fsck -v --fix-file-path Actual results: # spacewalk-data-fsck -v --fix-file-path Checking if packages from database are present on filesystem Traceback (most recent call last): File "/usr/bin/spacewalk-data-fsck", line 321, in <module> exit_value += check_db_vs_disk(options) File "/usr/bin/spacewalk-data-fsck", line 102, in check_db_vs_disk report['restore'] += check_disk_nevrao(abs_path, row.copy(), True) File "/usr/bin/spacewalk-data-fsck", line 148, in check_disk_nevrao file['basename']) = row['path'].split('/') ValueError: too many values to unpack Expected results: Just error message should be printed and the tool should go on Additional info: I understand that I have create the breakage manually (and I guess that change in the DB is not required at all), but this tool is supposed to deal with breakages AFAICT.