Skip to content

[Ubuntu] Downgrade mysql to 8.0.26#4674

Merged
miketimofeev merged 1 commit intoactions:mainfrom
mikhailkoliada:ubuntu_downgrade_sql
Dec 7, 2021
Merged

[Ubuntu] Downgrade mysql to 8.0.26#4674
miketimofeev merged 1 commit intoactions:mainfrom
mikhailkoliada:ubuntu_downgrade_sql

Conversation

@mikhailkoliada
Copy link
Copy Markdown
Contributor

Description

As has been discussed with @MaksimZhukov and @miketimofeev lets downgrade mysql on ubuntu to 8.0.26 as 8.0.27 is buggy. As there is no an older version in Oracle's PPA repo there was a need to install all the dependencies step by step utilizing the dpkg -i command (the order in the mysql_debs array matters). No toolset and other flexible solutions were considered yet as the future of this solution is uncertain and will likely be changed.

Related issues: https://github.com/actions/virtual-environments-internal/issues/3036 https://github.com/actions/virtual-environments-internal/issues/2999

Check list

  • Related issue / work item is attached
  • Tests are written (if applicable)
  • Documentation is updated (if applicable)
  • Changes are tested and related VM images are successfully generated

@mattlord
Copy link
Copy Markdown

mattlord commented Dec 13, 2021

Hi @miketimofeev and @mikhailkoliada!

Just FYI, this change may cause more problems than it solved. It broke any of our actions that use ubuntu-latest and simply try to install the mysql-{client,server} packages via apt-get. Installing either one now exits with:

The following packages have unmet dependencies:
 mysql-client : Depends: mysql-client-8.0 but it is not going to be installed
 mysql-server : Depends: mysql-server-8.0 but it is not going to be installed

For an example that's failing:

Should I open a new issue for this? I'm curious which way forward you might recommend as we figure something out on our side.

Thank you!

@wojsmol
Copy link
Copy Markdown

wojsmol commented Dec 13, 2021

@mattlord Looking at this PR https://github.com/actions/virtual-environments/pull/4674/files#diff-7e1f5b360352a2ec74ab295b4fa1bfd65b9126094484bf56dbf6108b6f5478d4R28-R37 and your workflow definition changing

sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget

to

sudo apt-get install -y make unzip g++ etcd curl git wget

should temporally fix the issue as mysql-server and mysql-client are pre-installed. AFAIK.

@mattlord
Copy link
Copy Markdown

mattlord commented Dec 14, 2021

@wojsmol thank you for responding! We started with that idea too, but that would be a temporary fix with potential downsides in the future so instead we ended up opting to manually/explicitly install and configure the Oracle MySQL APT repo and then explicitly install MySQL from there. That should never hurt and it shields/protects us from any upstream changes where that repo may not be available or configured as expected so seemed like a good idea overall. For example:

    - name: Get dependencies
      run: |
        # Setup MySQL 8.0
        wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.20-1_all.deb
        echo mysql-apt-config mysql-apt-config/select-server select mysql-8.0 | sudo debconf-set-selections
        sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config*
        sudo apt-get update
        
        # Install everything else we need, and configure
        sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata
        sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
        sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld

In case it's helpful to anyone else or anyone has a better idea. 🙂 Thanks again!

@mikhailkoliada
Copy link
Copy Markdown
Contributor Author

@mattlord Hello!

Problems in regards with apt were expected as apt is not aware of the manual installation method, we are likely to get back to the "normal" installation process as soon as Oracle/Canonical have the fix released, otherwise 8.0.27 is unusable due to the connectivity issues bug.

Sorry for inconvenience caused!

@mattlord
Copy link
Copy Markdown

mattlord commented Dec 14, 2021

Hi @mikhailkoliada!

Ah, OK. After having looked at https://bugs.mysql.com/bug.php?id=105288 I can completely understand why you did this. 😬

We ended up doing something we probably should have been doing all along, so all good on our side.

Thank you for fixing this for all of your MySQL users then and for the helpful response here!

Best Regards

GuptaManan100 referenced this pull request in planetscale/vitess Mar 24, 2022
GuptaManan100 referenced this pull request in vitessio/vitess Mar 24, 2022
* set fully parsed false when ignoring errors

Signed-off-by: Manan Gupta <manan@planetscale.com>

* ci: fix for mysql 80 installation

Signed-off-by: Manan Gupta <manan@planetscale.com>

* ci: remove installation of mysql-server and client from ubuntu-20 since it is already installed - https://github.com/actions/virtual-environments/pull/4674\#issuecomment-993015831

Signed-off-by: Manan Gupta <manan@planetscale.com>
shunki-fujita referenced this pull request in cybozu-go/moco Sep 27, 2023
Signed-off-by: Masayuki Ishii <masa213f@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants