canonical / github-runner-operator

github-runner-operator - charm repository.
Apache License 2.0
9 stars 20 forks source link

fix: ssh health check failure status report #349

Closed yanksyoon closed 1 month ago

yanksyoon commented 1 month ago

Applicable spec:

Overview

If health check fails on SSH health check, report status as unhealthy. We've let SSH health checks pass previously to determine why the network is unable to connect to instances.

Rationale

SSH health check will return as healthy even if the machines cannot be connected via ssh.

From our usual Openstack console logs, we can see that the boot process takes around 30s (usually faster).

Juju Events Changes

Module Changes

Library Changes

Checklist

github-actions[bot] commented 1 month ago

Test coverage for 3928f8f0caa8ddd8485e92e8442c3f4112631d7d

Name                                       Stmts   Miss Branch BrPart  Cover   Missing
--------------------------------------------------------------------------------------
src/charm.py                                 566    139    145     26    72%   227-229, 291-310, 328-330, 331->335, 361-365, 438, 445-447, 474-479, 496-501, 522, 534-540, 554-555, 568, 573, 603-604, 606->615, 610->615, 620-626, 660, 664-669, 720-725, 734->737, 760-777, 781-782, 810-837, 850-853, 874-884, 898-900, 947-948, 950-951, 953-954, 1033->1035, 1100-1101, 1139-1141, 1149-1155, 1219-1244, 1253
src/charm_state.py                           458     17    108      5    95%   334-346, 528-532, 654-655, 710-711, 1146->1149, 1153-1154, 1201
src/errors.py                                 41      0      0      0   100%
src/event_timer.py                            54      7      2      1    86%   105-106, 131, 148-149, 165-166
src/firewall.py                               51     18     20      0    61%   42-43, 66-69, 111-185
src/github_client.py                          96     16     40      5    79%   65-72, 119->exit, 124-125, 195, 218, 231-238, 260->300, 294
src/github_type.py                            50      0      0      0   100%
src/logrotate.py                              43      0      2      0   100%
src/lxd_type.py                               35      0      2      0   100%
src/metrics/__init__.py                        0      0      0      0   100%
src/metrics/events.py                         55      2      8      1    95%   56->59, 166-167
src/metrics/github.py                         16      0      0      0   100%
src/metrics/runner.py                        144     10     32      3    91%   160, 186-199, 235, 272, 454-455
src/metrics/runner_logs.py                    24      5      4      1    79%   30-33, 47->46, 51-52
src/metrics/storage.py                        70      8     12      0    90%   89-90, 117-118, 182-183, 189-190
src/metrics/type.py                            5      0      0      0   100%
src/openstack_cloud/__init__.py               26      0      2      0   100%
src/openstack_cloud/openstack_manager.py     568    124    174     22    78%   96, 263, 438-441, 492, 495-506, 540-541, 543-544, 553, 719-746, 886-887, 909->exit, 919, 946-947, 950-951, 994, 1003-1004, 1034, 1039-1046, 1059-1065, 1069-1071, 1087-1093, 1112-1113, 1115-1126, 1133-1137, 1141-1144, 1167-1168, 1173-1179, 1197, 1212-1237, 1262-1276, 1292-1299, 1333, 1447-1452, 1473-1475, 1503-1508, 1530-1531, 1587-1588, 1598-1599
src/reactive/__init__.py                       0      0      0      0   100%
src/reactive/consumer.py                      40      2      6      0    96%   98-101
src/reactive/runner_manager.py                53      0     14      1    99%   102->exit
src/runner_manager_type.py                    51      0      8      0   100%
src/runner_type.py                            37      0     10      0   100%
src/shared_fs.py                              93     17     10      1    83%   51-52, 119-120, 145-146, 154-155, 161-162, 180, 183-184, 196-197, 240-241
src/utilities.py                              68      7     20      7    82%   86->88, 90->96, 103, 133, 147, 186-189, 244
--------------------------------------------------------------------------------------
TOTAL                                       2644    372    619     73    84%

Static code analysis report

Run started:2024-08-09 06:46:20.542247

Test results:
    No issues identified.

Code scanned:
    Total lines of code: 7694
    Total lines skipped (#nosec): 4
    Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 7

Run metrics:
    Total issues (by severity):
        Undefined: 0
        Low: 0
        Medium: 0
        High: 0
    Total issues (by confidence):
        Undefined: 0
        Low: 0
        Medium: 0
        High: 0
Files skipped (0):