Skip to content

Commit

Permalink
Merge pull request #495 from liangxiao1/aws
Browse files Browse the repository at this point in the history
update insights_client_log save path
  • Loading branch information
liangxiao1 authored Dec 25, 2024
2 parents c60f1ce + 36266de commit 124d6f8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
2 changes: 1 addition & 1 deletion os_tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = '0.4.0'
__codedate__ = '20241201'
__codedate__ = '20241224'
16 changes: 14 additions & 2 deletions os_tests/data/baseline_log.json
Original file line number Diff line number Diff line change
Expand Up @@ -1482,7 +1482,7 @@
"trigger": ""
},
"msg_166": {
"content": ".*systemd-udevd.*could not read from.*acpi_cpufreq/initstate.*",
"content": ".*systemd-udevd.*could not read from.*initstate.*",
"analyze": "The message can be ignored since it is harmless.",
"branch": "rhel",
"status": "active",
Expand Down Expand Up @@ -2339,7 +2339,7 @@
"addeddate": "20240926"
},
"msg_250": {
"content": ".*Version: (invalid).*",
"content": ".*Version.*invalid.*",
"analyze": "dmidecode known issue",
"branch": "rhel",
"status": "active",
Expand Down Expand Up @@ -2373,5 +2373,17 @@
"cases": "os_tests.tests.test_lifecycle.TestLifeCycle.test_boot_debugkernel",
"addedby": "[email protected]",
"addeddate": "20241103"
},
"msg_253": {
"content": ".*i2c i2c-.*Failed!.*",
"analyze": "known issue",
"branch": "rhel",
"status": "active",
"link": "https://issues.redhat.com/browse/RHEL-70163",
"path": "",
"trigger": "",
"cases": "",
"addedby": "[email protected]",
"addeddate": "20241206"
}
}
8 changes: 8 additions & 0 deletions os_tests/tests/test_general_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -2036,6 +2036,14 @@ def test_collect_insights_result(self):
else:
utils_lib.run_cmd(self, 'sudo cp {} {}/attachments/'.format(gz_file, self.log_dir))
utils_lib.run_cmd(self, 'insights-client --version', msg="get insights client version after register", timeout=120)
insights_client_log = "/var/log/insights-client/insights-client.log"
insights_client_log_file_name = os.path.basename(insights_client_log)
if self.params.get('remote_node') is not None:
utils_lib.run_cmd(self, 'sudo cp {} /tmp/'.format(insights_client_log))
utils_lib.run_cmd(self, 'sudo chmod 777 /tmp/{}'.format(insights_client_log_file_name))
self.SSH.get_file(rmt_file='/tmp/{}'.format(insights_client_log_file_name),local_file='{}/attachments/{}'.format(self.log_dir,insights_client_log_file_name))
else:
utils_lib.run_cmd(self, 'sudo cp {} {}/attachments/'.format(insights_client_log, self.log_dir))
try:
tmp_dict = json.loads(result_out)
if len(tmp_dict) > 0:
Expand Down

0 comments on commit 124d6f8

Please sign in to comment.