Comment 15 for bug 1592669

Revision history for this message
Lars Tangvald (lars-tangvald) wrote : Re: [Bug 1592669] Re: postinst fails when daemon is not running (or is disabled by policy-rc.d)

There are two separate "upgrades" happening: Upgrading the package and
upgrading the database. The problem is that right now the former will
fail if the latter fails, but it doesn't need to.

I have a solution (still needs some more testing, but hopefully it will
be ready soon) that:

a) Tries to run the server directly instead of through the service
system, so it should work normally if the service is disabled as long as
the server isn't already running (since then we can't stop it).
b) Completes the package upgrade even if the server can't be started,
but without running mysql_upgrade.

--
Lars

On 04/29/2017 09:51 AM, Ben Landin wrote:
> During an upgrade, there are queries that need to be run against the
> server, which means the mysql service must be running.
>
> On Apr 29, 2017 3:04 AM, "Pablo Catalina" <email address hidden>
> wrote:
>
> But, why the service has to be enabled to upgrade it?
>
> El 29/4/2017 5:34, "Jordao" <email address hidden> escribió:
>
>> That's ok, but I guess a better approach would be delaying upgrade (no
>> install) if service is disabled or doing these steps automatically because
>> it can be very annoying and could mess something up.
>> The first option should be a bit easier to implement.
>>
>> 2017-04-28 17:08 GMT-03:00 Larika <email address hidden>:
>>
>>> sudo systemctl enable mysql
>>> sudo systemctl start mysql
>>> sudo apt install -f
>>>
>>> Upgrade process completed successfully. :)
>>>
>>> --
>>> You received this bug notification because you are subscribed to a
>>> duplicate bug report (1658034).
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.launchpad.net_bugs_1592669&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=HPjEzLhETPj8fl9HCxxISaaV3f5tXDpGXDR3R2IELxg&m=PdAlVtFEw3yL55hI32gYfa72qnbSSi8VrBBgpGOqV9A&s=J_Ik4Rb7XaAgBURNKto_54-iFFIwX9Bopkj5F3xbY4I&e=
>>>
>>> Title:
>>> postinst fails when daemon is not running (or is disabled by policy-
>>> rc.d)
>>>
>>> To manage notifications about this bug go to:
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.launchpad.net_ubuntu_-2Bsource_mysql-2D5.7_-2Bbug_&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=HPjEzLhETPj8fl9HCxxISaaV3f5tXDpGXDR3R2IELxg&m=PdAlVtFEw3yL55hI32gYfa72qnbSSi8VrBBgpGOqV9A&s=4q_iH3iF49qeYu7uFbOKBQC9aiQxFqWA8Ek4Yqf3Ay4&e=
>>> 1592669/+subscriptions
>>>
>> --
>> You received this bug notification because you are subscribed to a
>> duplicate bug report (1595208).
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.launchpad.net_bugs_1592669&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=HPjEzLhETPj8fl9HCxxISaaV3f5tXDpGXDR3R2IELxg&m=PdAlVtFEw3yL55hI32gYfa72qnbSSi8VrBBgpGOqV9A&s=J_Ik4Rb7XaAgBURNKto_54-iFFIwX9Bopkj5F3xbY4I&e=
>>
>> Title:
>> postinst fails when daemon is not running (or is disabled by policy-
>> rc.d)
>>
>> Status in mysql-5.7 package in Ubuntu:
>> In Progress
>> Status in mysql-5.7 package in Debian:
>> New
>>
>> Bug description:
>> Every 10-15 minutes mysql crashes with this error.
>>
>> ProblemType: Package
>> DistroRelease: Ubuntu 16.04
>> Package: mysql-server-5.7 5.7.12-0ubuntu1
>> ProcVersionSignature: Ubuntu 4.4.0-24.43-generic 4.4.10
>> Uname: Linux 4.4.0-24-generic x86_64
>> ApportVersion: 2.20.1-0ubuntu2.1
>> Architecture: amd64
>> Date: Fri Jun 10 10:47:34 2016
>> ErrorMessage: subprocess installed post-installation script returned
>> error exit status 1
>> InstallationDate: Installed on 2002-01-01 (5279 days ago)
>> InstallationMedia: Ubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64
>> (20140722.2)
>> Logs.var.log.daemon.log:
>>
>> Logs.var.log.mysql.error.log:
>> MySQLConf.etc.mysql.conf.d.mysql.cnf: [mysql]
>> MySQLConf.etc.mysql.conf.d.mysqld_safe_syslog.cnf:
>> [mysqld_safe]
>> syslog
>> MySQLConf.etc.mysql.conf.d.mysqldump.cnf:
>> [mysqldump]
>> quick
>> quote-names
>> max_allowed_packet = 16M
>> MySQLConf.etc.mysql.mysql.conf.d.mysqld_safe_syslog.cnf:
>> [mysqld_safe]
>> syslog
>> MySQLVarLibDirListing: ['joomla', 'debian-5.7.flag',
>> 'performance_schema', 'mysql', 'debian-5.5.flag', 'ibdata1',
> 'ib_logfile1',
>> 'mysql_upgrade_info', 'ibtmp1', 'auto.cnf', 'sys', 'ib_logfile0',
>> 'ib_buffer_pool']
>> ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-4.4.0-24-generic
>> root=UUID=24616351-e938-44c6-b79f-5db042b2563b ro quiet splash
>> vt.handoff=7
>> RelatedPackageVersions:
>> dpkg 1.18.4ubuntu1.1
>> apt 1.2.12~ubuntu16.04.1
>> SourcePackage: mysql-5.7
>> Title: package mysql-server-5.7 5.7.12-0ubuntu1 failed to
>> install/upgrade: subprocess installed post-installation script returned
>> error exit status 1
>> UpgradeStatus: Upgraded to xenial on 2016-06-10 (4 days ago)
>> upstart.mysql.override: manual
>>
>> To manage notifications about this bug go to:
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.launchpad.net_ubuntu_-2Bsource_mysql-2D5.7_-2Bbug_&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=HPjEzLhETPj8fl9HCxxISaaV3f5tXDpGXDR3R2IELxg&m=PdAlVtFEw3yL55hI32gYfa72qnbSSi8VrBBgpGOqV9A&s=4q_iH3iF49qeYu7uFbOKBQC9aiQxFqWA8Ek4Yqf3Ay4&e=
>> 1592669/+subscriptions
>>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1680988).
> https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.launchpad.net_bugs_1592669&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=HPjEzLhETPj8fl9HCxxISaaV3f5tXDpGXDR3R2IELxg&m=PdAlVtFEw3yL55hI32gYfa72qnbSSi8VrBBgpGOqV9A&s=J_Ik4Rb7XaAgBURNKto_54-iFFIwX9Bopkj5F3xbY4I&e=
>
> Title:
> postinst fails when daemon is not running (or is disabled by policy-
> rc.d)
>
> To manage notifications about this bug go to:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.launchpad.net_ubuntu_-2Bsource_mysql-2D5.7_-2Bbug_&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=HPjEzLhETPj8fl9HCxxISaaV3f5tXDpGXDR3R2IELxg&m=PdAlVtFEw3yL55hI32gYfa72qnbSSi8VrBBgpGOqV9A&s=4q_iH3iF49qeYu7uFbOKBQC9aiQxFqWA8Ek4Yqf3Ay4&e=
> 1592669/+subscriptions
>