Actions
Bug #22698
closedRails postinst fails with "can't shift that many" if database isn't ready
Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Deployment
Target version:
Story points:
-
Release:
Release relationship:
Auto
Description
$ sudo apt install --no-install-recommends arvados-api-server [package install blah blah] Setting up arvados-api-server (3.1.0-1) ... [gem and Passenger install blah blah] Creating symlinks to configuration in /etc/arvados/api ...... done. Extending systemd unit configuration ...... done. Checking configuration for completeness... Defaulting to memory cache, because /var/www/arvados-api/current/tmp/cache does not exist done. /var/lib/dpkg/info/arvados-api-server.postinst: 79: shift: can't shift that many dpkg: error processing package arvados-api-server (--configure): installed arvados-api-server package post-installation script subprocess returned error exit status 2 Errors were encountered while processing: arvados-api-server E: Sub-process /usr/bin/dpkg returned an error code (1)
This happens in source:build/rails-package-scripts/postinst.sh at the bottom where we say:
elif ! prepare_database; then report_not_ready 22 "database setup could not be completed"
This report_not_ready
does not pass a third argument, which is supposed to be optional. report_not_ready
is prepared for it to be not set, but then still tries to shift
it, which causes the whole script to error exit, and skip the error message we wanted to report.
This is not critical since it "just" means the error reporting doesn't work but obviously it's confusing as heck to the user. We can just delete the shift
. I currently have this change in my branch for #22238 but I can spin it out separately if needed.
Updated by Peter Amstutz 21 days ago
- Target version changed from Development 2025-04-02 to Development 2025-04-16
Updated by Brett Smith 20 days ago
- Status changed from In Progress to Resolved
Applied in changeset arvados|824e3f459a4c97eb8dd5ad3a5e2e66984b642603.
Actions