Skip to content

Commit 645bf56

Browse files
authored
Merge pull request #27 from wpoely86/extend_namespace_name
allow spaces in namespace name (AB#23492)
2 parents d559e89 + 5ddbeb8 commit 645bf56

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

.github/workflows/testpatterns.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- name: add logstash repo
9-
uses: myci-actions/add-deb-repo@master
9+
uses: myci-actions/add-deb-repo@11
1010
with:
1111
repo: deb https://artifacts.elastic.co/packages/8.x/apt stable main
1212
repo-name: elastic-8.x

files/pixiu

+2-2
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

+17
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)