Skip to content

Conversation

@stephenchengCloud
Copy link
Collaborator

  • Porting perfmon to Python3
  • Added unit tests
  • XenRT tests
    • StorageAlerts: 3962464 passed (failed case due to an known issue)
    • MemoryAlerts 3962465 passed
    • alerts 3962466 passed
  • user.log from alerts 3962466:
Mar 22 08:10:30 xrtmia-06-01 /perfmon: PERFMON(DEBUG): Run: 3
Mar 22 08:10:30 xrtmia-06-01 /perfmon: PERFMON(DEBUG): Calling http://localhost/rrd_updates?session_id=OpaqueRef:5cc181d8-f702-8540-a758-1e2e8f97f20f&start=1711094701&host=true&sr_uuid=all&cf=AVERAGE&interval=60
Mar 22 08:10:30 xrtmia-06-01 /perfmon: PERFMON(DEBUG): Refreshed rrd_updates, start = 1711094760, end = 1711095000, rows = 5
Mar 22 08:10:30 xrtmia-06-01 /perfmon: PERFMON(DEBUG): Updating all_xmlconfigs
Mar 22 08:10:31 xrtmia-06-01 /perfmon: PERFMON(DEBUG): 347b8e28-ce85-4eb5-bca9-8474e5472215 not in sruuids_by_hostuuid
Mar 22 08:10:31 xrtmia-06-01 /perfmon: PERFMON(DEBUG): sr_uuid_list = []
Mar 22 08:10:31 xrtmia-06-01 /perfmon: PERFMON(DEBUG): VMMonitor processing rrd_updates for e42d6f2a-b30b-fc6b-8f3b-ab514895c94f
Mar 22 08:10:31 xrtmia-06-01 /perfmon: PERFMON(DEBUG): VMMonitor processing rrd_updates for eacd9926-a980-4529-9d28-d39d4d2ab38d
Mar 22 08:10:31 xrtmia-06-01 /perfmon: PERFMON(DEBUG): Variable cpu_usage set to 0.506818
Mar 22 08:10:31 xrtmia-06-01 /perfmon: PERFMON(DEBUG): Time since last alarm for var cpu_usage is 1711095031 - 1711094725 = 305. Refractory period = 300.
Mar 22 08:10:31 xrtmia-06-01 /perfmon: PERFMON(DEBUG): Creating an alarm for VM eacd9926-a980-4529-9d28-d39d4d2ab38d, message: value: 0.506818#012config:#012<variable>#012#011<name value="cpu_usage"/>#012#011<alarm_trigger_level value="0.5"/>#012#011<alarm_trigger_period value="60"/>#012#011<alarm_auto_inhibit_period value="300"/>#012</variable>
Mar 22 08:10:31 xrtmia-06-01 /perfmon: PERFMON(DEBUG): Variable cpu_usage set to 0.508762
Mar 22 08:10:31 xrtmia-06-01 /perfmon: PERFMON(DEBUG): Time since last alarm for var cpu_usage is 1711095031 - 1711095031 = 0. Refractory period = 300.
Mar 22 08:10:31 xrtmia-06-01 /perfmon: PERFMON(DEBUG): Variable cpu_usage set to 0.507245
Mar 22 08:10:31 xrtmia-06-01 /perfmon: PERFMON(DEBUG): Time since last alarm for var cpu_usage is 1711095031 - 1711095031 = 0. Refractory period = 300.
Mar 22 08:10:31 xrtmia-06-01 /perfmon: PERFMON(DEBUG): Variable cpu_usage set to 0.507081
Mar 22 08:10:31 xrtmia-06-01 /perfmon: PERFMON(DEBUG): Time since last alarm for var cpu_usage is 1711095031 - 1711095031 = 0. Refractory period = 300.
Mar 22 08:10:31 xrtmia-06-01 /perfmon: PERFMON(DEBUG): Variable cpu_usage set to 0.508183
Mar 22 08:10:31 xrtmia-06-01 /perfmon: PERFMON(DEBUG): Time since last alarm for var cpu_usage is 1711095031 - 1711095031 = 0. Refractory period = 300.
Mar 22 08:10:31 xrtmia-06-01 /perfmon: PERFMON(DEBUG): HostMonitor processing rrd_updates for 347b8e28-ce85-4eb5-bca9-8474e5472215
Mar 22 08:10:31 xrtmia-06-01 /perfmon: PERFMON(DEBUG): Returning active variables: 0 main, 0 total
Mar 22 08:10:31 xrtmia-06-01 /mail-alarm: /opt/xensource/libexec/mail-alarm: pool:other-config:mail-destination not specified
  • user.log from MemoryAlerts 3962465:
Line 1165: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): Run: 14
Line 1166: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): Calling http://localhost/rrd_updates?session_id=OpaqueRef:fbb4f319-4226-f46c-1708-feb093a141de&start=1711096321&host=true&sr_uuid=all&cf=AVERAGE&interval=60
Line 1167: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): Refreshed rrd_updates, start = 1711096380, end = 1711096620, rows = 5
Line 1168: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): 2378fc6e-9b67-4c5b-90f7-65376b955c3a not in sruuids_by_hostuuid
Line 1169: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): sr_uuid_list = []
Line 1170: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): VMMonitor processing rrd_updates for dbc57659-d29b-45ca-bcce-c5fa4f74614c
Line 1171: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): Variable fs_usage set to 0.120000
Line 1172: Mar 22 08:37:52 cl12-22 /perfmon: message repeated 4 times: [ PERFMON(DEBUG): Variable fs_usage set to 0.120000]
Line 1173: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): Variable mem_usage set to 0.202692
Line 1174: Mar 22 08:37:52 cl12-22 /perfmon: message repeated 4 times: [ PERFMON(DEBUG): Variable mem_usage set to 0.202692]
Line 1175: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): Variable log_fs_usage set to 0.010000
Line 1176: Mar 22 08:37:52 cl12-22 /perfmon: message repeated 4 times: [ PERFMON(DEBUG): Variable log_fs_usage set to 0.010000]
Line 1177: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): VMMonitor processing rrd_updates for 0ffe3ea8-1114-ff12-dd68-f8eeafe1858f
Line 1178: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): VMMonitor processing rrd_updates for 102038e7-cd37-45d3-759a-913b7d737e28
Line 1179: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): VMMonitor processing rrd_updates for 70350d0e-84d5-1552-2f30-de6776872b80
Line 1180: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): VMMonitor processing rrd_updates for 5cad4db3-57f9-e289-096c-05e312facdd1
Line 1181: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): HostMonitor processing rrd_updates for 2378fc6e-9b67-4c5b-90f7-65376b955c3a
Line 1182: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): Returning active variables: 1 main, 1 total
Line 1183: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): Variable memory_free_kib set to 452260.000000
Line 1184: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): Time since last alarm for var memory_free_kib is 1711096672 - 1711096370 = 302. Refractory period = 300.
Line 1185: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): Creating an alarm for Host 2378fc6e-9b67-4c5b-90f7-65376b955c3a, message: value: 452260.000000#012config:#012<variable>#012#011<name value="memory_free_kib"/>#012#011<alarm_trigger_level value="30052352"/>#012#011<alarm_trigger_period value="60"/>#012#011<alarm_auto_inhibit_period value="300"/>#012</variable>
Line 1186: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): Variable memory_free_kib set to 452260.000000
Line 1187: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): Time since last alarm for var memory_free_kib is 1711096672 - 1711096672 = 0. Refractory period = 300.
Line 1188: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): Variable memory_free_kib set to 452260.000000
Line 1189: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): Time since last alarm for var memory_free_kib is 1711096672 - 1711096672 = 0. Refractory period = 300.
Line 1190: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): Variable memory_free_kib set to 452260.000000
Line 1191: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): Time since last alarm for var memory_free_kib is 1711096672 - 1711096672 = 0. Refractory period = 300.
Line 1192: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): Variable memory_free_kib set to 479700.000000
Line 1193: Mar 22 08:37:52 cl12-22 /perfmon: PERFMON(DEBUG): Time since last alarm for var memory_free_kib is 1711096672 - 1711096672 = 0. Refractory period = 300.
  • user.log from StorageAlerts 3962464:
Line 1106: Mar 22 09:24:08 cl11-01 /perfmon: PERFMON(DEBUG): Run: 3
Line 1107: Mar 22 09:24:08 cl11-01 /perfmon: PERFMON(DEBUG): Calling http://localhost/rrd_updates?session_id=OpaqueRef:d80a76b9-a232-9097-3a48-4c1ac545eb77&start=1711099141&host=true&sr_uuid=all&cf=AVERAGE&interval=60
Line 1108: Mar 22 09:24:08 cl11-01 /perfmon: PERFMON(DEBUG): Refreshed rrd_updates, start = 1711099200, end = 1711099440, rows = 5
Line 1109: Mar 22 09:24:08 cl11-01 /perfmon: PERFMON(DEBUG): Unchanged sr_xmlconfig for sruuid 7120208f-07cd-4113-0285-b7cce517c6fd
Line 1110: Mar 22 09:24:08 cl11-01 /perfmon: PERFMON(DEBUG): sr_uuid_list = []
Line 1111: Mar 22 09:24:08 cl11-01 /perfmon: PERFMON(DEBUG): VMMonitor processing rrd_updates for f064e8c6-964b-4f5f-836a-48bb930ccc78
Line 1112: Mar 22 09:24:08 cl11-01 /perfmon: PERFMON(DEBUG): Variable fs_usage set to 0.120000
Line 1113: Mar 22 09:24:08 cl11-01 /perfmon: message repeated 4 times: [ PERFMON(DEBUG): Variable fs_usage set to 0.120000]
Line 1114: Mar 22 09:24:08 cl11-01 /perfmon: PERFMON(DEBUG): Variable mem_usage set to 0.070535
Line 1115: Mar 22 09:24:08 cl11-01 /perfmon: message repeated 4 times: [ PERFMON(DEBUG): Variable mem_usage set to 0.070535]
Line 1116: Mar 22 09:24:08 cl11-01 /perfmon: PERFMON(DEBUG): Variable log_fs_usage set to 0.010000
Line 1117: Mar 22 09:24:08 cl11-01 /perfmon: message repeated 4 times: [ PERFMON(DEBUG): Variable log_fs_usage set to 0.010000]
Line 1118: Mar 22 09:24:08 cl11-01 /perfmon: PERFMON(DEBUG): HostMonitor processing rrd_updates for 985d666d-7caf-4f3d-819e-64d83840a81b
Line 1119: Mar 22 09:24:08 cl11-01 /perfmon: PERFMON(DEBUG): Returning active variables: 0 main, 1 total
Line 1120: Mar 22 09:24:08 cl11-01 /perfmon: PERFMON(DEBUG): Variable sr_io_throughput_total_7120208f set to 22.116000
Line 1121: Mar 22 09:24:08 cl11-01 /perfmon: PERFMON(DEBUG): Time since last alarm for var sr_io_throughput_total_7120208f is 1711099448 - 1711099147 = 301. Refractory period = 300.
Line 1122: Mar 22 09:24:08 cl11-01 /perfmon: PERFMON(DEBUG): Creating an alarm for Host 985d666d-7caf-4f3d-819e-64d83840a81b, message: value: 22.116000#012config:#012<variable>#012#011<name value="sr_io_throughput_total_7120208f"/>#012#011<alarm_trigger_level value="0.0009765625"/>#012#011<alarm_trigger_period value="60"/>#012#011<alarm_auto_inhibit_period value="300"/>#012#011<configured_on class="SR" uuid="7120208f-07cd-4113-0285-b7cce517c6fd"/>#012</variable>
Line 1123: Mar 22 09:24:08 cl11-01 /perfmon: PERFMON(DEBUG): Variable sr_io_throughput_total_7120208f set to 26.464000
Line 1124: Mar 22 09:24:08 cl11-01 /perfmon: PERFMON(DEBUG): Time since last alarm for var sr_io_throughput_total_7120208f is 1711099448 - 1711099448 = 0. Refractory period = 300.
Line 1125: Mar 22 09:24:08 cl11-01 /perfmon: PERFMON(DEBUG): Variable sr_io_throughput_total_7120208f set to 26.214000
Line 1126: Mar 22 09:24:08 cl11-01 /perfmon: PERFMON(DEBUG): Time since last alarm for var sr_io_throughput_total_7120208f is 1711099448 - 1711099448 = 0. Refractory period = 300.
Line 1127: Mar 22 09:24:08 cl11-01 /perfmon: PERFMON(DEBUG): Variable sr_io_throughput_total_7120208f set to 20.435000
Line 1128: Mar 22 09:24:08 cl11-01 /perfmon: PERFMON(DEBUG): Time since last alarm for var sr_io_throughput_total_7120208f is 1711099448 - 1711099448 = 0. Refractory period = 300.
Line 1129: Mar 22 09:24:08 cl11-01 /perfmon: PERFMON(DEBUG): Variable sr_io_throughput_total_7120208f set to 19.297000
Line 1130: Mar 22 09:24:08 cl11-01 /perfmon: PERFMON(DEBUG): Time since last alarm for var sr_io_throughput_total_7120208f is 1711099448 - 1711099448 = 0. Refractory period = 300.
  • Manually test
# Incorrect arguments
[root@xrtuk-11-43 log]# python3 /opt/xensource/bin/perfmon -x 2
usage: /opt/xensource/bin/perfmon [-i <interval> -n <loops> -d -s <rrd_step> -c<config_update_period> -D <interval_percent_dither>] \
	[--interval=<interval> --numloops=<loops> --debug \
	 --rrdstep=<rrd_step> --daemon]
	 --config_update_period=<config_update_period>
	 --interval_percent_dither=<interval_percent_dither>
  interval:	seconds between reads of http://localhost/rrd_updates?...
  loops:	number of times to run before exiting
  rrd_step:	seconds between samples provided by rrd_updates.  Valid values are 5 or 60
  config_update_period:	seconds between getting updates of all VM/host records from master
  interval_percent_dither:	max percent dither in each loop - prevents stampede on master

[root@xrtuk-11-43 log]# ps -ef | grep perfmon
root        2083       1  0 Mar22 ?        00:02:57 python3 /opt/xensource/bin/perfmon

@codecov
Copy link

codecov bot commented Mar 25, 2024

Codecov Report

Merging #5527 (88c9dfc) into feature/py3 (7b7a1f0) will increase coverage by 0.9%.
The diff coverage is 90.4%.

Additional details and impacted files
@@              Coverage Diff              @@
##           feature/py3   #5527     +/-   ##
=============================================
+ Coverage         85.0%   86.0%   +0.9%     
=============================================
  Files                6      13      +7     
  Lines              556    2130   +1574     
=============================================
+ Hits               473    1832   +1359     
- Misses              83     298    +215     
Files Coverage Δ
python3/unittest/test_nbd_client_manager.py 100.0% <ø> (ø)
python3/unittest/test_perfmon.py 98.7% <98.7%> (ø)
python3/bin/perfmon 87.0% <87.0%> (ø)

... and 5 files with indirect coverage changes

Flag Coverage Δ
python2.7 59.1% <ø> (ø)
python3.11 88.8% <90.4%> (-11.2%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
There are some long functions in the code.
So disable the below checks:
too-many-locals / too-many-statements / too-many-return-statements

Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
use-dict-literal, dangerous-default-value,
consider-using-dict-comprehension

Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
- In python3, socket.error, IOError are merged into OSError
- ConnectionRefusedError is a subclass of OSError:
  - ConnectionRefusedError -> ConnectionError -> OSError
- urllib.error.HTTPError is a subclass of OSError:
  - urllib.error.HTTPError <- urllib.error.URLError <- OSError
- HTTPError doesn't have content in `args`. So we can't use `e.args[0]`

Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
Previously, for fixing the pylint, I used a specific exception
for not getting data. But by testing,
it didn't catch the index error.
Not sure if there are any other exceptions.
So just keep the original logic, use the general exception.

Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
…ly written as "in_t_tag."

Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
@stephenchengCloud stephenchengCloud force-pushed the private/stephenche/CP-47653 branch from a4a8143 to a203a54 Compare March 25, 2024 05:16
@stephenchengCloud stephenchengCloud force-pushed the private/stephenche/CP-47653 branch 3 times, most recently from cb721f9 to 95dbaa9 Compare March 25, 2024 08:28
Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
@stephenchengCloud stephenchengCloud force-pushed the private/stephenche/CP-47653 branch from 95dbaa9 to 99391dd Compare March 25, 2024 08:30
Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
Get the percent usage of the host filesystem for logs partition.
Input list is ignored and should be empty
'''
_ = ignored # unused: not sure if it'll be used later, passing pylint
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could it be just like the following? Will the pylint complain this?
def get_percent_log_fs_usage(_):

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried and the pylint didn't complain about this.
Will updated the code.

return "<RRDUpdates object: params=%s>" % str(self.params)

def refresh(self, session, override_params={}):
def refresh(self, session, override_params=None):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I know how does pylint complain override_params={} ?
The current change makes the type of override_params ambiguous.

Or, would it be better to do the following:

params = {}
if override_parameter is not None:
    params = override_parameter

Copy link
Collaborator Author

@stephenchengCloud stephenchengCloud Mar 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a notorious problem with using mutable default values. The change in this PR is the best practice.
Briefly speaking, using mutable default values will cause problems where each call of the method will change the mutable value and will impact the other calls of the method.
See https://www.geeksforgeeks.org/use-mutable-default-value-as-an-argument-in-python/

except ConnectionRefusedError as e:
# "Connection refused[111]"
# this happens when we try to restart session and *that* fails
time.sleep(2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original logic would cover other socket.error also.
Only the "Connection refused[111]" requires time.sleep(2).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I mentioned in the commit message, socket.error is now merged into OSError
The other exceptions of socket.error will be catched later in OSError.

Copy link
Collaborator Author

@stephenchengCloud stephenchengCloud Mar 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • In python3, socket.error, IOError are merged into OSError
  • ConnectionRefusedError is a subclass of OSError:
    • ConnectionRefusedError -> ConnectionError -> OSError
  • urllib.error.HTTPError is a subclass of OSError:
    • urllib.error.HTTPError -> urllib.error.URLError -> OSError
  • HTTPError doesn't have content in args. So we can't use e.args[0]

timeout = rand(interval, interval + dither)
cmdsock.settimeout(timeout)
try:
cmd = cmdsock.recv(cmdmaxlen)
Copy link
Member

@minglumlu minglumlu Mar 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this be a bytes object? And does it need to be changed to string?

Copy link
Collaborator Author

@stephenchengCloud stephenchengCloud Mar 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is indeed a bytes object.
Nice! Another bytes-str issue.
This code should've been covered by XenRT tests, but because of the issue you fixed days ago, the XenRT test failed.
Will modify it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to test this change, I think I should also add your fix to this PR


try:
# Write out pidfile
with open(pidfile, "w", encoding="utf-8") as fd:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This kind of read-and-write pattern seems not correct.

  1. read from a file
  2. check
  3. write to the file

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add a lock for the file operations.
As suggested, raise another ticket for this kind of refine work.
Please check CP-48628

lookup of the other-config:perfmon xml of the SRs connected to a host"""
# `all_xmlconfigs` and `sruuids_by_hostuuid` are updated by clear() and update()
# pylint: disable=global-variable-not-assigned
global all_xmlconfigs
Copy link
Member

@minglumlu minglumlu Mar 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great if these mutable global variables could be eliminated.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also tracked by CP-48628

)
# It's fine to use eval here
# pylint: disable=eval-used
self.consolidation_fn = eval(consolidation_fn)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this eval be get rid of through a map(string -> callable) ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also tracked by CP-48628

Also add the fix for scripts/plugins/perfmon

Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
@stephenchengCloud
Copy link
Collaborator Author

Code modified.
Will re-run XenRT test.

@stephenchengCloud
Copy link
Collaborator Author

All tests passd.
StorageAlerts 3965964
MemoryAlerts 3965965
alerts 3965966

@minglumlu minglumlu merged commit 7d47c5b into xapi-project:feature/py3 Mar 28, 2024
@github-actions
Copy link

pytype_reporter extracted 33 problem reports from pytype output

.

You can check the results of the job here

@stephenchengCloud stephenchengCloud deleted the private/stephenche/CP-47653 branch July 31, 2024 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants