← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 1889472] Re: mysql-server-5.7 postinst fails when in read-only mode

 

Thank you for the discussion.

Since 8.0 isn't affected, I'm marking this as Fix Released with tasks
for Xenial and Bionic only.

I'm on the fence about the suitability for your patch - as the packaging
isn't intended to support HA configurations, so maintaining the patch
incurs unnecessary maintenance burden.

However, as 8.0 isn't affected, the maintenance would only be necessary
for Xenial and Bionic so would be minimal in this particular case, and
your patch is non-invasive and relatively trivial.

If you're prepared to take that maintenance on, I'll support you landing
SRUs for this (Bionic only if that's all you want, or Bionic and Xenial
if you require Xenial). I'd expect you to follow the full SRU procedure
please, apart for any necessary review and sponsorship which my team
will take on for you.

** Also affects: mysql-5.7 (Ubuntu Bionic)
   Importance: Undecided
       Status: New

** Also affects: mysql-5.7 (Ubuntu Xenial)
   Importance: Undecided
       Status: New

** Changed in: mysql-5.7 (Ubuntu)
       Status: Triaged => Invalid

** Changed in: mysql-5.7 (Ubuntu Xenial)
       Status: New => Triaged

** Changed in: mysql-5.7 (Ubuntu Bionic)
       Status: New => Triaged

** Changed in: mysql-5.7 (Ubuntu Xenial)
   Importance: Undecided => Low

** Changed in: mysql-5.7 (Ubuntu Bionic)
   Importance: Undecided => Low

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1889472

Title:
  mysql-server-5.7 postinst fails when in read-only mode

Status in mysql-5.7 package in Ubuntu:
  Invalid
Status in mysql-5.7 source package in Xenial:
  Triaged
Status in mysql-5.7 source package in Bionic:
  Triaged

Bug description:
  Updates of the mysql-server-5.7 package fail to install (error during
  postinst) if operating in (super) read-only mode. A read-only replica
  is common in redundant/HA setups.

  Steps to reproduce:

  1) Setup a container (bionic or xenial would do)
  $ lxc launch images:ubuntu/bionic sql1
  $ lxc shell sql1
  # apt-get update && apt-get install -y --no-install-recommends mysql-server

  2) Configure read-only mode
  # cat << EOF >> /etc/mysql/my.cnf

  [mysqld]
  super_read_only = ON
  read_only = ON
  EOF
  # service mysql restart
  # mysql -e "SELECT @@global.read_only, @@global.super_read_only;"
  +--------------------+--------------------------+
  | @@global.read_only | @@global.super_read_only |
  +--------------------+--------------------------+
  |                  1 |                        1 |
  +--------------------+--------------------------+

  3) Trigger the postinst code
  # apt-get install --reinstall mysql-server-5.7
  Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
  Need to get 0 B/2,931 kB of archives.
  After this operation, 0 B of additional disk space will be used.
  Preconfiguring packages ...
  (Reading database ... 16169 files and directories currently installed.)
  Preparing to unpack .../mysql-server-5.7_5.7.31-0ubuntu0.18.04.1_amd64.deb ...
  Unpacking mysql-server-5.7 (5.7.31-0ubuntu0.18.04.1) over (5.7.31-0ubuntu0.18.04.1) ...
  Setting up mysql-server-5.7 (5.7.31-0ubuntu0.18.04.1) ...
  Checking if update is needed.
  Checking server version.
  Running queries to upgrade MySQL server.
  mysql_upgrade: [ERROR] 1290: The MySQL server is running with the --super-read-only option so it cannot execute this statement
  mysql_upgrade failed with exit status 5
  dpkg: error processing package mysql-server-5.7 (--configure):
   installed mysql-server-5.7 package post-installation script subprocess returned error exit status 1
  Processing triggers for systemd (237-3ubuntu10.41) ...
  Errors were encountered while processing:
   mysql-server-5.7
  E: Sub-process /usr/bin/dpkg returned an error code (1)

  Step 3) should not cause a dpkg error.

  Additional information:

  # lsb_release -rd
  Description:	Ubuntu 18.04.4 LTS
  Release:	18.04
  # apt-cache policy mysql-server-5.7
  mysql-server-5.7:
    Installed: 5.7.31-0ubuntu0.18.04.1
    Candidate: 5.7.31-0ubuntu0.18.04.1
    Version table:
   *** 5.7.31-0ubuntu0.18.04.1 500
          500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
          500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
          100 /var/lib/dpkg/status
       5.7.21-1ubuntu1 500
          500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1889472/+subscriptions