Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISD-2586 Support for ha in active/passive mode #50

Merged
merged 37 commits into from
Jan 21, 2025

Conversation

Thanhphan1147
Copy link
Collaborator

@Thanhphan1147 Thanhphan1147 commented Jan 10, 2025

Spec: ISD-196 (internal)

This PR adds support for the ha integration to be used with the hacluster charm to provide high-availability support through pacemaker/corosync, along with unit and integration tests.

Supported workflow:

juju deploy haproxy -n 3
juju deploy hacluster
juju config haproxy vip=<vip>
juju relate haproxy hacluster

Checklist

requirements.txt Outdated Show resolved Hide resolved
requirements.txt Outdated Show resolved Hide resolved
tests/integration/test_ha.py Show resolved Hide resolved
@Thanhphan1147 Thanhphan1147 requested review from arturo-seijas and removed request for javierdelapuente January 13, 2025 08:28
amandahla
amandahla previously approved these changes Jan 20, 2025
Copy link

Test coverage for 93f3dae

Name                      Stmts   Miss Branch BrPart  Cover   Missing
---------------------------------------------------------------------
src/charm.py                156     64     28      5    53%   78, 136-137, 142, 147-149, 157-170, 175, 180, 193-228, 239, 254-257, 264, 277-279, 289-294, 299, 311-325
src/haproxy.py               65     17      2      1    73%   73, 90-95, 110-117, 125-131, 140-149, 159-161, 189
src/http_interface.py        73     25      4      0    62%   74, 83, 92, 106-108, 126, 138, 150, 162, 170-175, 187, 194, 202, 217-227
src/state/config.py          41     22      6      0    40%   52-72, 87-95, 107-108
src/state/exception.py        1      0      0      0   100%
src/state/ha.py              30      1      2      1    94%   50
src/state/ingress.py         35      0      4      0   100%
src/state/tls.py             34     10      6      1    62%   51-59, 85-90
src/state/validation.py      31      6      6      2    73%   62-67, 69->72, 72->74
src/tls_relation.py          53     12     20      9    71%   59, 61, 63, 69-70, 75-76, 78-79, 80->exit, 100-102, 111->113
---------------------------------------------------------------------
TOTAL                       519    157     78     19    65%

Static code analysis report

Run started:2025-01-21 11:52:19.392598

Test results:
  No issues identified.

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

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):

tox.ini Show resolved Hide resolved
@Thanhphan1147 Thanhphan1147 merged commit 0010c90 into main Jan 21, 2025
23 checks passed
@Thanhphan1147 Thanhphan1147 deleted the add_hacluster_interface branch January 21, 2025 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants