Compare commits
10 Commits
ebc0c1150f
...
ee7fb475e8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee7fb475e8 | ||
|
|
397df26938 | ||
|
|
88309e4128 | ||
|
|
b9bbe78321 | ||
|
|
8395e94af9 | ||
|
|
5a61b253dc | ||
|
|
8d3f6f0ca3 | ||
|
|
068ba67204 | ||
|
|
f0eb87ef2b | ||
|
|
4da6b41cf9 |
@ -1,25 +0,0 @@
|
|||||||
From 8c73f575b7a61b965b173e8267d8a389f48d5190 Mon Sep 17 00:00:00 2001
|
|
||||||
From: gitee-cmd <chemingdao@huawei.com>
|
|
||||||
Date: Sun, 26 Sep 2021 22:04:31 +0800
|
|
||||||
Subject: [PATCH] fix diag return
|
|
||||||
|
|
||||||
---
|
|
||||||
adoctor-cli/adoctor_cli/commands/diag_cmd.py | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/adoctor-cli/adoctor_cli/commands/diag_cmd.py b/adoctor-cli/adoctor_cli/commands/diag_cmd.py
|
|
||||||
index fb03a0c..9852a9d 100644
|
|
||||||
--- a/adoctor-cli/adoctor_cli/commands/diag_cmd.py
|
|
||||||
+++ b/adoctor-cli/adoctor_cli/commands/diag_cmd.py
|
|
||||||
@@ -143,6 +143,7 @@ class DiagCommand(BaseCommand):
|
|
||||||
}
|
|
||||||
result = request_without_print('POST', diag_url, pyload, header, params.access_token)
|
|
||||||
print(pretty_json(result))
|
|
||||||
+ return
|
|
||||||
times -= 1
|
|
||||||
print("There is no task can be found in diagnosis scheduler, please try again.")
|
|
||||||
|
|
||||||
--
|
|
||||||
2.24.3 (Apple Git-128)
|
|
||||||
|
|
||||||
|
|
||||||
181
0001-fix-host-upload-traceability-configuration-issue.patch
Normal file
181
0001-fix-host-upload-traceability-configuration-issue.patch
Normal file
@ -0,0 +1,181 @@
|
|||||||
|
From a4ed1c140819a528dfdcf58b3d8d39318063cbd0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: smjiao <smjiao@isoftstone.com>
|
||||||
|
Date: Wed, 13 Sep 2023 16:40:44 +0800
|
||||||
|
Subject: [PATCH] Fix host upload traceability configuration issue
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
---
|
||||||
|
.../controllers/management_controller.py | 39 ++++++++++---------
|
||||||
|
gala-ragdoll/ragdoll/utils/object_parse.py | 2 +-
|
||||||
|
2 files changed, 21 insertions(+), 20 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/gala-ragdoll/ragdoll/controllers/management_controller.py b/gala-ragdoll/ragdoll/controllers/management_controller.py
|
||||||
|
index 95b327cb..0610bffb 100644
|
||||||
|
--- a/gala-ragdoll/ragdoll/controllers/management_controller.py
|
||||||
|
+++ b/gala-ragdoll/ragdoll/controllers/management_controller.py
|
||||||
|
@@ -25,7 +25,6 @@ from ragdoll.utils.git_tools import GitTools
|
||||||
|
from ragdoll.utils.yang_module import YangModule
|
||||||
|
from ragdoll.utils.object_parse import ObjectParse
|
||||||
|
|
||||||
|
-
|
||||||
|
TARGETDIR = GitTools().target_dir
|
||||||
|
|
||||||
|
|
||||||
|
@@ -79,7 +78,7 @@ def add_management_confs_in_domain(body=None): # noqa: E501
|
||||||
|
else:
|
||||||
|
codeNum = 400
|
||||||
|
base_rsp = BaseResponse(codeNum, "The input parameters are not compliant, " +
|
||||||
|
- "please check the input parameters.")
|
||||||
|
+ "please check the input parameters.")
|
||||||
|
return base_rsp, codeNum
|
||||||
|
|
||||||
|
successConf = []
|
||||||
|
@@ -93,7 +92,7 @@ def add_management_confs_in_domain(body=None): # noqa: E501
|
||||||
|
if not d_conf.contents.strip():
|
||||||
|
codeNum = 400
|
||||||
|
base_rsp = BaseResponse(codeNum, "The input parameters are not compliant, " +
|
||||||
|
- "please check the input parameters.")
|
||||||
|
+ "please check the input parameters.")
|
||||||
|
return base_rsp, codeNum
|
||||||
|
content_string = object_parse.parse_conf_to_json(d_conf.file_path, d_conf.contents)
|
||||||
|
if not content_string or not json.loads(content_string):
|
||||||
|
@@ -123,7 +122,7 @@ def add_management_confs_in_domain(body=None): # noqa: E501
|
||||||
|
conf_list = list()
|
||||||
|
conf_list.append(d_conf.file_path)
|
||||||
|
exist_host[host_id] = conf_list
|
||||||
|
- for k,v in exist_host:
|
||||||
|
+ for k, v in exist_host.items():
|
||||||
|
confs = dict()
|
||||||
|
confs["host_id"] = k
|
||||||
|
confs["config_list"] = v
|
||||||
|
@@ -134,7 +133,7 @@ def add_management_confs_in_domain(body=None): # noqa: E501
|
||||||
|
url = conf_tools.load_url_by_conf().get("collect_url")
|
||||||
|
headers = {"Content-Type": "application/json"}
|
||||||
|
response = requests.post(url, data=json.dumps(get_real_conf_body), headers=headers) # post request
|
||||||
|
-
|
||||||
|
+
|
||||||
|
response_code = json.loads(response.text).get("code")
|
||||||
|
if response_code == None:
|
||||||
|
codeNum = 500
|
||||||
|
@@ -183,7 +182,7 @@ def add_management_confs_in_domain(body=None): # noqa: E501
|
||||||
|
succ_conf = ""
|
||||||
|
for d_conf in successConf:
|
||||||
|
succ_conf = succ_conf + d_conf + " "
|
||||||
|
- commit_code = git_tools.gitCommit("Add the conf in {} domian, ".format(domain) +
|
||||||
|
+ commit_code = git_tools.gitCommit("Add the conf in {} domian, ".format(domain) +
|
||||||
|
"the path including : {}".format(succ_conf))
|
||||||
|
|
||||||
|
# Joinin together the returned codenum and codeMessage
|
||||||
|
@@ -204,6 +203,7 @@ def add_management_confs_in_domain(body=None): # noqa: E501
|
||||||
|
|
||||||
|
return base_rsp, codeNum
|
||||||
|
|
||||||
|
+
|
||||||
|
def upload_management_confs_in_domain(file=None): # noqa: E501
|
||||||
|
"""upload management configuration items and expected values in the domain
|
||||||
|
|
||||||
|
@@ -304,6 +304,7 @@ def upload_management_confs_in_domain(file=None): # noqa: E501
|
||||||
|
|
||||||
|
return base_rsp, codeNum
|
||||||
|
|
||||||
|
+
|
||||||
|
def delete_management_confs_in_domain(body=None): # noqa: E501
|
||||||
|
"""delete management configuration items and expected values in the domain
|
||||||
|
|
||||||
|
@@ -332,7 +333,7 @@ def delete_management_confs_in_domain(body=None): # noqa: E501
|
||||||
|
codeNum = 400
|
||||||
|
base_rsp = BaseResponse(codeNum, "The current domain does not exist")
|
||||||
|
return base_rsp, codeNum
|
||||||
|
-
|
||||||
|
+
|
||||||
|
# Check whether path is null in advance
|
||||||
|
conf_files = body.conf_files
|
||||||
|
if len(conf_files) == 0:
|
||||||
|
@@ -369,7 +370,7 @@ def delete_management_confs_in_domain(body=None): # noqa: E501
|
||||||
|
try:
|
||||||
|
os.remove(features_path)
|
||||||
|
except OSError as ex:
|
||||||
|
- #logging.error("the path remove failed")
|
||||||
|
+ # logging.error("the path remove failed")
|
||||||
|
break
|
||||||
|
successConf.append(conf.file_path)
|
||||||
|
else:
|
||||||
|
@@ -381,7 +382,7 @@ def delete_management_confs_in_domain(body=None): # noqa: E501
|
||||||
|
succ_conf = ""
|
||||||
|
for d_conf in successConf:
|
||||||
|
succ_conf = succ_conf + d_conf + " "
|
||||||
|
- commit_code = git_tools.gitCommit("delete the conf in {} domian, ".format(domain) +
|
||||||
|
+ commit_code = git_tools.gitCommit("delete the conf in {} domian, ".format(domain) +
|
||||||
|
"the path including : {}".format(succ_conf))
|
||||||
|
|
||||||
|
# Joinin together the returned codenum and codeMessage
|
||||||
|
@@ -427,8 +428,8 @@ def get_management_confs_in_domain(body=None): # noqa: E501
|
||||||
|
return base_rsp, 400
|
||||||
|
|
||||||
|
# The parameters of the initial return value assignment
|
||||||
|
- expected_conf_lists = ConfFiles(domain_name = domain,
|
||||||
|
- conf_files = [])
|
||||||
|
+ expected_conf_lists = ConfFiles(domain_name=domain,
|
||||||
|
+ conf_files=[])
|
||||||
|
|
||||||
|
# get the path in domain
|
||||||
|
domainPath = os.path.join(TARGETDIR, domain)
|
||||||
|
@@ -447,13 +448,13 @@ def get_management_confs_in_domain(body=None): # noqa: E501
|
||||||
|
file_lists = yang_modules.getFilePathInModdule(yang_modules.module_list)
|
||||||
|
file_path = file_lists.get(d_module.name()).split(":")[-1]
|
||||||
|
|
||||||
|
- conf = ConfFile(file_path = file_path, contents = contents)
|
||||||
|
+ conf = ConfFile(file_path=file_path, contents=contents)
|
||||||
|
expected_conf_lists.conf_files.append(conf)
|
||||||
|
print("expected_conf_lists is :{}".format(expected_conf_lists))
|
||||||
|
|
||||||
|
if len(expected_conf_lists.domain_name) > 0:
|
||||||
|
- base_rsp = BaseResponse(200, "Get management configuration items and expected " +
|
||||||
|
- "values in the domain succeccfully")
|
||||||
|
+ base_rsp = BaseResponse(200, "Get management configuration items and expected " +
|
||||||
|
+ "values in the domain succeccfully")
|
||||||
|
else:
|
||||||
|
base_rsp = BaseResponse(400, "The file is Null in this domain")
|
||||||
|
|
||||||
|
@@ -503,8 +504,8 @@ def query_changelog_of_management_confs_in_domain(body=None): # noqa: E501
|
||||||
|
success_conf = []
|
||||||
|
failed_conf = []
|
||||||
|
domain_path = os.path.join(TARGETDIR, domain)
|
||||||
|
- expected_conf_lists = ExceptedConfInfo(domain_name = domain,
|
||||||
|
- conf_base_infos = [])
|
||||||
|
+ expected_conf_lists = ExceptedConfInfo(domain_name=domain,
|
||||||
|
+ conf_base_infos=[])
|
||||||
|
yang_modules = YangModule()
|
||||||
|
for root, dirs, files in os.walk(domain_path):
|
||||||
|
conf_base_infos = []
|
||||||
|
@@ -527,9 +528,9 @@ def query_changelog_of_management_confs_in_domain(body=None): # noqa: E501
|
||||||
|
success_conf.append(file_path)
|
||||||
|
else:
|
||||||
|
failed_conf.append(file_path)
|
||||||
|
- conf_base_info = ConfBaseInfo(file_path = file_path,
|
||||||
|
- expected_contents = expectedValue,
|
||||||
|
- change_log = gitMessage)
|
||||||
|
+ conf_base_info = ConfBaseInfo(file_path=file_path,
|
||||||
|
+ expected_contents=expectedValue,
|
||||||
|
+ change_log=gitMessage)
|
||||||
|
expected_conf_lists.conf_base_infos.append(conf_base_info)
|
||||||
|
|
||||||
|
print("########################## expetedConfInfo ####################")
|
||||||
|
diff --git a/gala-ragdoll/ragdoll/utils/object_parse.py b/gala-ragdoll/ragdoll/utils/object_parse.py
|
||||||
|
index fde2be8c..3d0976e5 100644
|
||||||
|
--- a/gala-ragdoll/ragdoll/utils/object_parse.py
|
||||||
|
+++ b/gala-ragdoll/ragdoll/utils/object_parse.py
|
||||||
|
@@ -94,7 +94,7 @@ class ObjectParse(object):
|
||||||
|
|
||||||
|
# load conf info(json) to model
|
||||||
|
conf_model.read_json(json_list)
|
||||||
|
- if conf_type == "ssh":
|
||||||
|
+ if conf_type == "sshd":
|
||||||
|
conf_info = conf_model.write_conf(spacer_info)
|
||||||
|
else:
|
||||||
|
# to content
|
||||||
|
--
|
||||||
|
Gitee
|
||||||
|
|
||||||
41
0002-fix-kv-bug.patch
Normal file
41
0002-fix-kv-bug.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
From f340e404d50e0d065012a946164d3a86db653306 Mon Sep 17 00:00:00 2001
|
||||||
|
From: smjiao <smjiao@isoftstone.com>
|
||||||
|
Date: Wed, 13 Sep 2023 18:38:20 +0800
|
||||||
|
Subject: fix kv bug
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=utf-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
---
|
||||||
|
gala-ragdoll/ragdoll/utils/object_parse.py | 8 +++++++-
|
||||||
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/gala-ragdoll/ragdoll/utils/object_parse.py b/gala-ragdoll/ragdoll/utils/object_parse.py
|
||||||
|
index 3d0976e..83d22b7 100644
|
||||||
|
--- a/gala-ragdoll/ragdoll/utils/object_parse.py
|
||||||
|
+++ b/gala-ragdoll/ragdoll/utils/object_parse.py
|
||||||
|
@@ -71,7 +71,11 @@ class ObjectParse(object):
|
||||||
|
conf_model.load_yang_model(yang_info)
|
||||||
|
|
||||||
|
# load conf info
|
||||||
|
- conf_model.read_conf(conf_info)
|
||||||
|
+ if conf_type == "kv":
|
||||||
|
+ spacer_type = self._yang_modules.getSpacerInModdule([yang_info])
|
||||||
|
+ conf_model.read_conf(conf_info, spacer_type, yang_info)
|
||||||
|
+ else:
|
||||||
|
+ conf_model.read_conf(conf_info)
|
||||||
|
|
||||||
|
# to json
|
||||||
|
conf_json = self.parse_model_to_json(conf_model)
|
||||||
|
@@ -96,6 +100,8 @@ class ObjectParse(object):
|
||||||
|
conf_model.read_json(json_list)
|
||||||
|
if conf_type == "sshd":
|
||||||
|
conf_info = conf_model.write_conf(spacer_info)
|
||||||
|
+ elif conf_type == "kv":
|
||||||
|
+ conf_info = conf_model.write_conf(spacer_info, yang_info)
|
||||||
|
else:
|
||||||
|
# to content
|
||||||
|
conf_info = conf_model.write_conf()
|
||||||
|
--
|
||||||
|
2.37.1.windows.1
|
||||||
|
|
||||||
@ -1,39 +0,0 @@
|
|||||||
From 5d3a4e2c819d0901994b01f8a33ee0f4fc55fe90 Mon Sep 17 00:00:00 2001
|
|
||||||
From: gitee-cmd <chemingdao@huawei.com>
|
|
||||||
Date: Wed, 29 Sep 2021 19:11:28 +0800
|
|
||||||
Subject: [PATCH] fix log of task execution
|
|
||||||
|
|
||||||
---
|
|
||||||
aops-manager/aops_manager/deploy_manager/view.py | 9 +++++----
|
|
||||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/aops-manager/aops_manager/deploy_manager/view.py b/aops-manager/aops_manager/deploy_manager/view.py
|
|
||||||
index 8d6811b..7a68742 100644
|
|
||||||
--- a/aops-manager/aops_manager/deploy_manager/view.py
|
|
||||||
+++ b/aops-manager/aops_manager/deploy_manager/view.py
|
|
||||||
@@ -195,13 +195,13 @@ class ExecuteTask(Resource):
|
|
||||||
Args:
|
|
||||||
inventory(instance): instance of InventoryBuilder
|
|
||||||
task_id(str): id of a task.
|
|
||||||
- Returns:
|
|
||||||
- bool: The execution flag of the task
|
|
||||||
"""
|
|
||||||
res = TaskRunner.run_task(task_id, HostKey.key)
|
|
||||||
inventory.remove_host_vars_in_inventory()
|
|
||||||
- LOGGER.info("Task %s execution succeed.", task_id)
|
|
||||||
- return res
|
|
||||||
+ if res:
|
|
||||||
+ LOGGER.error("Task %s execution succeeded.", task_id)
|
|
||||||
+ return
|
|
||||||
+ LOGGER.error("Task %s execution failed.", task_id)
|
|
||||||
|
|
||||||
|
|
||||||
class ImportTemplate(Resource):
|
|
||||||
@@ -284,3 +284,4 @@ class DeleteTemplate(Resource):
|
|
||||||
verify_res, 'delete', database_url, args)
|
|
||||||
|
|
||||||
return jsonify(response)
|
|
||||||
+
|
|
||||||
--
|
|
||||||
2.30.0
|
|
||||||
|
|
||||||
@ -1,93 +0,0 @@
|
|||||||
From d3f717d13d2ea70bdcb31dfcef4f7f163f84660e Mon Sep 17 00:00:00 2001
|
|
||||||
From: orange-snn <songnannan2@huawei.com>
|
|
||||||
Date: Wed, 29 Sep 2021 18:44:52 +0800
|
|
||||||
Subject: [PATCH] change the attr of the path in ragdoll
|
|
||||||
|
|
||||||
---
|
|
||||||
gala-ragdoll/ragdoll/controllers/domain_controller.py | 1 +
|
|
||||||
gala-ragdoll/ragdoll/controllers/format.py | 1 +
|
|
||||||
gala-ragdoll/ragdoll/controllers/host_controller.py | 4 ++++
|
|
||||||
gala-ragdoll/ragdoll/utils/conf_tools.py | 2 ++
|
|
||||||
gala-ragdoll/ragdoll/utils/prepare.py | 1 +
|
|
||||||
5 files changed, 9 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/gala-ragdoll/ragdoll/controllers/domain_controller.py b/gala-ragdoll/ragdoll/controllers/domain_controller.py
|
|
||||||
index ba9c6ce6..3c14dba9 100644
|
|
||||||
--- a/gala-ragdoll/ragdoll/controllers/domain_controller.py
|
|
||||||
+++ b/gala-ragdoll/ragdoll/controllers/domain_controller.py
|
|
||||||
@@ -46,6 +46,7 @@ def create_domain(body=None): # noqa: E501
|
|
||||||
else:
|
|
||||||
successDomain.append(tempDomainName)
|
|
||||||
domainPath = os.path.join(TARGETDIR, tempDomainName)
|
|
||||||
+ os.umask(0o077)
|
|
||||||
os.mkdir(domainPath)
|
|
||||||
|
|
||||||
if len(failedDomain) == 0:
|
|
||||||
diff --git a/gala-ragdoll/ragdoll/controllers/format.py b/gala-ragdoll/ragdoll/controllers/format.py
|
|
||||||
index c302a357..6f03986f 100644
|
|
||||||
--- a/gala-ragdoll/ragdoll/controllers/format.py
|
|
||||||
+++ b/gala-ragdoll/ragdoll/controllers/format.py
|
|
||||||
@@ -91,6 +91,7 @@ class Format(object):
|
|
||||||
@staticmethod
|
|
||||||
def addHostToFile(d_file, host):
|
|
||||||
info_json = json.dumps(str(host), sort_keys=False, indent=4, separators=(',', ': '))
|
|
||||||
+ os.umask(0o077)
|
|
||||||
with open(d_file, 'a+') as host_file:
|
|
||||||
host_file.write(info_json)
|
|
||||||
host_file.write("\n")
|
|
||||||
diff --git a/gala-ragdoll/ragdoll/controllers/host_controller.py b/gala-ragdoll/ragdoll/controllers/host_controller.py
|
|
||||||
index 75f767b2..441abde4 100644
|
|
||||||
--- a/gala-ragdoll/ragdoll/controllers/host_controller.py
|
|
||||||
+++ b/gala-ragdoll/ragdoll/controllers/host_controller.py
|
|
||||||
@@ -143,12 +143,16 @@ def delete_host_in_domain(body=None): # noqa: E501
|
|
||||||
codeNum = 500
|
|
||||||
base_rsp = BaseResponse(codeNum, "The host delete failed.")
|
|
||||||
return base_rsp, codeNum
|
|
||||||
+ codeNum = 200
|
|
||||||
+ base_rsp = BaseResponse(codeNum, "All hosts are deleted in the current domain.")
|
|
||||||
+ return base_rsp, codeNum
|
|
||||||
|
|
||||||
# If the domain exists, check whether the current input parameter host belongs to the corresponding
|
|
||||||
# domain. If the host is in the domain, the host is deleted. If the host is no longer in the domain,
|
|
||||||
# the host is added to the failure range
|
|
||||||
containedInHost = []
|
|
||||||
notContainedInHost = []
|
|
||||||
+ os.umask(0o077)
|
|
||||||
for hostInfo in hostInfos:
|
|
||||||
hostId = hostInfo.host_id
|
|
||||||
isContained = False
|
|
||||||
diff --git a/gala-ragdoll/ragdoll/utils/conf_tools.py b/gala-ragdoll/ragdoll/utils/conf_tools.py
|
|
||||||
index cb051a4a..205f236c 100644
|
|
||||||
--- a/gala-ragdoll/ragdoll/utils/conf_tools.py
|
|
||||||
+++ b/gala-ragdoll/ragdoll/utils/conf_tools.py
|
|
||||||
@@ -406,6 +406,7 @@ class ConfTools(object):
|
|
||||||
"""
|
|
||||||
res = False
|
|
||||||
cwd = os.getcwd()
|
|
||||||
+ os.umask(0o077)
|
|
||||||
if not os.path.exists(self._target_dir):
|
|
||||||
os.mkdir(self._target_dir)
|
|
||||||
|
|
||||||
@@ -583,6 +584,7 @@ class ConfTools(object):
|
|
||||||
"""
|
|
||||||
res = False
|
|
||||||
path_delete_last = ""
|
|
||||||
+ os.umask(0o077)
|
|
||||||
if not os.path.exists(path):
|
|
||||||
paths = path.split('/')
|
|
||||||
for d_index in range(0, len(paths) - 1):
|
|
||||||
diff --git a/gala-ragdoll/ragdoll/utils/prepare.py b/gala-ragdoll/ragdoll/utils/prepare.py
|
|
||||||
index f8bc7314..a8a06c0a 100644
|
|
||||||
--- a/gala-ragdoll/ragdoll/utils/prepare.py
|
|
||||||
+++ b/gala-ragdoll/ragdoll/utils/prepare.py
|
|
||||||
@@ -20,6 +20,7 @@ class Prepare(object):
|
|
||||||
if os.path.exists(self._target_dir):
|
|
||||||
rest = self.git_init(username, useremail)
|
|
||||||
return rest
|
|
||||||
+ os.umask(0o077)
|
|
||||||
cmd1 = "mkdir -p {}".format(self._target_dir)
|
|
||||||
git_tools = GitTools(self._target_dir)
|
|
||||||
mkdir_code = git_tools.run_shell_return_code(cmd1)
|
|
||||||
--
|
|
||||||
Gitee
|
|
||||||
|
|
||||||
106
0003-fix-server-startup-error.patch
Normal file
106
0003-fix-server-startup-error.patch
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
From 44f16e2e840516cb4b0ce50d63e25db744451f2c Mon Sep 17 00:00:00 2001
|
||||||
|
From: smjiao <smjiao@isoftstone.com>
|
||||||
|
Date: Thu, 14 Sep 2023 11:02:05 +0800
|
||||||
|
Subject: fix server startup error
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=utf-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
---
|
||||||
|
.../ragdoll/const/conf_handler_const.py | 8 +++
|
||||||
|
.../ragdoll/controllers/confs_controller.py | 56 +++++++++++++++++++
|
||||||
|
2 files changed, 64 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/gala-ragdoll/ragdoll/const/conf_handler_const.py b/gala-ragdoll/ragdoll/const/conf_handler_const.py
|
||||||
|
index 8ef5ca6..6780dfe 100644
|
||||||
|
--- a/gala-ragdoll/ragdoll/const/conf_handler_const.py
|
||||||
|
+++ b/gala-ragdoll/ragdoll/const/conf_handler_const.py
|
||||||
|
@@ -16,5 +16,13 @@
|
||||||
|
@Author: JiaoSiMao
|
||||||
|
Description:
|
||||||
|
"""
|
||||||
|
+import re
|
||||||
|
+
|
||||||
|
NOT_SYNCHRONIZE = "NOT SYNCHRONIZE"
|
||||||
|
SYNCHRONIZED = "SYNCHRONIZED"
|
||||||
|
+LIMITS_DOMAIN_RE = re.compile('(^[*]$)|(^[@|0-9A-Za-z]+[0-9A-Za-z]$)')
|
||||||
|
+LIMITS_TYPE_VALUE = "soft|hard|-|"
|
||||||
|
+LIMITS_ITEM_VALUE = "core|data|fsize|memlock|nofile|rss|stack|cpu|nproc|as|maxlogins|maxsyslogins|priority|locks|sigpending|" \
|
||||||
|
+ "msgqueue|nice|rtprio|"
|
||||||
|
+RESOLV_KEY_VALUE = "nameserver|domain|search|sortlist|"
|
||||||
|
+FSTAB_COLUMN_NUM = 6
|
||||||
|
\ No newline at end of file
|
||||||
|
diff --git a/gala-ragdoll/ragdoll/controllers/confs_controller.py b/gala-ragdoll/ragdoll/controllers/confs_controller.py
|
||||||
|
index 814c875..7703c7c 100644
|
||||||
|
--- a/gala-ragdoll/ragdoll/controllers/confs_controller.py
|
||||||
|
+++ b/gala-ragdoll/ragdoll/controllers/confs_controller.py
|
||||||
|
@@ -27,6 +27,7 @@ from ragdoll.utils.conf_tools import ConfTools
|
||||||
|
from ragdoll.utils.host_tools import HostTools
|
||||||
|
from ragdoll.utils.object_parse import ObjectParse
|
||||||
|
from ragdoll import util
|
||||||
|
+from ragdoll.const.conf_files import yang_conf_list
|
||||||
|
|
||||||
|
TARGETDIR = GitTools().target_dir
|
||||||
|
|
||||||
|
@@ -509,3 +510,58 @@ def sync_conf_to_host_from_domain(body=None): # noqa: E501
|
||||||
|
sync_res.append(host_sync_result)
|
||||||
|
|
||||||
|
return sync_res
|
||||||
|
+
|
||||||
|
+def query_supported_confs(body=None):
|
||||||
|
+ """
|
||||||
|
+ query supported configuration list # noqa: E501
|
||||||
|
+
|
||||||
|
+ :param body:
|
||||||
|
+ :type body: dict | bytes
|
||||||
|
+
|
||||||
|
+ :rtype: List
|
||||||
|
+ """
|
||||||
|
+ if connexion.request.is_json:
|
||||||
|
+ body = DomainName.from_dict(connexion.request.get_json())
|
||||||
|
+
|
||||||
|
+ domain = body.domain_name
|
||||||
|
+
|
||||||
|
+ check_res = Format.domainCheck(domain)
|
||||||
|
+ if not check_res:
|
||||||
|
+ code_num = 400
|
||||||
|
+ base_rsp = BaseResponse(code_num, "Failed to verify the input parameter, please check the input parameters.")
|
||||||
|
+ return base_rsp, code_num
|
||||||
|
+
|
||||||
|
+ is_exist = Format.isDomainExist(domain)
|
||||||
|
+ if not is_exist:
|
||||||
|
+ code_num = 404
|
||||||
|
+ base_rsp = BaseResponse(code_num, "The current domain does not exist, please create the domain first.")
|
||||||
|
+ return base_rsp, code_num
|
||||||
|
+
|
||||||
|
+ conf_tools = ConfTools()
|
||||||
|
+ port = conf_tools.load_port_by_conf()
|
||||||
|
+ url = "http://0.0.0.0:" + port + "/management/getManagementConf"
|
||||||
|
+ headers = {"Content-Type": "application/json"}
|
||||||
|
+ get_man_conf_body = DomainName(domain_name=domain)
|
||||||
|
+ print("body is : {}".format(get_man_conf_body))
|
||||||
|
+ response = requests.post(url, data=json.dumps(get_man_conf_body), headers=headers) # post request
|
||||||
|
+ print("response is : {}".format(response.text))
|
||||||
|
+ res_code = response.status_code
|
||||||
|
+ res_json = json.loads(response.text)
|
||||||
|
+ print("return code is : {}".format(response.status_code))
|
||||||
|
+
|
||||||
|
+ if res_code != 200:
|
||||||
|
+ code_num = res_code
|
||||||
|
+ base_rsp = BaseResponse(code_num,
|
||||||
|
+ "Failed to query the configuration items managed in the current domain. " +
|
||||||
|
+ "The failure reason is:" + res_json)
|
||||||
|
+ return base_rsp, code_num
|
||||||
|
+
|
||||||
|
+ conf_files = res_json.get("confFiles")
|
||||||
|
+ if len(conf_files) == 0:
|
||||||
|
+ return yang_conf_list
|
||||||
|
+
|
||||||
|
+ exist_conf_list = []
|
||||||
|
+ for conf in conf_files:
|
||||||
|
+ exist_conf_list.append(conf.get('filePath'))
|
||||||
|
+
|
||||||
|
+ return list(set(yang_conf_list).difference(set(exist_conf_list)))
|
||||||
|
--
|
||||||
|
2.37.1.windows.1
|
||||||
|
|
||||||
193
0004-codecheck.patch
Normal file
193
0004-codecheck.patch
Normal file
@ -0,0 +1,193 @@
|
|||||||
|
From faaf35ce2ed973e5bd5b997dd4304b5a24fadb82 Mon Sep 17 00:00:00 2001
|
||||||
|
From: smjiao <smjiao@isoftstone.com>
|
||||||
|
Date: Thu, 14 Sep 2023 11:10:04 +0800
|
||||||
|
Subject: code check
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=utf-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
---
|
||||||
|
.../ragdoll/const/conf_handler_const.py | 7 +--
|
||||||
|
.../ragdoll/controllers/confs_controller.py | 51 ++++++++++---------
|
||||||
|
2 files changed, 32 insertions(+), 26 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/gala-ragdoll/ragdoll/const/conf_handler_const.py b/gala-ragdoll/ragdoll/const/conf_handler_const.py
|
||||||
|
index 6780dfe..0533423 100644
|
||||||
|
--- a/gala-ragdoll/ragdoll/const/conf_handler_const.py
|
||||||
|
+++ b/gala-ragdoll/ragdoll/const/conf_handler_const.py
|
||||||
|
@@ -22,7 +22,8 @@ NOT_SYNCHRONIZE = "NOT SYNCHRONIZE"
|
||||||
|
SYNCHRONIZED = "SYNCHRONIZED"
|
||||||
|
LIMITS_DOMAIN_RE = re.compile('(^[*]$)|(^[@|0-9A-Za-z]+[0-9A-Za-z]$)')
|
||||||
|
LIMITS_TYPE_VALUE = "soft|hard|-|"
|
||||||
|
-LIMITS_ITEM_VALUE = "core|data|fsize|memlock|nofile|rss|stack|cpu|nproc|as|maxlogins|maxsyslogins|priority|locks|sigpending|" \
|
||||||
|
- "msgqueue|nice|rtprio|"
|
||||||
|
+LIMITS_ITEM_VALUE = "core|data|fsize|memlock|nofile|rss|stack|cpu|nproc|as|maxlogins|" \
|
||||||
|
+ "maxsyslogins|priority|locks|sigpending|" \
|
||||||
|
+ "msgqueue|nice|rtprio|"
|
||||||
|
RESOLV_KEY_VALUE = "nameserver|domain|search|sortlist|"
|
||||||
|
-FSTAB_COLUMN_NUM = 6
|
||||||
|
\ No newline at end of file
|
||||||
|
+FSTAB_COLUMN_NUM = 6
|
||||||
|
diff --git a/gala-ragdoll/ragdoll/controllers/confs_controller.py b/gala-ragdoll/ragdoll/controllers/confs_controller.py
|
||||||
|
index 7703c7c..ae766fa 100644
|
||||||
|
--- a/gala-ragdoll/ragdoll/controllers/confs_controller.py
|
||||||
|
+++ b/gala-ragdoll/ragdoll/controllers/confs_controller.py
|
||||||
|
@@ -31,6 +31,7 @@ from ragdoll.const.conf_files import yang_conf_list
|
||||||
|
|
||||||
|
TARGETDIR = GitTools().target_dir
|
||||||
|
|
||||||
|
+
|
||||||
|
def get_the_sync_status_of_domain(body=None): # noqa: E501
|
||||||
|
"""
|
||||||
|
get the status of the domain
|
||||||
|
@@ -64,8 +65,8 @@ def get_the_sync_status_of_domain(body=None): # noqa: E501
|
||||||
|
is_host_list_exist = Format.isHostInDomain(domain)
|
||||||
|
if not is_host_list_exist:
|
||||||
|
code_num = 404
|
||||||
|
- base_rsp = BaseResponse(code_num, "The host information is not set in the current domain." +
|
||||||
|
- "Please add the host information first")
|
||||||
|
+ base_rsp = BaseResponse(code_num, "The host information is not set in the current domain." +
|
||||||
|
+ "Please add the host information first")
|
||||||
|
return base_rsp, code_num
|
||||||
|
|
||||||
|
# get the host info in domain
|
||||||
|
@@ -83,15 +84,15 @@ def get_the_sync_status_of_domain(body=None): # noqa: E501
|
||||||
|
|
||||||
|
if res_code != 200:
|
||||||
|
code_num = res_code
|
||||||
|
- base_rsp = BaseResponse(code_num, "Failed to get host info in the current domain. " +
|
||||||
|
- "The failure reason is:" + res_text.get('msg'))
|
||||||
|
+ base_rsp = BaseResponse(code_num, "Failed to get host info in the current domain. " +
|
||||||
|
+ "The failure reason is:" + res_text.get('msg'))
|
||||||
|
return base_rsp, code_num
|
||||||
|
|
||||||
|
if len(res_text) == 0:
|
||||||
|
code_num = 404
|
||||||
|
|
||||||
|
- base_rsp = BaseResponse(code_num, "The host currently controlled in the domain is empty." +
|
||||||
|
- "Please add host information to the domain.")
|
||||||
|
+ base_rsp = BaseResponse(code_num, "The host currently controlled in the domain is empty." +
|
||||||
|
+ "Please add host information to the domain.")
|
||||||
|
return base_rsp, code_num
|
||||||
|
|
||||||
|
# get the host list from the git house
|
||||||
|
@@ -104,22 +105,24 @@ def get_the_sync_status_of_domain(body=None): # noqa: E501
|
||||||
|
get_man_conf_url = "http://0.0.0.0:" + port + "/management/getManagementConf"
|
||||||
|
headers = {"Content-Type": "application/json"}
|
||||||
|
get_man_conf_body = DomainName(domain_name=domain)
|
||||||
|
- get_man_conf_res = requests.post(get_man_conf_url, data=json.dumps(get_man_conf_body), headers=headers) # post request
|
||||||
|
+ get_man_conf_res = requests.post(get_man_conf_url, data=json.dumps(get_man_conf_body),
|
||||||
|
+ headers=headers) # post request
|
||||||
|
man_ronf_res_text = json.loads(get_man_conf_res.text)
|
||||||
|
manage_confs = man_ronf_res_text.get("confFiles")
|
||||||
|
print("manage_confs is : {}".format(manage_confs))
|
||||||
|
|
||||||
|
if len(manage_confs) == 0:
|
||||||
|
code_num = 404
|
||||||
|
- base_rsp = BaseResponse(code_num, "The configuration is not set in the current domain." +
|
||||||
|
- "Please add the configuration information first.")
|
||||||
|
+ base_rsp = BaseResponse(code_num, "The configuration is not set in the current domain." +
|
||||||
|
+ "Please add the configuration information first.")
|
||||||
|
return base_rsp, code_num
|
||||||
|
|
||||||
|
# query the real conf in host
|
||||||
|
print("############## query the real conf ##############")
|
||||||
|
get_real_conf_url = "http://0.0.0.0:" + port + "/confs/queryRealConfs"
|
||||||
|
query_real_body = ConfHost(domain_name=domain, host_ids=host_ids)
|
||||||
|
- get_res_conf_res = requests.post(get_real_conf_url, data=json.dumps(query_real_body), headers=headers) # post request
|
||||||
|
+ get_res_conf_res = requests.post(get_real_conf_url, data=json.dumps(query_real_body),
|
||||||
|
+ headers=headers) # post request
|
||||||
|
real_conf_res_code = get_res_conf_res.status_code
|
||||||
|
real_conf_res_text = json.loads(get_res_conf_res.text)
|
||||||
|
print("real_conf_res_text is : {}".format(real_conf_res_text))
|
||||||
|
@@ -273,8 +276,8 @@ def query_real_confs(body=None): # noqa: E501
|
||||||
|
print("is_host_list_exist is : {}".format(is_host_list_exist))
|
||||||
|
if not is_host_list_exist:
|
||||||
|
code_num = 400
|
||||||
|
- base_rsp = BaseResponse(code_num, "The host information is not set in the current domain." +
|
||||||
|
- "Please add the host information first")
|
||||||
|
+ base_rsp = BaseResponse(code_num, "The host information is not set in the current domain." +
|
||||||
|
+ "Please add the host information first")
|
||||||
|
return base_rsp, code_num
|
||||||
|
|
||||||
|
# get all hosts managed by the current domain.
|
||||||
|
@@ -300,8 +303,8 @@ def query_real_confs(body=None): # noqa: E501
|
||||||
|
|
||||||
|
if len(exist_host) == 0 or len(failed_host) == len(host_list):
|
||||||
|
code_num = 400
|
||||||
|
- base_rsp = BaseResponse(code_num, "The host information is not set in the current domain." +
|
||||||
|
- "Please add the host information first")
|
||||||
|
+ base_rsp = BaseResponse(code_num, "The host information is not set in the current domain." +
|
||||||
|
+ "Please add the host information first")
|
||||||
|
return base_rsp, code_num
|
||||||
|
|
||||||
|
# get the management conf in domain
|
||||||
|
@@ -318,14 +321,14 @@ def query_real_confs(body=None): # noqa: E501
|
||||||
|
|
||||||
|
if res_code != 200:
|
||||||
|
code_num = res_code
|
||||||
|
- base_rsp = BaseResponse(code_num, "Failed to query the configuration items managed in the current domain. " +
|
||||||
|
- "The failure reason is:" + res_text)
|
||||||
|
+ base_rsp = BaseResponse(code_num, "Failed to query the configuration items managed in the current domain. " +
|
||||||
|
+ "The failure reason is:" + res_text)
|
||||||
|
return base_rsp, code_num
|
||||||
|
conf_files = res_text.get("confFiles")
|
||||||
|
if len(conf_files) == 0:
|
||||||
|
code_num = 400
|
||||||
|
- base_rsp = BaseResponse(code_num, "The configuration is not set in the current domain." +
|
||||||
|
- "Please add the configuration information first")
|
||||||
|
+ base_rsp = BaseResponse(code_num, "The configuration is not set in the current domain." +
|
||||||
|
+ "Please add the configuration information first")
|
||||||
|
return base_rsp, code_num
|
||||||
|
|
||||||
|
res = []
|
||||||
|
@@ -407,7 +410,7 @@ def query_real_confs(body=None): # noqa: E501
|
||||||
|
code_num = 400
|
||||||
|
res_text = "The real configuration does not found."
|
||||||
|
base_rsp = BaseResponse(code_num, "Real configuration query failed." +
|
||||||
|
- "The failure reason is : " + res_text)
|
||||||
|
+ "The failure reason is : " + res_text)
|
||||||
|
return base_rsp, code_num
|
||||||
|
|
||||||
|
return res
|
||||||
|
@@ -469,8 +472,8 @@ def sync_conf_to_host_from_domain(body=None): # noqa: E501
|
||||||
|
|
||||||
|
if len(exist_host) == 0:
|
||||||
|
code_num = 400
|
||||||
|
- base_rsp = BaseResponse(code_num, "The host information is not set in the current domain." +
|
||||||
|
- "Please add the host information first")
|
||||||
|
+ base_rsp = BaseResponse(code_num, "The host information is not set in the current domain." +
|
||||||
|
+ "Please add the host information first")
|
||||||
|
return base_rsp, code_num
|
||||||
|
|
||||||
|
# get the management conf in domain
|
||||||
|
@@ -478,7 +481,8 @@ def sync_conf_to_host_from_domain(body=None): # noqa: E501
|
||||||
|
get_man_conf_url = "http://0.0.0.0:" + port + "/management/getManagementConf"
|
||||||
|
headers = {"Content-Type": "application/json"}
|
||||||
|
get_man_conf_body = DomainName(domain_name=domain)
|
||||||
|
- get_man_conf_res = requests.post(get_man_conf_url, data=json.dumps(get_man_conf_body), headers=headers) # post request
|
||||||
|
+ get_man_conf_res = requests.post(get_man_conf_url, data=json.dumps(get_man_conf_body),
|
||||||
|
+ headers=headers) # post request
|
||||||
|
man_conf_res_text = json.loads(get_man_conf_res.text)
|
||||||
|
manage_confs = man_conf_res_text.get("confFiles")
|
||||||
|
print("manage_confs is : {}".format(manage_confs))
|
||||||
|
@@ -487,7 +491,7 @@ def sync_conf_to_host_from_domain(body=None): # noqa: E501
|
||||||
|
sync_res = []
|
||||||
|
for d_host in exist_host:
|
||||||
|
host_sync_result = HostSyncResult(host_id=d_host,
|
||||||
|
- sync_result=[])
|
||||||
|
+ sync_result=[])
|
||||||
|
for d_man_conf in manage_confs:
|
||||||
|
file_path = d_man_conf.get("filePath").split(":")[-1]
|
||||||
|
contents = d_man_conf.get("contents")
|
||||||
|
@@ -511,6 +515,7 @@ def sync_conf_to_host_from_domain(body=None): # noqa: E501
|
||||||
|
|
||||||
|
return sync_res
|
||||||
|
|
||||||
|
+
|
||||||
|
def query_supported_confs(body=None):
|
||||||
|
"""
|
||||||
|
query supported configuration list # noqa: E501
|
||||||
|
--
|
||||||
|
2.37.1.windows.1
|
||||||
|
|
||||||
@ -1,55 +0,0 @@
|
|||||||
From 1e99582df4fd558ed52ee3d3c4b6522b2251000f Mon Sep 17 00:00:00 2001
|
|
||||||
From: gitee-cmd <chemingdao@huawei.com>
|
|
||||||
Date: Thu, 30 Sep 2021 09:33:56 +0800
|
|
||||||
Subject: [PATCH] fix logos' instructions and size
|
|
||||||
|
|
||||||
---
|
|
||||||
aops-web/src/appCore/components/GlobalFooter/index.vue | 2 +-
|
|
||||||
aops-web/src/appCore/layouts/BasicLayout.vue | 6 +++++-
|
|
||||||
aops-web/src/appCore/layouts/UserLayout.vue | 1 -
|
|
||||||
3 files changed, 6 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/aops-web/src/appCore/components/GlobalFooter/index.vue b/aops-web/src/appCore/components/GlobalFooter/index.vue
|
|
||||||
index 839ddc8..b485907 100644
|
|
||||||
--- a/aops-web/src/appCore/components/GlobalFooter/index.vue
|
|
||||||
+++ b/aops-web/src/appCore/components/GlobalFooter/index.vue
|
|
||||||
@@ -11,7 +11,7 @@
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template v-slot:copyright>
|
|
||||||
- logo
|
|
||||||
+ <img src="~@/assets/horizontal-left.png" style="height: 20px" class="logo" alt="logo">
|
|
||||||
</template>
|
|
||||||
</global-footer>
|
|
||||||
</template>
|
|
||||||
diff --git a/aops-web/src/appCore/layouts/BasicLayout.vue b/aops-web/src/appCore/layouts/BasicLayout.vue
|
|
||||||
index e4fd9f8..ca29cdc 100644
|
|
||||||
--- a/aops-web/src/appCore/layouts/BasicLayout.vue
|
|
||||||
+++ b/aops-web/src/appCore/layouts/BasicLayout.vue
|
|
||||||
@@ -139,6 +139,10 @@ export default {
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
-<style lang="less">
|
|
||||||
+<style lang="less" scoped>
|
|
||||||
@import "./BasicLayout.less";
|
|
||||||
+.logo {
|
|
||||||
+ height: auto;
|
|
||||||
+ width: 32px;
|
|
||||||
+}
|
|
||||||
</style>
|
|
||||||
diff --git a/aops-web/src/appCore/layouts/UserLayout.vue b/aops-web/src/appCore/layouts/UserLayout.vue
|
|
||||||
index 36826de..15eb79d 100644
|
|
||||||
--- a/aops-web/src/appCore/layouts/UserLayout.vue
|
|
||||||
+++ b/aops-web/src/appCore/layouts/UserLayout.vue
|
|
||||||
@@ -126,7 +126,6 @@ export default {
|
|
||||||
.logo {
|
|
||||||
height: 80px;
|
|
||||||
vertical-align: top;
|
|
||||||
- margin-right: 16px;
|
|
||||||
border-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.30.0
|
|
||||||
|
|
||||||
@ -1,215 +0,0 @@
|
|||||||
From fe8dbb66a6d383845d33601f58ed9bf7bfabed1c Mon Sep 17 00:00:00 2001
|
|
||||||
From: gitee-cmd <chemingdao@huawei.com>
|
|
||||||
Date: Tue, 22 Feb 2022 22:13:18 +0800
|
|
||||||
Subject: [PATCH] fix the python3-libselinux dependency
|
|
||||||
|
|
||||||
---
|
|
||||||
.../tasks/install_adoctor_check_executor.yml | 1 +
|
|
||||||
.../tasks/install_adoctor_check_scheduler.yml | 1 +
|
|
||||||
.../tasks/install_adoctor_diag_executor.yml | 1 +
|
|
||||||
.../tasks/install_adoctor_diag_scheduler.yml | 1 +
|
|
||||||
.../roles/elasticsearch/tasks/install_elasticsearch.yml | 1 +
|
|
||||||
.../roles/fluentd/tasks/install_fluentd.yml | 1 +
|
|
||||||
.../roles/gala_gopher/tasks/install_gala_gopher.yml | 1 +
|
|
||||||
.../roles/gala_ragdoll/tasks/install_gala_ragdoll.yml | 1 +
|
|
||||||
.../roles/gala_spider/tasks/install_gala_spider.yml | 1 +
|
|
||||||
.../ansible_handler/roles/kafka/tasks/install_kafka.yml | 1 +
|
|
||||||
.../ansible_handler/roles/kafka/tasks/start_kafka.yml | 2 +-
|
|
||||||
.../ansible_handler/roles/mysql/tasks/install_mysql.yml | 1 +
|
|
||||||
.../roles/node_exporter/tasks/install_node_exporter.yml | 1 +
|
|
||||||
.../roles/prometheus/tasks/install_prometheus.yml | 1 +
|
|
||||||
.../ansible_handler/roles/read_config/tasks/main.yml | 8 ++++++++
|
|
||||||
.../roles/zookeeper/tasks/install_zookeeper.yml | 1 +
|
|
||||||
aops-manager/aops_manager/deploy_manager/view.py | 2 +-
|
|
||||||
17 files changed, 24 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/adoctor_check_executor/tasks/install_adoctor_check_executor.yml b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/adoctor_check_executor/tasks/install_adoctor_check_executor.yml
|
|
||||||
index daf4bee8..dcc1de75 100644
|
|
||||||
--- a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/adoctor_check_executor/tasks/install_adoctor_check_executor.yml
|
|
||||||
+++ b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/adoctor_check_executor/tasks/install_adoctor_check_executor.yml
|
|
||||||
@@ -5,4 +5,5 @@
|
|
||||||
dnf:
|
|
||||||
state: latest
|
|
||||||
name:
|
|
||||||
+ - python3-libselinux
|
|
||||||
- adoctor-check-executor
|
|
||||||
diff --git a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/adoctor_check_scheduler/tasks/install_adoctor_check_scheduler.yml b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/adoctor_check_scheduler/tasks/install_adoctor_check_scheduler.yml
|
|
||||||
index e3315fe9..8085a62c 100644
|
|
||||||
--- a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/adoctor_check_scheduler/tasks/install_adoctor_check_scheduler.yml
|
|
||||||
+++ b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/adoctor_check_scheduler/tasks/install_adoctor_check_scheduler.yml
|
|
||||||
@@ -5,4 +5,5 @@
|
|
||||||
dnf:
|
|
||||||
state: latest
|
|
||||||
name:
|
|
||||||
+ - python3-libselinux
|
|
||||||
- adoctor-check-scheduler
|
|
||||||
diff --git a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/adoctor_diag_executor/tasks/install_adoctor_diag_executor.yml b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/adoctor_diag_executor/tasks/install_adoctor_diag_executor.yml
|
|
||||||
index c7019508..dec4cc6b 100644
|
|
||||||
--- a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/adoctor_diag_executor/tasks/install_adoctor_diag_executor.yml
|
|
||||||
+++ b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/adoctor_diag_executor/tasks/install_adoctor_diag_executor.yml
|
|
||||||
@@ -5,4 +5,5 @@
|
|
||||||
dnf:
|
|
||||||
state: latest
|
|
||||||
name:
|
|
||||||
+ - python3-libselinux
|
|
||||||
- adoctor-diag-executor
|
|
||||||
diff --git a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/adoctor_diag_scheduler/tasks/install_adoctor_diag_scheduler.yml b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/adoctor_diag_scheduler/tasks/install_adoctor_diag_scheduler.yml
|
|
||||||
index c833c82f..b0800be3 100644
|
|
||||||
--- a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/adoctor_diag_scheduler/tasks/install_adoctor_diag_scheduler.yml
|
|
||||||
+++ b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/adoctor_diag_scheduler/tasks/install_adoctor_diag_scheduler.yml
|
|
||||||
@@ -5,4 +5,5 @@
|
|
||||||
dnf:
|
|
||||||
state: latest
|
|
||||||
name:
|
|
||||||
+ - python3-libselinux
|
|
||||||
- adoctor-diag-scheduler
|
|
||||||
diff --git a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/elasticsearch/tasks/install_elasticsearch.yml b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/elasticsearch/tasks/install_elasticsearch.yml
|
|
||||||
index 933e7cc5..f8bb1540 100644
|
|
||||||
--- a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/elasticsearch/tasks/install_elasticsearch.yml
|
|
||||||
+++ b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/elasticsearch/tasks/install_elasticsearch.yml
|
|
||||||
@@ -18,4 +18,5 @@
|
|
||||||
dnf:
|
|
||||||
state: latest
|
|
||||||
name:
|
|
||||||
+ - python3-libselinux
|
|
||||||
- elasticsearch
|
|
||||||
diff --git a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/fluentd/tasks/install_fluentd.yml b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/fluentd/tasks/install_fluentd.yml
|
|
||||||
index b6e2c02a..1ff58a0a 100644
|
|
||||||
--- a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/fluentd/tasks/install_fluentd.yml
|
|
||||||
+++ b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/fluentd/tasks/install_fluentd.yml
|
|
||||||
@@ -5,6 +5,7 @@
|
|
||||||
dnf:
|
|
||||||
state: latest
|
|
||||||
name:
|
|
||||||
+ - python3-libselinux
|
|
||||||
- rubygem-fluentd
|
|
||||||
- rubygem-fluent-plugin-elasticsearch
|
|
||||||
|
|
||||||
diff --git a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/gala_gopher/tasks/install_gala_gopher.yml b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/gala_gopher/tasks/install_gala_gopher.yml
|
|
||||||
index 1e3e89bb..f1431559 100644
|
|
||||||
--- a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/gala_gopher/tasks/install_gala_gopher.yml
|
|
||||||
+++ b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/gala_gopher/tasks/install_gala_gopher.yml
|
|
||||||
@@ -5,4 +5,5 @@
|
|
||||||
dnf:
|
|
||||||
state: latest
|
|
||||||
name:
|
|
||||||
+ - python3-libselinux
|
|
||||||
- gala-gopher
|
|
||||||
diff --git a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/gala_ragdoll/tasks/install_gala_ragdoll.yml b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/gala_ragdoll/tasks/install_gala_ragdoll.yml
|
|
||||||
index bbcaec3c..09343941 100644
|
|
||||||
--- a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/gala_ragdoll/tasks/install_gala_ragdoll.yml
|
|
||||||
+++ b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/gala_ragdoll/tasks/install_gala_ragdoll.yml
|
|
||||||
@@ -5,4 +5,5 @@
|
|
||||||
dnf:
|
|
||||||
state: latest
|
|
||||||
name:
|
|
||||||
+ - python3-libselinux
|
|
||||||
- python3-gala-ragdoll
|
|
||||||
diff --git a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/gala_spider/tasks/install_gala_spider.yml b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/gala_spider/tasks/install_gala_spider.yml
|
|
||||||
index e93a6b73..b4b8e4d0 100644
|
|
||||||
--- a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/gala_spider/tasks/install_gala_spider.yml
|
|
||||||
+++ b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/gala_spider/tasks/install_gala_spider.yml
|
|
||||||
@@ -5,5 +5,6 @@
|
|
||||||
dnf:
|
|
||||||
state: latest
|
|
||||||
name:
|
|
||||||
+ - python3-libselinux
|
|
||||||
- gala-spider
|
|
||||||
- python3-gala-spider
|
|
||||||
diff --git a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/kafka/tasks/install_kafka.yml b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/kafka/tasks/install_kafka.yml
|
|
||||||
index 9a90ca75..6fa8da8f 100644
|
|
||||||
--- a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/kafka/tasks/install_kafka.yml
|
|
||||||
+++ b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/kafka/tasks/install_kafka.yml
|
|
||||||
@@ -18,6 +18,7 @@
|
|
||||||
dnf:
|
|
||||||
state: latest
|
|
||||||
name:
|
|
||||||
+ - python3-libselinux
|
|
||||||
- kafka
|
|
||||||
|
|
||||||
- name: Copy kafka.service file
|
|
||||||
diff --git a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/kafka/tasks/start_kafka.yml b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/kafka/tasks/start_kafka.yml
|
|
||||||
index 313ef742..9272348a 100644
|
|
||||||
--- a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/kafka/tasks/start_kafka.yml
|
|
||||||
+++ b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/kafka/tasks/start_kafka.yml
|
|
||||||
@@ -8,4 +8,4 @@
|
|
||||||
|
|
||||||
# Checking the Service Status
|
|
||||||
- name: Verify kafka is listening on {{ kafka_port }}
|
|
||||||
- wait_for: host={{ ansible_host }} port={{ kafka_port }} delay=10 timeout=20
|
|
||||||
+ wait_for: host={{ ansible_host }} port={{ kafka_port }} delay=20 timeout=40
|
|
||||||
diff --git a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/mysql/tasks/install_mysql.yml b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/mysql/tasks/install_mysql.yml
|
|
||||||
index 93733efa..94a0f6a2 100644
|
|
||||||
--- a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/mysql/tasks/install_mysql.yml
|
|
||||||
+++ b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/mysql/tasks/install_mysql.yml
|
|
||||||
@@ -5,4 +5,5 @@
|
|
||||||
dnf:
|
|
||||||
state: latest
|
|
||||||
name:
|
|
||||||
+ - python3-libselinux
|
|
||||||
- mysql-server
|
|
||||||
diff --git a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/node_exporter/tasks/install_node_exporter.yml b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/node_exporter/tasks/install_node_exporter.yml
|
|
||||||
index 0913e7f2..813da8e6 100644
|
|
||||||
--- a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/node_exporter/tasks/install_node_exporter.yml
|
|
||||||
+++ b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/node_exporter/tasks/install_node_exporter.yml
|
|
||||||
@@ -5,4 +5,5 @@
|
|
||||||
dnf:
|
|
||||||
state: latest
|
|
||||||
name:
|
|
||||||
+ - python3-libselinux
|
|
||||||
- node_exporter
|
|
||||||
diff --git a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/prometheus/tasks/install_prometheus.yml b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/prometheus/tasks/install_prometheus.yml
|
|
||||||
index 3305a673..30adf85b 100644
|
|
||||||
--- a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/prometheus/tasks/install_prometheus.yml
|
|
||||||
+++ b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/prometheus/tasks/install_prometheus.yml
|
|
||||||
@@ -5,4 +5,5 @@
|
|
||||||
dnf:
|
|
||||||
state: latest
|
|
||||||
name:
|
|
||||||
+ - python3-libselinux
|
|
||||||
- prometheus2
|
|
||||||
diff --git a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/read_config/tasks/main.yml b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/read_config/tasks/main.yml
|
|
||||||
index 3067c5be..775f5513 100644
|
|
||||||
--- a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/read_config/tasks/main.yml
|
|
||||||
+++ b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/read_config/tasks/main.yml
|
|
||||||
@@ -1,4 +1,12 @@
|
|
||||||
---
|
|
||||||
+- name: Install python3-libselinux
|
|
||||||
+ become: true
|
|
||||||
+ become_user: root
|
|
||||||
+ dnf:
|
|
||||||
+ state: latest
|
|
||||||
+ name:
|
|
||||||
+ - python3-libselinux
|
|
||||||
+
|
|
||||||
- name: Check that if the file exists
|
|
||||||
stat:
|
|
||||||
path: "{{ item.src }}"
|
|
||||||
diff --git a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/zookeeper/tasks/install_zookeeper.yml b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/zookeeper/tasks/install_zookeeper.yml
|
|
||||||
index f47f194a..69f14b47 100644
|
|
||||||
--- a/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/zookeeper/tasks/install_zookeeper.yml
|
|
||||||
+++ b/aops-manager/aops_manager/deploy_manager/ansible_handler/roles/zookeeper/tasks/install_zookeeper.yml
|
|
||||||
@@ -5,6 +5,7 @@
|
|
||||||
dnf:
|
|
||||||
state: latest
|
|
||||||
name:
|
|
||||||
+ - python3-libselinux
|
|
||||||
- zookeeper
|
|
||||||
|
|
||||||
- name: Create Data Dir
|
|
||||||
diff --git a/aops-manager/aops_manager/deploy_manager/view.py b/aops-manager/aops_manager/deploy_manager/view.py
|
|
||||||
index 7a687428..86e9332f 100644
|
|
||||||
--- a/aops-manager/aops_manager/deploy_manager/view.py
|
|
||||||
+++ b/aops-manager/aops_manager/deploy_manager/view.py
|
|
||||||
@@ -199,7 +199,7 @@ class ExecuteTask(Resource):
|
|
||||||
res = TaskRunner.run_task(task_id, HostKey.key)
|
|
||||||
inventory.remove_host_vars_in_inventory()
|
|
||||||
if res:
|
|
||||||
- LOGGER.error("Task %s execution succeeded.", task_id)
|
|
||||||
+ LOGGER.info("Task %s execution succeeded.", task_id)
|
|
||||||
return
|
|
||||||
LOGGER.error("Task %s execution failed.", task_id)
|
|
||||||
|
|
||||||
--
|
|
||||||
2.33.0
|
|
||||||
|
|
||||||
286
0005-fixe-traceability-configuration-bugs.patch
Normal file
286
0005-fixe-traceability-configuration-bugs.patch
Normal file
@ -0,0 +1,286 @@
|
|||||||
|
From 6d869ac7b13aa5d176cbbd208d22f13d153f1e9f Mon Sep 17 00:00:00 2001
|
||||||
|
From: smjiao <smjiao@isoftstone.com>
|
||||||
|
Date: Mon, 18 Sep 2023 20:34:35 +0800
|
||||||
|
Subject: [PATCH] fix bug
|
||||||
|
|
||||||
|
---
|
||||||
|
.../ragdoll/config_model/bash_config.py | 1 -
|
||||||
|
.../ragdoll/config_model/hosts_config.py | 3 +-
|
||||||
|
.../ragdoll/config_model/ssh_config.py | 2 +
|
||||||
|
.../ragdoll/controllers/confs_controller.py | 68 ++++++++++++-------
|
||||||
|
.../ragdoll/models/host_sync_result.py | 8 +--
|
||||||
|
.../ragdoll/models/host_sync_status.py | 8 +--
|
||||||
|
.../yang_modules/openEuler-sysctl.conf.yang | 2 +-
|
||||||
|
7 files changed, 56 insertions(+), 36 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/gala-ragdoll/ragdoll/config_model/bash_config.py b/gala-ragdoll/ragdoll/config_model/bash_config.py
|
||||||
|
index 7b4b87d..608cd58 100644
|
||||||
|
--- a/gala-ragdoll/ragdoll/config_model/bash_config.py
|
||||||
|
+++ b/gala-ragdoll/ragdoll/config_model/bash_config.py
|
||||||
|
@@ -30,7 +30,6 @@ class BashConfig(BaseHandlerConfig):
|
||||||
|
for line in conf_list:
|
||||||
|
if line is None or line.strip() == '':
|
||||||
|
continue
|
||||||
|
-
|
||||||
|
conf_dict_list.append(line)
|
||||||
|
return conf_dict_list
|
||||||
|
|
||||||
|
diff --git a/gala-ragdoll/ragdoll/config_model/hosts_config.py b/gala-ragdoll/ragdoll/config_model/hosts_config.py
|
||||||
|
index 72b953e..0bda98d 100644
|
||||||
|
--- a/gala-ragdoll/ragdoll/config_model/hosts_config.py
|
||||||
|
+++ b/gala-ragdoll/ragdoll/config_model/hosts_config.py
|
||||||
|
@@ -17,6 +17,7 @@ Description: /etc/hosts config handler
|
||||||
|
import re
|
||||||
|
import json
|
||||||
|
|
||||||
|
+from ragdoll.config_model.base_handler_config import BaseHandlerConfig
|
||||||
|
from ragdoll.log.log import LOGGER
|
||||||
|
from ragdoll.utils.yang_module import YangModule
|
||||||
|
from ragdoll.const.conf_handler_const import NOT_SYNCHRONIZE, SYNCHRONIZED
|
||||||
|
@@ -102,7 +103,7 @@ class HostsConfig(BaseHandlerConfig):
|
||||||
|
|
||||||
|
def write_conf(self):
|
||||||
|
content = ""
|
||||||
|
- for key, value in self.conf:
|
||||||
|
+ for key, value in self.conf.items():
|
||||||
|
if value is not None:
|
||||||
|
conf_item = " ".join((key, str(value))).replace('\n', '\n\t')
|
||||||
|
content = content + conf_item + "\n"
|
||||||
|
diff --git a/gala-ragdoll/ragdoll/config_model/ssh_config.py b/gala-ragdoll/ragdoll/config_model/ssh_config.py
|
||||||
|
index c0cd0e0..bc46038 100644
|
||||||
|
--- a/gala-ragdoll/ragdoll/config_model/ssh_config.py
|
||||||
|
+++ b/gala-ragdoll/ragdoll/config_model/ssh_config.py
|
||||||
|
@@ -17,11 +17,13 @@ Description: sshd config analyze
|
||||||
|
import json
|
||||||
|
import re
|
||||||
|
|
||||||
|
+from ragdoll.config_model.base_handler_config import BaseHandlerConfig
|
||||||
|
from ragdoll.utils.yang_module import YangModule
|
||||||
|
from ragdoll.const.conf_handler_const import NOT_SYNCHRONIZE, SYNCHRONIZED
|
||||||
|
|
||||||
|
SPACER_LIST = [' ', '\t']
|
||||||
|
|
||||||
|
+
|
||||||
|
class SshConfig(BaseHandlerConfig):
|
||||||
|
|
||||||
|
def parse_conf_to_dict(self, conf_info):
|
||||||
|
diff --git a/gala-ragdoll/ragdoll/controllers/confs_controller.py b/gala-ragdoll/ragdoll/controllers/confs_controller.py
|
||||||
|
index ae766fa..071e8c5 100644
|
||||||
|
--- a/gala-ragdoll/ragdoll/controllers/confs_controller.py
|
||||||
|
+++ b/gala-ragdoll/ragdoll/controllers/confs_controller.py
|
||||||
|
@@ -11,6 +11,7 @@ from ragdoll.models.domain_name import DomainName # noqa: E501
|
||||||
|
from ragdoll.models.excepted_conf_info import ExceptedConfInfo # noqa: E501
|
||||||
|
from ragdoll.models.expected_conf import ExpectedConf # noqa: E501
|
||||||
|
from ragdoll.models.real_conf_info import RealConfInfo # noqa: E501
|
||||||
|
+from ragdoll.models.sync_req import SyncReq
|
||||||
|
from ragdoll.models.sync_status import SyncStatus # noqa: E501
|
||||||
|
from ragdoll.models.conf_base_info import ConfBaseInfo
|
||||||
|
from ragdoll.models.conf_is_synced import ConfIsSynced
|
||||||
|
@@ -28,6 +29,7 @@ from ragdoll.utils.host_tools import HostTools
|
||||||
|
from ragdoll.utils.object_parse import ObjectParse
|
||||||
|
from ragdoll import util
|
||||||
|
from ragdoll.const.conf_files import yang_conf_list
|
||||||
|
+from ragdoll.log.log import LOGGER
|
||||||
|
|
||||||
|
TARGETDIR = GitTools().target_dir
|
||||||
|
|
||||||
|
@@ -163,9 +165,11 @@ def get_the_sync_status_of_domain(body=None): # noqa: E501
|
||||||
|
man_conf_list = []
|
||||||
|
for d_man_conf in manage_confs:
|
||||||
|
man_conf_list.append(d_man_conf.get("filePath").split(":")[-1])
|
||||||
|
+ LOGGER.info("manage_confs is {}".format(manage_confs))
|
||||||
|
for d_host in sync_status.host_status:
|
||||||
|
d_sync_status = d_host.sync_status
|
||||||
|
file_list = []
|
||||||
|
+ LOGGER.info("d_sync_status is {}".format(d_sync_status))
|
||||||
|
for d_file in d_sync_status:
|
||||||
|
file_path = d_file.file_path
|
||||||
|
file_list.append(file_path)
|
||||||
|
@@ -426,10 +430,16 @@ def sync_conf_to_host_from_domain(body=None): # noqa: E501
|
||||||
|
:rtype: List[HostSyncResult]
|
||||||
|
"""
|
||||||
|
if connexion.request.is_json:
|
||||||
|
- body = ConfHost.from_dict(connexion.request.get_json()) # noqa: E501
|
||||||
|
+ body = SyncReq.from_dict(connexion.request.get_json()) # noqa: E501
|
||||||
|
|
||||||
|
domain = body.domain_name
|
||||||
|
- host_list = body.host_ids
|
||||||
|
+ sync_list = body.sync_list
|
||||||
|
+ LOGGER.info("sync_list is {}".format(sync_list))
|
||||||
|
+
|
||||||
|
+ host_sync_confs = dict()
|
||||||
|
+
|
||||||
|
+ for sync in sync_list:
|
||||||
|
+ host_sync_confs[sync.host_id] = sync.sync_configs
|
||||||
|
|
||||||
|
# check the input domain
|
||||||
|
check_res = Format.domainCheck(domain)
|
||||||
|
@@ -458,11 +468,12 @@ def sync_conf_to_host_from_domain(body=None): # noqa: E501
|
||||||
|
|
||||||
|
# Check whether the host is in the managed host list
|
||||||
|
exist_host = []
|
||||||
|
- if len(host_list) > 0:
|
||||||
|
- for host in host_list:
|
||||||
|
+ if len(host_sync_confs) > 0:
|
||||||
|
+ host_ids = host_sync_confs.keys()
|
||||||
|
+ for host_id in host_ids:
|
||||||
|
for d_host in res_host_text:
|
||||||
|
- if host.get("hostId") == d_host.get("hostId"):
|
||||||
|
- exist_host.append(host)
|
||||||
|
+ if host_id == d_host.get("hostId"):
|
||||||
|
+ exist_host.append(host_id)
|
||||||
|
else:
|
||||||
|
for d_host in res_host_text:
|
||||||
|
temp_host = {}
|
||||||
|
@@ -489,28 +500,35 @@ def sync_conf_to_host_from_domain(body=None): # noqa: E501
|
||||||
|
|
||||||
|
# Deserialize and reverse parse the expected configuration
|
||||||
|
sync_res = []
|
||||||
|
- for d_host in exist_host:
|
||||||
|
- host_sync_result = HostSyncResult(host_id=d_host,
|
||||||
|
+ for host_id in exist_host:
|
||||||
|
+ host_sync_result = HostSyncResult(host_id=host_id,
|
||||||
|
sync_result=[])
|
||||||
|
+ sync_confs = host_sync_confs.get(host_id)
|
||||||
|
for d_man_conf in manage_confs:
|
||||||
|
file_path = d_man_conf.get("filePath").split(":")[-1]
|
||||||
|
- contents = d_man_conf.get("contents")
|
||||||
|
- object_parse = ObjectParse()
|
||||||
|
- content = object_parse.parse_json_to_conf(file_path, contents)
|
||||||
|
- # Configuration to the host
|
||||||
|
- sync_conf_url = conf_tools.load_url_by_conf().get("sync_url")
|
||||||
|
- headers = {"Content-Type": "application/json"}
|
||||||
|
- data = {"host_id": d_host, "file_path": file_path, "content": content}
|
||||||
|
- sync_response = requests.put(sync_conf_url, data=json.dumps(data), headers=headers)
|
||||||
|
-
|
||||||
|
- resp_status = json.loads(sync_response.text).get("status")
|
||||||
|
- conf_sync_res = ConfSyncedRes(file_path=file_path,
|
||||||
|
- result="")
|
||||||
|
- if resp_status:
|
||||||
|
- conf_sync_res.result = "SUCCESS"
|
||||||
|
- else:
|
||||||
|
- conf_sync_res.result = "FAILED"
|
||||||
|
- host_sync_result.sync_result.append(conf_sync_res)
|
||||||
|
+ if file_path in sync_confs:
|
||||||
|
+ file_path = d_man_conf.get("filePath").split(":")[-1]
|
||||||
|
+ contents = d_man_conf.get("contents")
|
||||||
|
+ object_parse = ObjectParse()
|
||||||
|
+ content = object_parse.parse_json_to_conf(file_path, contents)
|
||||||
|
+ LOGGER.info("content IS {}".format(content))
|
||||||
|
+ # Configuration to the host
|
||||||
|
+ sync_conf_url = conf_tools.load_url_by_conf().get("sync_url")
|
||||||
|
+ headers = {"Content-Type": "application/json"}
|
||||||
|
+ data = {"host_id": host_id, "file_path": file_path, "content": content}
|
||||||
|
+ sync_response = requests.put(sync_conf_url, data=json.dumps(data), headers=headers)
|
||||||
|
+
|
||||||
|
+ resp_code = json.loads(sync_response.text).get('code')
|
||||||
|
+ resp = json.loads(sync_response.text).get('data').get('resp')
|
||||||
|
+ LOGGER.info("resp_code IS {}".format(resp_code))
|
||||||
|
+ LOGGER.info("resp IS {}".format(resp))
|
||||||
|
+ conf_sync_res = ConfSyncedRes(file_path=file_path,
|
||||||
|
+ result="")
|
||||||
|
+ if resp_code == "200" and resp.get('sync_result') is True:
|
||||||
|
+ conf_sync_res.result = "SUCCESS"
|
||||||
|
+ else:
|
||||||
|
+ conf_sync_res.result = "FAILED"
|
||||||
|
+ host_sync_result.sync_result.append(conf_sync_res)
|
||||||
|
sync_res.append(host_sync_result)
|
||||||
|
|
||||||
|
return sync_res
|
||||||
|
diff --git a/gala-ragdoll/ragdoll/models/host_sync_result.py b/gala-ragdoll/ragdoll/models/host_sync_result.py
|
||||||
|
index 3e8d951..8604e31 100644
|
||||||
|
--- a/gala-ragdoll/ragdoll/models/host_sync_result.py
|
||||||
|
+++ b/gala-ragdoll/ragdoll/models/host_sync_result.py
|
||||||
|
@@ -17,7 +17,7 @@ class HostSyncResult(Model):
|
||||||
|
Do not edit the class manually.
|
||||||
|
"""
|
||||||
|
|
||||||
|
- def __init__(self, host_id: str=None, sync_result: List[ConfSyncedRes]=None): # noqa: E501
|
||||||
|
+ def __init__(self, host_id: int = None, sync_result: List[ConfSyncedRes] = None): # noqa: E501
|
||||||
|
"""HostSyncResult - a model defined in Swagger
|
||||||
|
|
||||||
|
:param host_id: The host_id of this HostSyncResult. # noqa: E501
|
||||||
|
@@ -26,7 +26,7 @@ class HostSyncResult(Model):
|
||||||
|
:type sync_result: List[ConfSyncedRes]
|
||||||
|
"""
|
||||||
|
self.swagger_types = {
|
||||||
|
- 'host_id': str,
|
||||||
|
+ 'host_id': int,
|
||||||
|
'sync_result': List[ConfSyncedRes]
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -50,7 +50,7 @@ class HostSyncResult(Model):
|
||||||
|
return util.deserialize_model(dikt, cls)
|
||||||
|
|
||||||
|
@property
|
||||||
|
- def host_id(self) -> str:
|
||||||
|
+ def host_id(self) -> int:
|
||||||
|
"""Gets the host_id of this HostSyncResult.
|
||||||
|
|
||||||
|
the id of host # noqa: E501
|
||||||
|
@@ -61,7 +61,7 @@ class HostSyncResult(Model):
|
||||||
|
return self._host_id
|
||||||
|
|
||||||
|
@host_id.setter
|
||||||
|
- def host_id(self, host_id: str):
|
||||||
|
+ def host_id(self, host_id: int):
|
||||||
|
"""Sets the host_id of this HostSyncResult.
|
||||||
|
|
||||||
|
the id of host # noqa: E501
|
||||||
|
diff --git a/gala-ragdoll/ragdoll/models/host_sync_status.py b/gala-ragdoll/ragdoll/models/host_sync_status.py
|
||||||
|
index 5a40397..a785d17 100644
|
||||||
|
--- a/gala-ragdoll/ragdoll/models/host_sync_status.py
|
||||||
|
+++ b/gala-ragdoll/ragdoll/models/host_sync_status.py
|
||||||
|
@@ -16,7 +16,7 @@ class HostSyncStatus(Model):
|
||||||
|
Do not edit the class manually.
|
||||||
|
"""
|
||||||
|
|
||||||
|
- def __init__(self, host_id: str=None, sync_status: List[ConfIsSynced]=None): # noqa: E501
|
||||||
|
+ def __init__(self, host_id: int = None, sync_status: List[ConfIsSynced] = None): # noqa: E501
|
||||||
|
"""SyncStatus - a model defined in Swagger
|
||||||
|
|
||||||
|
:param host_id: The host_id of this HostSyncStatus. # noqa: E501
|
||||||
|
@@ -25,7 +25,7 @@ class HostSyncStatus(Model):
|
||||||
|
:type host_status: List[object]
|
||||||
|
"""
|
||||||
|
self.swagger_types = {
|
||||||
|
- 'host_id': str,
|
||||||
|
+ 'host_id': int,
|
||||||
|
'sync_status': List[ConfIsSynced]
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -49,7 +49,7 @@ class HostSyncStatus(Model):
|
||||||
|
return util.deserialize_model(dikt, cls)
|
||||||
|
|
||||||
|
@property
|
||||||
|
- def host_id(self) -> str:
|
||||||
|
+ def host_id(self) -> int:
|
||||||
|
"""Gets the host_id of this HostSyncStatus.
|
||||||
|
|
||||||
|
domain name # noqa: E501
|
||||||
|
@@ -60,7 +60,7 @@ class HostSyncStatus(Model):
|
||||||
|
return self._host_id
|
||||||
|
|
||||||
|
@host_id.setter
|
||||||
|
- def host_id(self, host_id: str):
|
||||||
|
+ def host_id(self, host_id: int):
|
||||||
|
"""Sets the host_id of this HostSyncStatus.
|
||||||
|
|
||||||
|
host id # noqa: E501
|
||||||
|
diff --git a/gala-ragdoll/yang_modules/openEuler-sysctl.conf.yang b/gala-ragdoll/yang_modules/openEuler-sysctl.conf.yang
|
||||||
|
index e013ee2..01025a4 100644
|
||||||
|
--- a/gala-ragdoll/yang_modules/openEuler-sysctl.conf.yang
|
||||||
|
+++ b/gala-ragdoll/yang_modules/openEuler-sysctl.conf.yang
|
||||||
|
@@ -62,7 +62,7 @@ module openEuler-sysctl.conf {
|
||||||
|
|
||||||
|
sysctl:path "openEuler:/etc/sysctl.conf";
|
||||||
|
sysctl:type "kv";
|
||||||
|
- sysctl:spacer "";
|
||||||
|
+ sysctl:spacer "=";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
\ No newline at end of file
|
||||||
|
--
|
||||||
|
2.38.1.windows.1
|
||||||
|
|
||||||
Binary file not shown.
BIN
A-Ops-v1.3.1.tar.gz
Normal file
BIN
A-Ops-v1.3.1.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
526
A-Ops.spec
526
A-Ops.spec
@ -1,137 +1,33 @@
|
|||||||
Name: A-Ops
|
Name: A-Ops
|
||||||
Version: v1.1.1
|
Version: v1.3.1
|
||||||
Release: 6
|
Release: 4
|
||||||
Summary: The intelligent ops toolkit for openEuler
|
Summary: The intelligent ops toolkit for openEuler
|
||||||
License: MulanPSL2
|
License: MulanPSL2
|
||||||
URL: https://gitee.com/openeuler/A-Ops
|
URL: https://gitee.com/openeuler/A-Ops
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
Source1: A-Ops-web-node-modules.tar.gz
|
Patch0001: 0001-fix-host-upload-traceability-configuration-issue.patch
|
||||||
Source2: vertical-left.png
|
Patch0002: 0002-fix-kv-bug.patch
|
||||||
Source3: horizontal-left.png
|
Patch0003: 0003-fix-server-startup-error.patch
|
||||||
patch0001: 0001-fix-diag-return.patch
|
Patch0004: 0004-codecheck.patch
|
||||||
patch0002: 0002-fix-log-of-task-execution.patch
|
Patch0005: 0005-fixe-traceability-configuration-bugs.patch
|
||||||
patch0003: 0003-add-permission-control-in-ragdoll.patch
|
|
||||||
patch0004: 0004-fix-logos-instructions-and-size.patch
|
|
||||||
patch0005: 0005-fix-the-python3-libselinux-dependency.patch
|
|
||||||
|
|
||||||
# build for gopher
|
%global debug_package %{nil}
|
||||||
BuildRequires: cmake gcc-c++ yum elfutils-devel clang >= 10.0.1 llvm libconfig-devel
|
|
||||||
BuildRequires: librdkafka-devel libmicrohttpd-devel
|
|
||||||
|
|
||||||
# build for ragdoll & aops basic module
|
# build for ragdoll & aops basic module
|
||||||
BuildRequires: python3-setuptools python3-connexion python3-werkzeug python3-libyang
|
BuildRequires: python3-setuptools python3-connexion python3-werkzeug python3-libyang
|
||||||
BuildRequires: git python3-devel systemd
|
BuildRequires: git python3-devel systemd
|
||||||
|
|
||||||
# build for spider & aops basic module
|
# build for aops basic module
|
||||||
BuildRequires: python3-setuptools python3-kafka-python python3-connexion
|
BuildRequires: python3-setuptools python3-kafka-python python3-connexion
|
||||||
|
|
||||||
# build for web
|
|
||||||
BuildRequires: nodejs node-gyp nodejs-yarn
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The intelligent ops toolkit for openEuler
|
The intelligent ops toolkit for openEuler
|
||||||
|
|
||||||
|
|
||||||
%package -n aops-utils
|
|
||||||
Summary: utils for A-Ops
|
|
||||||
Requires: python3-concurrent-log-handler python3-xmltodict python3-pyyaml python3-marshmallow >= 3.13.0
|
|
||||||
Requires: python3-requests python3-xlrd python3-prettytable python3-pygments
|
|
||||||
|
|
||||||
%description -n aops-utils
|
|
||||||
utils for A-Ops
|
|
||||||
|
|
||||||
|
|
||||||
%package -n aops-cli
|
|
||||||
Summary: cli of A-ops
|
|
||||||
Requires: aops-utils = %{version}-%{release}
|
|
||||||
|
|
||||||
%description -n aops-cli
|
|
||||||
commandline tool of aops, offer commands for account management, host management,
|
|
||||||
host group management, task and template management of ansible.
|
|
||||||
|
|
||||||
|
|
||||||
%package -n aops-manager
|
|
||||||
Summary: manager of A-ops
|
|
||||||
Requires: aops-utils = %{version}-%{release} ansible >= 2.9.0
|
|
||||||
Requires: python3-pyyaml python3-marshmallow >= 3.13.0 python3-flask python3-flask-restful
|
|
||||||
Requires: python3-requests sshpass python3-uWSGI
|
|
||||||
|
|
||||||
%description -n aops-manager
|
|
||||||
manager of A-ops, support software deployment and installation, account management, host management,
|
|
||||||
host group management, task and template management of ansible.
|
|
||||||
|
|
||||||
|
|
||||||
%package -n aops-database
|
|
||||||
Summary: database center of A-ops
|
|
||||||
Requires: aops-utils = %{version}-%{release} python3-pyyaml
|
|
||||||
Requires: python3-elasticsearch >= 7 python3-requests python3-werkzeug python3-urllib3
|
|
||||||
Requires: python3-flask python3-flask-restful python3-PyMySQL python3-sqlalchemy
|
|
||||||
Requires: python3-prometheus-api-client python3-uWSGI
|
|
||||||
|
|
||||||
%description -n aops-database
|
|
||||||
database center of A-ops, offer database proxy of mysql, elasticsearch and prometheus time series database.
|
|
||||||
|
|
||||||
|
|
||||||
%package -n adoctor-check-scheduler
|
|
||||||
Summary: scheduler of A-ops check module
|
|
||||||
Requires: aops-utils = %{version}-%{release}
|
|
||||||
Requires: python3-requests python3-flask python3-flask-restful python3-uWSGI python3-kafka-python
|
|
||||||
Requires: python3-marshmallow >= 3.13.0 python3-Flask-APScheduler >= 1.11.0
|
|
||||||
|
|
||||||
%description -n adoctor-check-scheduler
|
|
||||||
Exception detection and scheduling service. Provides an exception detection interface to
|
|
||||||
manage exception detection tasks.
|
|
||||||
|
|
||||||
|
|
||||||
%package -n adoctor-check-executor
|
|
||||||
Summary: executor of A-ops check module
|
|
||||||
Requires: aops-utils = %{version}-%{release}
|
|
||||||
Requires: python3-kafka-python python3-pyyaml python3-marshmallow >= 3.13.0 python3-requests
|
|
||||||
Requires: python3-ply >= 3.11
|
|
||||||
|
|
||||||
%description -n adoctor-check-executor
|
|
||||||
Performs an exception task based on the configured exception detection rule.
|
|
||||||
|
|
||||||
|
|
||||||
%package -n adoctor-diag-scheduler
|
|
||||||
Summary: scheduler of A-ops diag module
|
|
||||||
Requires: aops-utils = %{version}-%{release}
|
|
||||||
Requires: python3-requests python3-flask python3-flask-restful python3-uWSGI python3-kafka-python
|
|
||||||
|
|
||||||
%description -n adoctor-diag-scheduler
|
|
||||||
Scheduler for diagnose module, provides restful interfaces to reply to requests about
|
|
||||||
importing/exporting diagnose tree, executing diagnose and so on.
|
|
||||||
|
|
||||||
|
|
||||||
%package -n adoctor-diag-executor
|
|
||||||
Summary: executor of A-ops check module
|
|
||||||
Requires: aops-utils = %{version}-%{release}
|
|
||||||
Requires: python3-kafka-python
|
|
||||||
|
|
||||||
%description -n adoctor-diag-executor
|
|
||||||
Executor of diagnose module. Get messages from kafka and do the diagnose tasks.
|
|
||||||
|
|
||||||
|
|
||||||
%package -n adoctor-cli
|
|
||||||
Summary: command line tool of A-doctor
|
|
||||||
Requires: aops-utils = %{version}-%{release}
|
|
||||||
Requires: python3-tqdm
|
|
||||||
|
|
||||||
%description -n adoctor-cli
|
|
||||||
commandline tool of adoctor, offer commands for executing diagnose, importing/exporting diagnose tree,
|
|
||||||
getting diagnose report, importing/exporting check rule, querying check result and so on.
|
|
||||||
|
|
||||||
|
|
||||||
%package -n gala-gopher
|
|
||||||
Summary: Intelligent ops toolkit for openEuler
|
|
||||||
Requires: bash glibc elfutils zlib iproute kernel >= 4.18.0-147.5.1.6 elfutils-devel
|
|
||||||
|
|
||||||
%description -n gala-gopher
|
|
||||||
Intelligent ops toolkit for openEuler
|
|
||||||
|
|
||||||
|
|
||||||
%package -n gala-ragdoll
|
%package -n gala-ragdoll
|
||||||
Summary: Configuration traceability
|
Summary: Configuration traceability
|
||||||
|
Requires: python3-gala-ragdoll = %{version}-%{release}
|
||||||
|
|
||||||
%description -n gala-ragdoll
|
%description -n gala-ragdoll
|
||||||
Configuration traceability
|
Configuration traceability
|
||||||
@ -139,187 +35,25 @@ Configuration traceability
|
|||||||
|
|
||||||
%package -n python3-gala-ragdoll
|
%package -n python3-gala-ragdoll
|
||||||
Summary: python3 pakcage of gala-ragdoll
|
Summary: python3 pakcage of gala-ragdoll
|
||||||
Requires: gala-ragdoll = %{version}-%{release} python3-flask-testing python3-libyang git
|
Requires: python3-flask-testing python3-libyang git
|
||||||
Requires: python3-werkzeug python3-connexion python3-swagger-ui-bundle
|
Requires: python3-werkzeug python3-connexion python3-swagger-ui-bundle
|
||||||
|
|
||||||
%description -n python3-gala-ragdoll
|
%description -n python3-gala-ragdoll
|
||||||
python3 pakcage of gala-ragdoll
|
python3 pakcage of gala-ragdoll
|
||||||
|
|
||||||
%package -n gala-spider
|
|
||||||
Summary: Configuration traceability
|
|
||||||
|
|
||||||
%description -n gala-spider
|
|
||||||
Configuration traceability
|
|
||||||
|
|
||||||
|
|
||||||
%package -n python3-gala-spider
|
|
||||||
Summary: python3 pakcage of gala-spider
|
|
||||||
Requires: gala-spider = %{version}-%{release} python3-kafka-python python3-connexion
|
|
||||||
|
|
||||||
%description -n python3-gala-spider
|
|
||||||
python3 pakcage of gala-spider
|
|
||||||
|
|
||||||
|
|
||||||
%package -n aops-web
|
|
||||||
Summary: website for A-Ops
|
|
||||||
Requires: nginx
|
|
||||||
|
|
||||||
%description -n aops-web
|
|
||||||
website for A-Ops, deployed by Nginx
|
|
||||||
|
|
||||||
|
|
||||||
%define debug_package %{nil}
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup
|
%autosetup -n %{name}-%{version} -p1
|
||||||
%setup -T -D -a 1
|
|
||||||
%patch0001 -p1
|
|
||||||
%patch0002 -p1
|
|
||||||
%patch0003 -p1
|
|
||||||
%patch0004 -p1
|
|
||||||
%patch0005 -p1
|
|
||||||
cp -r A-Ops-web-node-modules/node_modules aops-web/
|
|
||||||
cp -f $RPM_SOURCE_DIR/vertical-left.png aops-web/src/assets/
|
|
||||||
cp -f $RPM_SOURCE_DIR/horizontal-left.png aops-web/src/assets/
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# build for aops-utils
|
|
||||||
pushd aops-utils
|
|
||||||
%py3_build
|
|
||||||
popd
|
|
||||||
|
|
||||||
#build for aops-cli
|
|
||||||
pushd aops-cli
|
|
||||||
%py3_build
|
|
||||||
popd
|
|
||||||
|
|
||||||
#build for aops-manager
|
|
||||||
pushd aops-manager
|
|
||||||
%py3_build
|
|
||||||
popd
|
|
||||||
|
|
||||||
#build for aops-database
|
|
||||||
pushd aops-database
|
|
||||||
%py3_build
|
|
||||||
popd
|
|
||||||
|
|
||||||
#build for adoctor-check-scheduler
|
|
||||||
pushd adoctor-check-scheduler
|
|
||||||
%py3_build
|
|
||||||
popd
|
|
||||||
|
|
||||||
#build for adoctor-check-executor
|
|
||||||
pushd adoctor-check-executor
|
|
||||||
%py3_build
|
|
||||||
popd
|
|
||||||
|
|
||||||
#build for adoctor-diag-scheduler
|
|
||||||
pushd adoctor-diag-scheduler
|
|
||||||
%py3_build
|
|
||||||
popd
|
|
||||||
|
|
||||||
#build for adoctor-diag-executor
|
|
||||||
pushd adoctor-diag-executor
|
|
||||||
%py3_build
|
|
||||||
popd
|
|
||||||
|
|
||||||
#build for adoctor-cli
|
|
||||||
pushd adoctor-cli
|
|
||||||
%py3_build
|
|
||||||
popd
|
|
||||||
|
|
||||||
|
|
||||||
#build for gala-gopher
|
|
||||||
pushd gala-gopher
|
|
||||||
sh build.sh build
|
|
||||||
popd
|
|
||||||
|
|
||||||
#build for gala-ragdoll
|
#build for gala-ragdoll
|
||||||
pushd gala-ragdoll
|
pushd gala-ragdoll
|
||||||
%py3_build
|
%py3_build
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#build for gala-spider
|
|
||||||
pushd gala-spider
|
|
||||||
%py3_build
|
|
||||||
popd
|
|
||||||
|
|
||||||
#build for aops-web
|
|
||||||
pushd aops-web
|
|
||||||
yarn build
|
|
||||||
popd
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# install for utils
|
|
||||||
pushd aops-utils
|
|
||||||
%py3_install
|
|
||||||
popd
|
|
||||||
|
|
||||||
# install for cli
|
|
||||||
pushd aops-cli
|
|
||||||
%py3_install
|
|
||||||
popd
|
|
||||||
|
|
||||||
# install for manager
|
|
||||||
pushd aops-manager
|
|
||||||
%py3_install
|
|
||||||
mkdir -p %{buildroot}/%{python3_sitelib}/aops_manager/deploy_manager/ansible_handler
|
|
||||||
cp -r aops_manager/deploy_manager/ansible_handler/* %{buildroot}/%{python3_sitelib}/aops_manager/deploy_manager/ansible_handler
|
|
||||||
mkdir -p %{buildroot}/%{python3_sitelib}/aops_manager/deploy_manager/tasks
|
|
||||||
cp -r aops_manager/deploy_manager/tasks/* %{buildroot}/%{python3_sitelib}/aops_manager/deploy_manager/tasks
|
|
||||||
popd
|
|
||||||
|
|
||||||
# install for database
|
|
||||||
pushd aops-database
|
|
||||||
%py3_install
|
|
||||||
popd
|
|
||||||
|
|
||||||
# install for adoctor-check-scheduler
|
|
||||||
pushd adoctor-check-scheduler
|
|
||||||
%py3_install
|
|
||||||
popd
|
|
||||||
|
|
||||||
# install for adoctor-check-executor
|
|
||||||
pushd adoctor-check-executor
|
|
||||||
%py3_install
|
|
||||||
popd
|
|
||||||
|
|
||||||
# install for adoctor-diag-scheduler
|
|
||||||
pushd adoctor-diag-scheduler
|
|
||||||
%py3_install
|
|
||||||
popd
|
|
||||||
|
|
||||||
# install for adoctor-diag-executor
|
|
||||||
pushd adoctor-diag-executor
|
|
||||||
%py3_install
|
|
||||||
popd
|
|
||||||
|
|
||||||
# install for adoctor-cli
|
|
||||||
pushd adoctor-cli
|
|
||||||
%py3_install
|
|
||||||
popd
|
|
||||||
|
|
||||||
|
|
||||||
# install for web
|
|
||||||
pushd aops-web
|
|
||||||
mkdir -p %{buildroot}/opt/aops_web
|
|
||||||
cp -r dist %{buildroot}/opt/aops_web/
|
|
||||||
mkdir -p %{buildroot}/%{_sysconfdir}/nginx
|
|
||||||
cp -r deploy/aops-nginx.conf %{buildroot}/%{_sysconfdir}/nginx/
|
|
||||||
mkdir -p %{buildroot}/usr/lib/systemd/system
|
|
||||||
cp -r deploy/aops-web.service %{buildroot}/usr/lib/systemd/system/
|
|
||||||
popd
|
|
||||||
|
|
||||||
#install for gala-gopher
|
|
||||||
pushd gala-gopher
|
|
||||||
install -d %{buildroot}/opt/gala-gopher
|
|
||||||
install -d %{buildroot}%{_bindir}
|
|
||||||
mkdir -p %{buildroot}/usr/lib/systemd/system
|
|
||||||
install -m 0600 service/gala-gopher.service %{buildroot}/usr/lib/systemd/system/gala-gopher.service
|
|
||||||
sh install.sh %{buildroot}%{_bindir} %{buildroot}/opt/gala-gopher
|
|
||||||
popd
|
|
||||||
|
|
||||||
#install for gala-ragdoll
|
#install for gala-ragdoll
|
||||||
pushd gala-ragdoll
|
pushd gala-ragdoll
|
||||||
%py3_install
|
%py3_install
|
||||||
@ -332,139 +66,21 @@ mkdir -p %{buildroot}/%{_prefix}/lib/systemd/system
|
|||||||
install service/gala-ragdoll.service %{buildroot}/%{_prefix}/lib/systemd/system
|
install service/gala-ragdoll.service %{buildroot}/%{_prefix}/lib/systemd/system
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#install for gala-spider
|
|
||||||
pushd gala-spider
|
|
||||||
%py3_install
|
|
||||||
mkdir -p %{buildroot}/%{_sysconfdir}/spider
|
|
||||||
install config/*.conf %{buildroot}/%{_sysconfdir}/spider/
|
|
||||||
mkdir %{buildroot}/%{python3_sitelib}/spider/config
|
|
||||||
install config/*.conf %{buildroot}/%{python3_sitelib}/spider/config
|
|
||||||
mkdir -p %{buildroot}/%{_prefix}/lib/systemd/system
|
|
||||||
install service/gala-spider.service %{buildroot}/%{_prefix}/lib/systemd/system
|
|
||||||
mkdir -p %{buildroot}/%{_tmppath}/spider
|
|
||||||
popd
|
|
||||||
|
|
||||||
|
%pre -n gala-ragdoll
|
||||||
%post -n gala-gopher
|
|
||||||
%systemd_post gala-gopher.service
|
|
||||||
|
|
||||||
%preun -n gala-gopher
|
|
||||||
%systemd_preun gala-gopher.service
|
|
||||||
|
|
||||||
%postun -n gala-gopher
|
|
||||||
%systemd_postun_with_restart gala-gopher.service
|
|
||||||
|
|
||||||
|
|
||||||
%pre -n python3-gala-ragdoll
|
|
||||||
if [ -f "%{systemd_dir}/gala-ragdoll.service" ] ; then
|
if [ -f "%{systemd_dir}/gala-ragdoll.service" ] ; then
|
||||||
systemctl enable gala-ragdoll.service || :
|
systemctl enable gala-ragdoll.service || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%post -n python3-gala-ragdoll
|
%post -n gala-ragdoll
|
||||||
%systemd_post gala-ragdoll.service
|
%systemd_post gala-ragdoll.service
|
||||||
|
|
||||||
%preun -n python3-gala-ragdoll
|
%preun -n gala-ragdoll
|
||||||
%systemd_preun gala-ragdoll.service
|
%systemd_preun gala-ragdoll.service
|
||||||
|
|
||||||
%postun -n python3-gala-ragdoll
|
%postun -n gala-ragdoll
|
||||||
%systemd_postun gala-ragdoll.service
|
%systemd_postun gala-ragdoll.service
|
||||||
|
|
||||||
%pre -n python3-gala-spider
|
|
||||||
if [ -f "%{systemd_dir}/gala-spider.service" ] ; then
|
|
||||||
systemctl enable gala-spider.service || :
|
|
||||||
fi
|
|
||||||
|
|
||||||
%post -n python3-gala-spider
|
|
||||||
%systemd_post gala-spider.service
|
|
||||||
|
|
||||||
%preun -n python3-gala-spider
|
|
||||||
%systemd_preun gala-spider.service
|
|
||||||
|
|
||||||
%postun -n python3-gala-spider
|
|
||||||
%systemd_postun gala-spider.service
|
|
||||||
|
|
||||||
%files -n aops-utils
|
|
||||||
%doc README.*
|
|
||||||
%attr(0644,root,root) %{_sysconfdir}/aops/system.ini
|
|
||||||
%{python3_sitelib}/aops_utils*.egg-info
|
|
||||||
%{python3_sitelib}/aops_utils/*
|
|
||||||
%attr(0755,root,root) %{_bindir}/aops-utils
|
|
||||||
|
|
||||||
|
|
||||||
%files -n aops-cli
|
|
||||||
%attr(0755,root,root) %{_bindir}/aops
|
|
||||||
%{python3_sitelib}/aops_cli*.egg-info
|
|
||||||
%{python3_sitelib}/aops_cli/*
|
|
||||||
|
|
||||||
|
|
||||||
%files -n aops-manager
|
|
||||||
%attr(0644,root,root) %{_sysconfdir}/aops/manager.ini
|
|
||||||
%attr(0755,root,root) %{_bindir}/aops-manager
|
|
||||||
%attr(0755,root,root) %{_unitdir}/aops-manager.service
|
|
||||||
%{python3_sitelib}/aops_manager*.egg-info
|
|
||||||
%{python3_sitelib}/aops_manager/*
|
|
||||||
|
|
||||||
|
|
||||||
%files -n aops-database
|
|
||||||
%attr(0644,root,root) %{_sysconfdir}/aops/database.ini
|
|
||||||
%attr(0644,root,root) %{_sysconfdir}/aops/default.json
|
|
||||||
%attr(0755,root,root) %{_unitdir}/aops-database.service
|
|
||||||
%attr(0755,root,root) %{_bindir}/aops-database
|
|
||||||
%attr(0755,root,root) %{_bindir}/aops-basedatabase
|
|
||||||
%{python3_sitelib}/aops_database*.egg-info
|
|
||||||
%{python3_sitelib}/aops_database/*
|
|
||||||
|
|
||||||
|
|
||||||
%files -n adoctor-check-scheduler
|
|
||||||
%attr(0644,root,root) %{_sysconfdir}/aops/check_scheduler.ini
|
|
||||||
%attr(0755,root,root) %{_unitdir}/adoctor-check-scheduler.service
|
|
||||||
%attr(0755,root,root) %{_bindir}/adoctor-check-scheduler
|
|
||||||
%{python3_sitelib}/adoctor_check_scheduler*.egg-info
|
|
||||||
%{python3_sitelib}/adoctor_check_scheduler/*
|
|
||||||
|
|
||||||
|
|
||||||
%files -n adoctor-check-executor
|
|
||||||
%attr(0644,root,root) %{_sysconfdir}/aops/check_executor.ini
|
|
||||||
%attr(0644,root,root) %{_sysconfdir}/aops/check_rule_plugin.yml
|
|
||||||
%attr(0755,root,root) %{_unitdir}/adoctor-check-executor.service
|
|
||||||
%attr(0755,root,root) %{_bindir}/adoctor-check-executor
|
|
||||||
%{python3_sitelib}/adoctor_check_executor*.egg-info
|
|
||||||
%{python3_sitelib}/adoctor_check_executor/*
|
|
||||||
|
|
||||||
|
|
||||||
%files -n adoctor-diag-scheduler
|
|
||||||
%attr(0644,root,root) %{_sysconfdir}/aops/diag_scheduler.ini
|
|
||||||
%attr(0755,root,root) %{_unitdir}/adoctor-diag-scheduler.service
|
|
||||||
%attr(0755,root,root) %{_bindir}/adoctor-diag-scheduler
|
|
||||||
%{python3_sitelib}/adoctor_diag_scheduler*.egg-info
|
|
||||||
%{python3_sitelib}/adoctor_diag_scheduler/*
|
|
||||||
|
|
||||||
|
|
||||||
%files -n adoctor-diag-executor
|
|
||||||
%attr(0644,root,root) %{_sysconfdir}/aops/diag_executor.ini
|
|
||||||
%attr(0755,root,root) %{_unitdir}/adoctor-diag-executor.service
|
|
||||||
%attr(0755,root,root) %{_bindir}/adoctor-diag-executor
|
|
||||||
%{python3_sitelib}/adoctor_diag_executor*.egg-info
|
|
||||||
%{python3_sitelib}/adoctor_diag_executor/*
|
|
||||||
|
|
||||||
|
|
||||||
%files -n adoctor-cli
|
|
||||||
%attr(0755,root,root) %{_bindir}/adoctor
|
|
||||||
%{python3_sitelib}/adoctor_cli*.egg-info
|
|
||||||
%{python3_sitelib}/adoctor_cli/*
|
|
||||||
|
|
||||||
|
|
||||||
%files -n gala-gopher
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%dir /opt/gala-gopher
|
|
||||||
%dir /opt/gala-gopher/extend_probes
|
|
||||||
%dir /opt/gala-gopher/meta
|
|
||||||
%{_bindir}/gala-gopher
|
|
||||||
%config(noreplace) /opt/gala-gopher/gala-gopher.conf
|
|
||||||
/opt/gala-gopher/extend_probes/*
|
|
||||||
/opt/gala-gopher/meta/*
|
|
||||||
/usr/lib/systemd/system/gala-gopher.service
|
|
||||||
|
|
||||||
|
|
||||||
%files -n gala-ragdoll
|
%files -n gala-ragdoll
|
||||||
%doc gala-ragdoll/doc/*
|
%doc gala-ragdoll/doc/*
|
||||||
@ -480,29 +96,87 @@ fi
|
|||||||
%{python3_sitelib}/ragdoll-*.egg-info
|
%{python3_sitelib}/ragdoll-*.egg-info
|
||||||
|
|
||||||
|
|
||||||
%files -n gala-spider
|
|
||||||
%doc gala-spider/doc/*
|
|
||||||
%license gala-spider/LICENSE
|
|
||||||
/%{_sysconfdir}/spider/gala-spider.conf
|
|
||||||
%{_bindir}/spider
|
|
||||||
%{_prefix}/lib/systemd/system/gala-spider.service
|
|
||||||
%dir %{_tmppath}/spider
|
|
||||||
|
|
||||||
|
|
||||||
%files -n python3-gala-spider
|
|
||||||
%{python3_sitelib}/spider/*
|
|
||||||
%{python3_sitelib}/spider-*.egg-info
|
|
||||||
|
|
||||||
|
|
||||||
%files -n aops-web
|
|
||||||
%attr(0755, root, root) /opt/aops_web/dist/*
|
|
||||||
%attr(0755, root, root) %{_sysconfdir}/nginx/aops-nginx.conf
|
|
||||||
%attr(0755, root, root) %{_unitdir}/aops-web.service
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Feb 22 2022 chemingdao<chemingdao@huawei.com> - v1.1.1-6
|
* Tue Sep 19 2023 smjiao<smjiao@isoftstone.com> - v1.3.1-4
|
||||||
- fix the python3-libselinux dependency.
|
- fix traceability configuration bugs
|
||||||
|
|
||||||
|
* Thu Sep 14 2023 gongzhengtang<gong_zhengtang@163.com> - v1.3.1-3
|
||||||
|
- fix server startup error and code check
|
||||||
|
|
||||||
|
* Wed Sep 13 2023 gongzhengtang<gong_zhengtang@163.com> - v1.3.1-2
|
||||||
|
- fix host upload traceability configuration issue
|
||||||
|
|
||||||
|
* Wed Sep 13 2023 gongzhengtang<gong_zhengtang@163.com> - v1.3.1-1
|
||||||
|
- configure traceability updates
|
||||||
|
|
||||||
|
* Mon Apr 17 2023 wenxin<shusheng.wen@outlook.com> - v1.3.0-3
|
||||||
|
- update the host id validate method for ragdoll
|
||||||
|
|
||||||
|
* Tue Feb 28 2023 zhuyuncheng<zhuyuncheng@huawei.com> - v1.3.0-2
|
||||||
|
- remove packages which have moved to new repositories.
|
||||||
|
|
||||||
|
* Mon Sep 26 2022 zhuyuncheng<zhuyuncheng@huawei.com> - v1.3.0-1
|
||||||
|
- update delete host return message
|
||||||
|
- update add domain return message
|
||||||
|
|
||||||
|
* Wed Sep 14 2022 zhuyuncheng<zhuyuncheng@huawei.com> - v1.2.6-1
|
||||||
|
- move aops-basedatabase to aops-tools
|
||||||
|
- rename default scene from 'unknown' to 'normal'
|
||||||
|
|
||||||
|
* Tue Sep 13 2022 zhaoyuxing<zhaoyuxing2@huawei.com> - v1.2.5-4
|
||||||
|
- bug fix: start gala-ragdoll.service when install gala-ragdoll.
|
||||||
|
|
||||||
|
* Fri Sep 9 2022 zhuyuncheng<zhuyuncheng@huawei.com> - v1.2.5-3
|
||||||
|
- bug fix: add create time attribute of workflow, fix assign model bug of aops-check default mode
|
||||||
|
- update agent get host info interface and some test cases
|
||||||
|
- fix gala-ragdoll return code issue
|
||||||
|
- web fine-tuning for workflow and agent info.
|
||||||
|
|
||||||
|
* Wed Sep 7 2022 zhaoyuxing<zhaoyuxing2@huawei.com> - v1.2.5-2
|
||||||
|
- bug fix: adjust dependent packages for gala-ragdoll.
|
||||||
|
|
||||||
|
* Tue Sep 6 2022 zhuyuncheng<zhuyuncheng@huawei.com> - v1.2.5-1
|
||||||
|
- bug fix: bugfix of aops-web and aops-check's interaction
|
||||||
|
|
||||||
|
* Fri Sep 2 2022 zhuyuncheng<zhuyuncheng@huawei.com> - v1.2.4-1
|
||||||
|
- add default mode of aops-check, which can run independently.
|
||||||
|
|
||||||
|
* Mon Aug 29 2022 zhaoyuxing<zhaoyuxing2@huawei.com> - v1.2.3-3
|
||||||
|
- bug fix: gala-spider adapt to abnormal event format change.
|
||||||
|
|
||||||
|
* Mon Aug 29 2022 zhaoyuxing<zhaoyuxing2@huawei.com> - v1.2.3-2
|
||||||
|
- bug fix: bugfix for gopher report metadata to kafka.
|
||||||
|
|
||||||
|
* Sat Aug 27 2022 zhuyuncheng<zhuyuncheng@huawei.com> - v1.2.3-1
|
||||||
|
- Add requires of aops-check for new features.
|
||||||
|
|
||||||
|
* Tue Aug 23 2022 zhaoyuxing<zhaoyuxing2@huawei.com> - v1.2.2-2
|
||||||
|
- Set user modification of confs will not be overwrite for gala_spider.
|
||||||
|
|
||||||
|
* Wed Aug 10 2022 zhuyuncheng<zhuyuncheng@huawei.com> - v1.2.2-1
|
||||||
|
- New release 1.2.2, bug fix and add new module.
|
||||||
|
- add missed requirement python3-PyMySQL
|
||||||
|
- add new module, check and web
|
||||||
|
|
||||||
|
* Wed Aug 10 2022 zhaoyuxing<zhaoyuxing2@huawei.com> - v1.2.1-1
|
||||||
|
- New release 1.2.1, bug fix.
|
||||||
|
- modify patch for gala-gopher and rm patch for gala-anteater.
|
||||||
|
- reduce the operating noise of gala-gopher.
|
||||||
|
- optimize the module of gala-anteater.
|
||||||
|
|
||||||
|
* Tue Aug 2 2022 zhaoyuxing<zhaoyuxing2@huawei.com> - v1.2.0-3
|
||||||
|
- 1. add patch to modify install_requires of gala-anteater.
|
||||||
|
- 2. delete redundant dependent packages for gala-spider.
|
||||||
|
|
||||||
|
* Mon Aug 1 2022 zhuyuncheng<zhuyuncheng@huawei.com> - v1.2.0-2
|
||||||
|
- add base-database executable file into aops-manager to downlaod database.
|
||||||
|
|
||||||
|
* Sun Jul 31 2022 zhaoyuxing<zhaoyuxing2@huawei.com> - v1.2.0-1
|
||||||
|
- modify spec for gala-gopher&gala-spider and add new features.
|
||||||
|
- 1. gala-gopher & gala-spider adapt to the latest code.
|
||||||
|
- 2. add new feature gala-anteater.
|
||||||
|
- add aops-agent module, delete aops-database, aops-cli, aops-web,
|
||||||
|
and four adoctor modules for new architecture.
|
||||||
|
|
||||||
* Thu Sep 30 2021 chemingdao<chemingdao@huawei.com> - v1.1.1-5
|
* Thu Sep 30 2021 chemingdao<chemingdao@huawei.com> - v1.1.1-5
|
||||||
- Using image source overwrite instead of patching image binaries.
|
- Using image source overwrite instead of patching image binaries.
|
||||||
@ -522,13 +196,13 @@ fi
|
|||||||
- 2. Fix cli display issues and add loading bar of diag.
|
- 2. Fix cli display issues and add loading bar of diag.
|
||||||
- 3. Fix return of gala-ragdoll.
|
- 3. Fix return of gala-ragdoll.
|
||||||
- 4. Fix log level.
|
- 4. Fix log level.
|
||||||
- 5. haproxy probe with vport info.
|
- 5. haproxy probe with vport info.
|
||||||
|
|
||||||
* Sat Sep 18 2021 zhuyuncheng<zhuyuncheng@huawei.com> - v1.1.0-2
|
* Sat Sep 18 2021 zhuyuncheng<zhuyuncheng@huawei.com> - v1.1.0-2
|
||||||
- add missed file and better cli output
|
- add missed file and better cli output
|
||||||
|
|
||||||
* Fri Sep 17 2021 chemingdao<chemingdao@huawei.com> - v1.1.0-1
|
* Fri Sep 17 2021 chemingdao<chemingdao@huawei.com> - v1.1.0-1
|
||||||
- New release 1.1.0, bug fix and UI beautify.
|
- New release 1.1.0, bug fix and UI beautify.
|
||||||
- 1. Simplify gala-spider UI display.
|
- 1. Simplify gala-spider UI display.
|
||||||
- 2. Beautify cli print with table and highlight json.
|
- 2. Beautify cli print with table and highlight json.
|
||||||
- 3. Bug fix: now support check with management host.
|
- 3. Bug fix: now support check with management host.
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 28 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 23 KiB |
Loading…
x
Reference in New Issue
Block a user