-
Notifications
You must be signed in to change notification settings - Fork 592
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
feat(agw): AGW container restart check their health status #14008
feat(agw): AGW container restart check their health status #14008
Conversation
Thanks for opening a PR! 💯
Howto
More infoPlease take a moment to read through the Magma project's
If this is your first Magma PR, also consider reading
|
af08b95
to
202384d
Compare
202384d
to
86d2a47
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments
41a610e
to
eba742f
Compare
eba742f
to
e6b1187
Compare
e6b1187
to
159431b
Compare
@@ -1002,17 +1002,18 @@ def restart_all_services(self): | |||
"sudo systemctl stop 'magma@*' 'sctpd' ;" | |||
"sudo systemctl start magma@magmad", | |||
) | |||
self._wait_for_pipelined_to_initialize() | |||
|
|||
EXTRA_WAIT_TIME_FOR_OTHER_SERVICES_SECONDS = 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can collect the constants defined in this class and make the class attributes similar to how this is handled in S1ApUtil
or SubscriberUtil
159431b
to
1883308
Compare
Signed-off-by: Marco Pfirrmann <marco.pfirrmann@tngtech.com>
Signed-off-by: Marco Pfirrmann <marco.pfirrmann@tngtech.com>
Signed-off-by: Marco Pfirrmann <marco.pfirrmann@tngtech.com>
Signed-off-by: Marco Pfirrmann <marco.pfirrmann@tngtech.com>
Signed-off-by: Marco Pfirrmann <marco.pfirrmann@tngtech.com>
Signed-off-by: Marco Pfirrmann <marco.pfirrmann@tngtech.com>
Signed-off-by: Marco Pfirrmann <marco.pfirrmann@tngtech.com>
…ter `restart_all_services()` Signed-off-by: Marco Pfirrmann <marco.pfirrmann@tngtech.com>
Signed-off-by: Marco Pfirrmann <marco.pfirrmann@tngtech.com>
Signed-off-by: Marco Pfirrmann <marco.pfirrmann@tngtech.com>
1883308
to
2a1653c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary
The LTE integration tests use sleep timer to wait for a magma services to become functional again after restarting them as part of several tests. These sleep timers are based on empirical data for the
systemd
-based AGW and are not necessarily well suited to account for the containerized AGW's docker container to become healty again after a restart.Instead, we want to check the container health as an indicator to continue with the tests after a restart (and at the same time leave the existing workflow for the
systemd
-based AGW as it is for now).Some special thoughts to be considered here:
mme
service is calledoai_mme
.sctpd
service does not have amagma@
prefix. Nevertheless, it is started via themagmad
service.The PR is separated into ten commits:
get_service_name_from_init_system()
is added to handle the special naming cases.disable_service
uses the correct service name and works with docker andsystemd
.enable_service
uses the correct service name and works with docker andsystemd
.is_service_active()
uses the correct name and checks forsystemctl is-active {service_name}
/ docker container health status is "healthy".health
container which is disabled for the tests).wait_time
for asystemd
-based AGW.restart_services(["list", "of", "services"], time_wait: int)
.pipelined
/datapath
check for the containerized AGW.Closes #12956.
Test Plan
In its current state, all pre-commit and extended S1AP integration tests pass locally using a containerized and a
systemd
-based AGW.Tested with GitHub actions (ongoing) to show the tests are still working:
https://github.com/mpfirrmann/magma/actions/runs/3113678195
Additional Information