Skip to content

MariaDB goes straight to maintenance after installing via pkgsrc #356

Description

@brianewell

TL;DR: It appears that mariadb-server is currently configured to expect a mariadb:mariadb writable directory at /var/run/mariadb. Unfortunately, manually creating one at that path doesn't survive a reboot.

Steps to reproduce:

  1. Use the latest available SmartOS virtual machine zone-dataset image (e44ed3e0-910b-11ed-a5d4-00151714048c)
  2. Install the latest available MariaDB server (mariadb-server-10.4.20nb9)
  3. Manually create a database (mysql_install_db --user=mariadb --basedir=/opt/local --datadir=/var/mysql) since that's apparently broken right now too.
  4. Note that attempts to start mariadb via svcs are met with maintenance states. Dig through the service log (/var/svc/log/pkgsrc-mariadb:default.log) and get nowhere, dig through the mariadb error log and notice permission errors on creating /var/run/mariadb.
  5. Create the directory, clear maintenance state on the service, rejoice.
  6. Restart the container, return to step 4.

Activity

  1. brianewell commented on Mar 5, 2023

    @brianewell
    Author

    Do we actually even need a pid file if SMF is managing this process directly instead of wrapping it in a svc method script?

  2. bahamat commented on Mar 5, 2023

    @bahamat

    This seems to be a duplicate of #346.

  3. jperkin commented on Mar 6, 2023

    @jperkin
    Collaborator

    Sorry, there are two issues here:

    I'll get working on both.

  4. jperkin commented on Mar 7, 2023

    @jperkin
    Collaborator

    Ok I've fixed the builds of 10.5 and 10.6 packages in NetBSD@4033f2d and NetBSD@13b9b4a, and also fixed creating the initial databases on first run in NetBSD@76ca8ff

    I'll get these backported to 2022Q4 and let you know when the packages are available.

  5. jperkin commented on Mar 9, 2023

    @jperkin
    Collaborator

    Ok the following packages are now available in 2022Q4:

    $ pkgin se mariadb-server
    mariadb-server-10.6.11  MariaDB 10.6, a free MySQL compatible database (server)
    mariadb-server-10.5.18  MariaDB 10.5, a free MySQL compatible database (server)
    mariadb-server-10.4.20nb9  MariaDB 10.4, a free MySQL compatible database (server)
    

    I've tested them all to check they all correctly start up on a clean system using the following routine:

    $ pkgin in 'mariadb-server>10.4<10.5'
    $ /usr/sbin/svcadm enable -r svc:/pkgsrc/mariadb:default
    
    ..check for running service, test with "mysql -uroot"..
    
    $ /usr/sbin/svcadm disable svc:/pkgsrc/mariadb:default
    $ pkg_delete mariadb\*
    $ /usr/sbin/svccfg delete svc:/pkgsrc/mariadb
    $ rm -rf /var/mysql /var/log/mariadb
    

    Repeat for:

    $ pkgin in 'mariadb-server>10.5<10.6'
    $ pkgin in 'mariadb-server>10.6'
    
  6. added a commit that references this issue on Mar 12, 2023
  7. added a commit that references this issue on Jan 9, 2024
  8. added a commit that references this issue on Apr 9, 2024
  9. added a commit that references this issue on May 17, 2024
  10. added a commit that references this issue on Oct 13, 2024
  11. added a commit that references this issue on Nov 13, 2024
  12. 14 remaining items

  13. added a commit that references this issue on Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions