Skip to content

Commit

Permalink
allow spaces in namespace name
Browse files Browse the repository at this point in the history
  • Loading branch information
wpoely86 committed Nov 27, 2024
1 parent d559e89 commit dfdf88a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
4 changes: 2 additions & 2 deletions files/pixiu
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ PIXIU_QUOTA_SIZE_TYPE (?:(?<used_files>%{NUMBER:int})|(?<used_space>%{PIXIU_BYTE

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})

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})\)
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})\)

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}\)?
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}\)?

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})\).*

Expand Down
17 changes: 17 additions & 0 deletions tests/data/pixiu
Original file line number Diff line number Diff line change
Expand Up @@ -418,4 +418,21 @@ data = [
"response": 200,
},
},
{
"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.",
"expected": {
"program": "alarm",
"quota_used_type": "directory",
"namespace": "my -new -bucket",
"namespace_id": 592,
"dtree": "--",
"dtree_id": 0,
"used_space": 10000,
"quota_used_type": "space",
"quota_type": "directory",
"quota_limit_type": "hard",
"quota_space_limit": 10000,
"path": "/",
},
},
]

0 comments on commit dfdf88a

Please sign in to comment.