Skip to content

Conversation

@crpb
Copy link
Contributor

@crpb crpb commented Nov 13, 2025

  • remove useless requires+after to the same named socket. a .socket will automatically trigger a service if something want to talk to it. you will only ever need to enable the .socket and don't have to explicitly enable the .service in such a scenario. stichwort: triggering units
  • add after=mysql.service to not get any silly database errors anymore during boot because the database isn't accessible in the first try. the alias mysql.service was chosen to have a broader compatibility for anyone who isn't using mariadb.

triggering units?

@jengelh
Copy link
Member

jengelh commented Nov 14, 2025

After=mysql is mostly useless. It has no effect if the mysql db used by aapi runs on a remote host, and even for local processes, there is no guarantee that mysql.service is "quick enough" to create its socket before AAPI tries to use it.

@crpb
Copy link
Contributor Author

crpb commented Nov 14, 2025

It has no effect if the mysql db used by aapi runs on a remote host,

right, didn't think of that ...

@crpb crpb force-pushed the service/mariadb branch 2 times, most recently from 5460b24 to cf7dc2c Compare November 29, 2025 11:25
* Remove requires+after to the same named socket. A socket unit will
  automatically trigger a service if something wants to talk to it. You
  will only ever need to enable the socket unit and don't have to
  explicitly enable the service unit.
* Remove full path for the ini file, since `WorkingDirectory=` already
  puts the process in that directory.
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.

3 participants