Public bug reported:

On a Ubuntu 16.04 system deploying a Redmine issue tracker using the
Ubuntu redmine package this night's (the systemd apt-daily timer has
been rescheduled to run at 00:30) unattended upgrade of USN-3365
security updates to Ruby packages
(https://usn.ubuntu.com/usn/usn-3365-1/) caused the Redmine application
to break.

Accessing the site caused Phusion Passenger to come up with a "We're
sorry, but something went wrong.". The problem was identified and
notified by email during the upgrade's processing of triggers on the
redmine package where it was determined that the gem dependency "webrat"
somehow was unavailable.

The situation was resolved by running "bundle install" in the base
directory /usr/share/redmine which caused most of the gems to be updated
but I feel uneasy about this being a problem at all and fear breakage on
future upgrades.

I'm not too familiar with ruby, gems, bundler and apt triggers, so I've
been unable to grasp where things go wrong and where a remedy is best
deployed. Could it be as simple as adding a bundle update/install to the
redmine trigger?

Besides the core dependency to webrat, I got a plugin referring to webrat also:
$ grep -r webrat /var/lib/redmine/ /usr/share/redmine
/var/lib/redmine/Gemfile.lock:    webrat (0.7.3)
/var/lib/redmine/Gemfile.lock:  webrat
/usr/share/redmine/plugins/redmine_timesheet_plugin/Gemfile:  gem 'webrat'
/usr/share/redmine/plugins/redmine_timesheet_plugin/test/test_helper.rb:require 
"webrat"


>From /var/log/unattended-upgrades/unattended-upgrades-dpkg.log

    Log started: 2017-07-26 00:30:16
    Reading changelogs...
    (Reading database ... ^M(Reading database ... 5%^M(Reading database ... 
10%^M(Reading database ... 15%^M(Reading database ... 20%^M(Reading database 
... 25%^M(Reading database ... 30%^M(Reading database ... 35%^M(Reading 
database ... 40%^M(Reading database ... 45%^M(Reading database ... 
50%^M(Reading database ... 55%^M(Reading database ... 60%^M(Reading database 
... 65%^M(Reading database ... 70%^M(Reading database ... 75%^M(Reading 
database ... 80%^M(Reading database ... 85%^M(Reading database ... 
90%^M(Reading database ... 95%^M(Reading database ... 100%^M(Reading database 
... 286395 files and directories currently installed.)
    Preparing to unpack .../ruby2.3-dev_2.3.1-2~16.04.2_amd64.deb ...
    Unpacking ruby2.3-dev:amd64 (2.3.1-2~16.04.2) over (2.3.1-2~16.04) ...
    Preparing to unpack .../libruby2.3_2.3.1-2~16.04.2_amd64.deb ...
    Unpacking libruby2.3:amd64 (2.3.1-2~16.04.2) over (2.3.1-2~16.04) ...
    Preparing to unpack .../ruby2.3_2.3.1-2~16.04.2_amd64.deb ...
    Unpacking ruby2.3 (2.3.1-2~16.04.2) over (2.3.1-2~16.04) ...
    Processing triggers for libc-bin (2.23-0ubuntu9) ...
    Processing triggers for redmine (3.2.1-2) ...
    Determining localhost credentials from /etc/mysql/debian.cnf: succeeded.
    ESC[31mCould not find gem 'webrat' in any of the gem sources listed in your 
Gemfile or
    available on this machine.ESC[0m
    dpkg: error processing package redmine (--unpack):
    subprocess installed post-installation script returned error exit status 7
    Processing triggers for man-db (2.7.5-1) ...
    Errors were encountered while processing:
    redmine
    Log ended: 2017-07-26 00:30:21

>From /var/log/unattended-upgrades/unattended-upgrades.log

    2017-07-26 00:30:11,371 INFO Starting unattended upgrades script
    2017-07-26 00:30:11,371 INFO Allowed origins are: ['o=Ubuntu,a=xenial', 
'o=Ubuntu,a=xenial-security', 'o=UbuntuESM,a=xenial']
    2017-07-26 00:30:15,947 INFO Packages that will be upgraded: libruby2.3 
ruby2.3 ruby2.3-dev
    2017-07-26 00:30:15,948 INFO Writing dpkg log to 
'/var/log/unattended-upgrades/unattended-upgrades-dpkg.log'
    2017-07-26 00:30:21,299 ERROR Installing the upgrades failed!
    2017-07-26 00:30:21,299 ERROR error message: 'installArchives() failed'
    2017-07-26 00:30:21,299 ERROR dpkg returned a error! See 
'/var/log/unattended-upgrades/unattended-upgrades-dpkg.log' for details

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:        16.04
Codename:       xenial

$ apt-cache policy redmine passenger
redmine:
  Installed: 3.2.1-2
  Candidate: 3.2.1-2
  Version table:
 *** 3.2.1-2 500
        500 http://dk.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        500 http://dk.archive.ubuntu.com/ubuntu xenial/universe i386 Packages
        100 /var/lib/dpkg/status
passenger:
  Installed: 5.0.27-2
  Candidate: 5.0.27-2
  Version table:
 *** 5.0.27-2 500
        500 http://dk.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        100 /var/lib/dpkg/status

** Affects: unattended-upgrades (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1706740

Title:
  ruby upgrade broke redmine dependency

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1706740/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to