Skip to content

Commit 3314fb6

Browse files
Allow both mysql and mariadb as owners of the data dir
1 parent d96ed68 commit 3314fb6

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

cmapi/cmapi_server/invariant_checks.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import os
33
from typing import Optional, Tuple
44

5-
from mr_kot import Runner, Status, check, check_all, fact, parametrize
5+
from mr_kot import Runner, Status, any_of, check, check_all, fact, parametrize
66
from mr_kot_fs_validators import GroupIs, HasMode, IsDir, OwnerIs
77

88
from cmapi_server import helpers
@@ -87,7 +87,9 @@ def required_dirs_ownership(dir: str) -> Tuple[Status, str]:
8787
# Check ownership only when not in containers
8888
status, ev = check_all(
8989
dir,
90-
OwnerIs('mysql'),
91-
GroupIs('mysql'),
90+
# The correct owner is mysql, but i've seen mariadb as owner of the mountpoint,
91+
# so we allow both
92+
any_of(OwnerIs('mysql'), OwnerIs('mariadb')),
93+
any_of(GroupIs('mysql'), GroupIs('mariadb')),
9294
)
9395
return (status, ev)

cmapi/requirements.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ typer==0.15.2
1919
pydantic==2.11.7
2020
sentry-sdk==2.34.1
2121
# Invariant checks
22-
mr_kot==0.8.5
23-
mr_kot_fs_validators==0.1.0
22+
mr_kot==0.9.1
23+
mr_kot_fs_validators==0.2.0

cmapi/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ more-itertools==10.7.0
144144
# cherrypy
145145
# jaraco-functools
146146
# jaraco-text
147-
mr-kot==0.8.5
147+
mr-kot==0.9.1
148148
# via -r requirements.in
149-
mr-kot-fs-validators==0.1.0
149+
mr-kot-fs-validators==0.2.0
150150
# via -r requirements.in
151151
multidict==6.6.4
152152
# via

0 commit comments

Comments
 (0)