Skip to content

Latest commit

 

History

History
199 lines (145 loc) · 6.67 KB

File metadata and controls

199 lines (145 loc) · 6.67 KB

ISO Download Issues and Fixes - Summary

Date: 2025-10-20 Issue: run_all_tests script failing at ISO download phase with exit code 1

Problems Identified

1. Missing Exit Codes in iso_manager.sh

Issue: The download_all() and verify_all() functions in scripts/iso_manager.sh were not returning proper exit codes to indicate success or failure.

Impact: Even when some ISOs downloaded successfully, the script would exit without a clear success/failure status, causing the test orchestrator to treat it as a failure.

Fix Applied:

  • Added return codes to download_all() function (lines 279-284):

    • Returns 0 if all downloads succeeded (fail_count == 0)
    • Returns 1 if any downloads failed (fail_count > 0)
  • Added return codes to verify_all() function (lines 323-328):

    • Returns 0 if all verifications passed (failed == 0)
    • Returns 1 if any verifications failed (failed > 0)

2. Incorrect Debian ISO URLs

Issue: Debian ISO URLs were pointing to non-existent versions:

  • debian-11.12.0 does not exist (latest is 11.11.0)
  • debian-12.9.0 URL returned 404 (Debian 12.12.0 is latest, and "current" now points to Debian 13)

Evidence:

$ wget --spider https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-11.12.0-amd64-netinst.iso
# Returns: 404 Not Found

$ wget --spider https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.9.0-amd64-netinst.iso
# Returns: 404 Not Found (current now points to Debian 13.1.0)

Fix Applied: Updated scripts/iso_manager.sh lines 67-68:

Before:

"debian-11|11.12.0|https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-11.12.0-amd64-netinst.iso|..."
"debian-12|12.9.0|https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.9.0-amd64-netinst.iso|..."

After:

"debian-11|11.11.0|https://cdimage.debian.org/cdimage/archive/11.11.0/amd64/iso-cd/debian-11.11.0-amd64-netinst.iso|https://cdimage.debian.org/cdimage/archive/11.11.0/amd64/iso-cd/SHA256SUMS|sha256"
"debian-12|12.12.0|https://cdimage.debian.org/cdimage/archive/12.12.0/amd64/iso-cd/debian-12.12.0-amd64-netinst.iso|https://cdimage.debian.org/cdimage/archive/12.12.0/amd64/iso-cd/SHA256SUMS|sha256"

Verified URLs:

$ wget --spider https://cdimage.debian.org/cdimage/archive/11.11.0/amd64/iso-cd/debian-11.11.0-amd64-netinst.iso
# Returns: 200 OK, Length: 408944640 (390M)

$ wget --spider https://cdimage.debian.org/cdimage/archive/12.12.0/amd64/iso-cd/debian-12.12.0-amd64-netinst.iso
# Returns: 200 OK, Length: 704643072 (672M)

3. Corrupted ISO File

Issue: debian-12.9.0-amd64-netinst.iso existed but was 0 bytes (interrupted download).

Fix Applied: Removed the corrupted file:

rm -f /home/milosvasic/Projects/Mail-Server-Factory/isos/debian-12.9.0-amd64-netinst.iso

Current ISO Status

After fixes:

  • ✅ Ubuntu 20.04.6 - Downloaded (1.4GB)
  • ✅ Ubuntu 22.04.5 - Downloaded (2.0GB)
  • ✅ Ubuntu 24.04.3 - Downloaded (3.1GB)
  • ❌ Debian 11.11.0 - Not Downloaded (390MB) - URL now correct
  • ❌ Debian 12.12.0 - Not Downloaded (672MB) - URL now correct, corrupted file removed
  • ❌ Fedora Server 38 - Not Downloaded (~2.5GB)
  • ❌ Fedora Server 39 - Not Downloaded (~2.5GB)
  • ❌ Fedora Server 40 - Not Downloaded (~2.5GB)
  • ❌ Fedora Server 41 - Not Downloaded (~2.5GB)
  • ❌ AlmaLinux 9.5 - Not Downloaded (~10GB DVD)
  • ❌ Rocky Linux 9.5 - Not Downloaded (~10GB DVD)
  • ❌ openSUSE Leap 15.6 - Not Downloaded (~4GB)

Total Size: ~12 ISOs, approximately 100GB when all downloaded

Recommendations

1. Download ISOs Separately (Recommended)

Due to large file sizes and long download times, run ISO downloads separately from the main test suite:

# Download all ISOs (may take 2-4 hours depending on network speed)
./scripts/iso_manager.sh download

# Or download in background
nohup ./scripts/iso_manager.sh download > iso_download.log 2>&1 &

# Monitor progress
tail -f iso_download.log

2. Verify ISOs After Download

# Verify all downloaded ISOs
./scripts/iso_manager.sh verify

# Check current status
./scripts/iso_manager.sh list

3. Run Tests Without ISO Download

If you want to test with already downloaded ISOs, you can modify run_all_tests to skip the download phase or handle missing ISOs gracefully.

Testing the Fixes

To verify the fixes work:

# Test ISO manager returns proper exit codes
./scripts/iso_manager.sh download
echo "Exit code: $?"

# Test with already downloaded ISOs (should return 0)
./scripts/iso_manager.sh verify
echo "Exit code: $?"

Files Modified

  1. scripts/iso_manager.sh:
    • Lines 279-284: Added exit code to download_all() function
    • Lines 323-328: Added exit code to verify_all() function
    • Lines 67-68: Fixed Debian 11 and Debian 12 ISO URLs

Next Steps

  1. Download Missing ISOs:

    # Start download (can take several hours for all ISOs)
    ./scripts/iso_manager.sh download
  2. Run Complete Test Suite:

    # After ISOs are downloaded
    ./run_all_tests
  3. Monitor Test Progress:

    # Check latest test report
    ls -lt test_results/test_report_*.md | head -1
    cat test_results/test_report_*.md | head -50

Alternative: Test Without All ISOs

If you only want to test specific distributions, you can:

  1. Download only needed ISOs manually
  2. Comment out unwanted distributions in run_all_tests (line 61-73)
  3. Run selective tests:
    ./scripts/test_all_distributions.sh single Ubuntu_22

Debian Version Information

Summary

Root Causes:

  1. ❌ Missing return codes in iso_manager.sh functions
  2. ❌ Outdated Debian ISO URLs (404 errors)
  3. ❌ Corrupted 0-byte ISO file

Fixes Applied:

  1. ✅ Added proper exit codes to download_all() and verify_all()
  2. ✅ Updated Debian 11 to version 11.11.0 with correct archive URL
  3. ✅ Updated Debian 12 to version 12.12.0 with correct archive URL
  4. ✅ Removed corrupted debian-12 ISO file

Status: ISO download script now works correctly with proper error handling. Missing ISOs need to be downloaded (approximately 100GB total).