Anisus encountered a corrupted Git repository error during ./launcher rebuild app after upgrading docker_manager via the UI, which caused the Admin dashboard to render blank. The error originated inside the app container at /var/www/discourse, showing repeated “packfile does not match index” messages. Attempts to fix it by manually cloning a fresh Discourse repo inside the container worked temporarily, but the issue resurfaced during rebuild. Merefield confirmed the issue was container-internal and noted there are two Git layers (one outside the container). Ultimately, anisus resolved the issue by stopping the app, pruning all Docker containers and images, and rebuilding — which also triggered a PostgreSQL upgrade. A final rebuild completed successfully, restoring full functionality. The root cause appeared to be a combination of Git corruption and lingering artifacts from a prior Docker upgrade.
לאחר שדרוג docker_manager דרך ה-API (שנראה שעבר כשורה), לוח הבקרה של מנהל המערכת הציג פשוט דף ריק, גם אם שאר הפורום נראה שעובד.
כדי לפתור זאת, נאלצתי להריץ:
./launcher rebuild app
עם זאת, במהלך התהליך הזה, הוא נתקל בשגיאות:
I, [2025-07-14T08:54:06.062789 #1] INFO -- :
> cd /var/www/discourse && sudo -H -E -u discourse bash -c '
set -o errexit
if [ $(git rev-parse --is-shallow-repository) == "true" ]; then
git remote set-branches --add origin main
git remote set-branches origin tests-passed
git fetch --depth 1 origin tests-passed
else
git fetch --tags --prune-tags --prune --force origin
fi
'
error: packfile .git/objects/pack/pack-581fe47ace192793da04d01989a4d1a7f0e6103c.pack does not match index
error: packfile .git/objects/pack/pack-581fe47ace192793da04d01989a4d1a7f0e6103c.pack does not match index
error: packfile .git/objects/pack/pack-581fe47ace192793da04d01989a4d1a7f0e6103c.pack does not match index
error: packfile .git/objects/pack/pack-581fe47ace192793da04d01989a4d1a7f0e6103c.pack does not match index
… והודעת error: packfile פשוט ממשיכה להיות מוצפת עד להפסקה.
כפי שזה נראה, מאגר ה-git הפך לפגום. אבל איזה מאגר git?
אין לי אפילו תיקיית /var/www/discourse, אז אני מניח שזה נמצא בתוך volume של קונטיינר?
error: packfile .git/objects/pack/pack-581fe47ace192793da04d01989a4d1a7f0e6103c.pack does not match index
error: packfile .git/objects/pack/pack-581fe47ace192793da04d01989a4d1a7f0e6103c.pack does not match index
error: packfile .git/objects/pack/pack-581fe47ace192793da04d01989a4d1a7f0e6103c.pack does not match index
etc..
I tried to resolve it by renaming discourse and clone a new one:
סוף סוף הצלחתי לגרום לזה לעבוד!
אני חושב שזה היה שילוב בין git פגום לבין התוצאה של שדרוג docker קודם. פתרתי זאת על ידי גיזום כל מכלי ה-docker והתמונות:
cd /opt/discourse
./launcher stop app
docker container prune
docker image prune -a
./launcher rebuild app
זה הניב/הסתיים עם:
שדרוג הושלם
----------------
סטטיסטיקות אופטימייזר אינן מועברות על ידי pg_upgrade.
לאחר שתתחיל את השרת החדש, שקול להפעיל:
/usr/lib/postgresql/15/bin/vacuumdb --all --analyze-in-stages
הפעלת סקריפט זה תמחק את קבצי הנתונים של האשכול הישן:
./delete_old_cluster.sh
-------------------------------------------------------------------------------------
שדרוג של POSTGRES הושלם
מאגר הנתונים הישן 13 מאוחסן ב- /shared/postgres_data_old
כדי להשלים את השדרוג, בצע בנייה מחדש באמצעות:
./launcher rebuild app
-------------------------------------------------------------------------------------
על ידי הפעלת הבנייה מחדש שוב, זה התחיל לעבוד במלואו: