Skip to content

Commit dfdf88a

Browse files
committed
allow spaces in namespace name
1 parent d559e89 commit dfdf88a

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

files/pixiu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ PIXIU_QUOTA_SIZE_TYPE (?:(?<used_files>%{NUMBER:int})|(?<used_space>%{PIXIU_BYTE
1616

1717
PIXIU_ALARM_COMMON The used (?<quota_used_type>%{WORD}) \(%{PIXIU_QUOTA_SIZE_TYPE}\) of (?:the )?quota \(type (?:UNIX )?(?<quota_type>%{WORD}) quota(?:, %{PIXIU_ALARM_USER_TYPE})?\) of (%{PIXIU_ALARM_COMMON_OLD}|%{PIXIU_ALARM_COMMON_NEW})
1818

19-
PIXIU_ALARM_COMMON_OLD dtree \(name (?<dtree>%{NOTSPACE}), ID (?<dtree_id>%{NUMBER:int})\) at %{UNIXPATH:path} in namespace \(name (?<namespace>%{NOTSPACE}), ID (?<namespace_id>%{NUMBER:int})\)
19+
PIXIU_ALARM_COMMON_OLD dtree \(name (?<dtree>%{NOTSPACE}), ID (?<dtree_id>%{NUMBER:int})\) at %{UNIXPATH:path} in namespace \(name (?<namespace>%{DATA}), ID (?<namespace_id>%{NUMBER:int})\)
2020

21-
PIXIU_ALARM_COMMON_NEW namespace \(name (?<namespace>%{NOTSPACE}), ID (?<namespace_id>%{NUMBER:int})\), dtree \(name (?<dtree>%{NOTSPACE}),\s?ID (?<dtree_id>%{NUMBER:int})\), or path %{UNIXPATH:path}\)?
21+
PIXIU_ALARM_COMMON_NEW namespace \(name (?<namespace>%{DATA}), ID (?<namespace_id>%{NUMBER:int})\), dtree \(name (?<dtree>%{NOTSPACE}),\s?ID (?<dtree_id>%{NUMBER:int})\), or path %{UNIXPATH:path}\)?
2222

2323
PIXIU_USER_INODE_ALARM %{PIXIU_ALARM_PREFIX} %{PIXIU_ALARM_COMMON} reaches (?:or approaches )?(?:to )?the (:?(?<quota_limit_type>%{WORD}) (?:file|space) quantity quota of|(?:file|space) quantity (?<quota_limit_type>%{WORD}) quota of) \((?<quota_files_limit>%{NUMBER:int})\).*
2424

tests/data/pixiu

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,4 +418,21 @@ data = [
418418
"response": 200,
419419
},
420420
},
421+
{
422+
"raw": "<187>Oct 24 13:47:36 HKSTO03-Node1 alarm[79311]: <186>2024-10-24 13:47:35 DST OceanStor-Distributed-Storage 1678359 0xFEA6A000B Major(1): The used space (10KB) of quota (type directory quota) of dtree (name --, ID 0) at / in namespace (name my -new -bucket, ID 592) reaches or approaches to the space hard quota of (10KB). Data will fail to be written.",
423+
"expected": {
424+
"program": "alarm",
425+
"quota_used_type": "directory",
426+
"namespace": "my -new -bucket",
427+
"namespace_id": 592,
428+
"dtree": "--",
429+
"dtree_id": 0,
430+
"used_space": 10000,
431+
"quota_used_type": "space",
432+
"quota_type": "directory",
433+
"quota_limit_type": "hard",
434+
"quota_space_limit": 10000,
435+
"path": "/",
436+
},
437+
},
421438
]

0 commit comments

Comments
 (0)