Skip to content

Rsarwad move s1ap state ctx #26

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

Open
wants to merge 41 commits into
base: 11191_move_enb_context
Choose a base branch
from

Conversation

rsarwad
Copy link
Owner

@rsarwad rsarwad commented Sep 8, 2022

Summary

Test Plan

Additional Information

  • This change is backwards-breaking

@github-actions
Copy link

github-actions bot commented Sep 8, 2022

Thanks for opening a PR! 💯

A couple initial guidelines

Howto

  • Reviews. The "Reviewers" listed for this PR are the Magma maintainers who will shepherd it.
  • Checks. All required CI checks must pass before merge.
  • Merge. Once approved and passing CI checks, use the ready2merge label to indicate the maintainers can merge your PR.

More info

Please take a moment to read through the Magma project's

If this is your first Magma PR, also consider reading

@github-actions
Copy link

github-actions bot commented Sep 8, 2022

❌ The Semantic PR check ended with status failure. See instructions on formatting your commit and pull request titles.

@@ -94,7 +94,7 @@ bool trigger_agw_offload_for_ue(const hash_key_t keyP, void* const elementP,
callback_data_t* callback_data = (callback_data_t*)parameterP;
ha_agw_offload_req_t* offload_request =
(ha_agw_offload_req_t*)callback_data->request;
s1ap_state_t* s1ap_state = (s1ap_state_t*)callback_data->s1ap_state;
S1apState* s1ap_state = (S1apState*)callback_data->s1ap_state;
Copy link

Choose a reason for hiding this comment

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

[cpplint] reported by reviewdog 🐶
Using C-style cast. Use reinterpret_cast<S1apState*>(...) instead [readability/casting] [4]

AssertFatal(
is_initialized,
"S1apStateManager init() function should be called to initialize state");
// TODO: Add check for reentrant read/write function, to block multiple
Copy link

Choose a reason for hiding this comment

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

[cpplint] reported by reviewdog 🐶
Missing username in TODO; it should look like "// TODO(my_username): Stuff." [readability/todo] [2]

@rsarwad rsarwad force-pushed the rsarwad_move_s1ap_state_ctx branch from 072426f to 11e0b70 Compare September 10, 2022 19:29
@rsarwad rsarwad force-pushed the rsarwad_move_s1ap_state_ctx branch from 11e0b70 to 19d5564 Compare September 12, 2022 05:01
num_erab = e_rab_to_be_switched_dl_list_req->list.count;
for (index = 0; index < num_erab; ++index) {
eRABToBeSwitchedDlItemIEs_p =
(S1ap_E_RABToBeSwitchedDLItemIEs_t*)

Choose a reason for hiding this comment

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

[cpplint] reported by reviewdog 🐶
Using C-style cast. Use reinterpret_cast<S1ap_E_RABToBeSwitchedDLItemIEs_t*>(...) instead [readability/casting] [4]

blk2bstr(eRab_ToBeSwitchedDLItem->transportLayerAddress.buf,
eRab_ToBeSwitchedDLItem->transportLayerAddress.size);
e_rab_to_be_switched_dl_list.item[index].gtp_teid =
htonl(*((uint32_t*)eRab_ToBeSwitchedDLItem->gTP_TEID.buf));

Choose a reason for hiding this comment

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

[cpplint] reported by reviewdog 🐶
Using C-style cast. Use reinterpret_cast<uint32_t*>(...) instead [readability/casting] [4]

@rsarwad rsarwad force-pushed the rsarwad_move_s1ap_state_ctx branch from a08b1e8 to 5db2c25 Compare September 16, 2022 05:30
@rsarwad rsarwad force-pushed the rsarwad_move_s1ap_state_ctx branch from 5db2c25 to dad8f87 Compare September 16, 2022 05:51
@rsarwad rsarwad force-pushed the rsarwad_move_s1ap_state_ctx branch from e72dbc4 to 271f4be Compare September 21, 2022 14:59
@rsarwad rsarwad force-pushed the 11191_move_enb_context branch from 3f72981 to 8c09608 Compare September 29, 2022 03:39
Alex Jahl and others added 9 commits September 29, 2022 10:24
* chore(magmad): Improve error handling of generic commands

Work in progress, orc8r (and possibly NMS) needs to be adapted.

Signed-off-by: Sebastian Thomas <[email protected]>

* Propagate Not Found error to orc8r

Signed-off-by: Cameron Voisey <[email protected]>

* Add information about configuration of generic commands

Signed-off-by: Cameron Voisey <[email protected]>

* Change default value of parameters field to use shell_params

Signed-off-by: Cameron Voisey <[email protected]>

* Handle further error cases

Signed-off-by: Cameron Voisey <[email protected]>

* Allow generic command to run with parameters `{"shell_params": []}`

Signed-off-by: Cameron Voisey <[email protected]>

Signed-off-by: Sebastian Thomas <[email protected]>
Signed-off-by: Cameron Voisey <[email protected]>
Co-authored-by: Sebastian Thomas <[email protected]>
Testing:
   verified Registration with NetworkFeature IE support by configuring
   enable/disable

Signed-off-by: ganeshg87 <[email protected]>

Signed-off-by: ganeshg87 <[email protected]>
* feat(ci): Add docker promote script and workflow

Taken from @ShubhamTatvamasi's repo (https://github.com/ShubhamTatvamasi/magma-artifactory-docker-promote/blob/master/.github/workflows/docker-promote.yml).

Signed-off-by: Moritz Huebner <[email protected]>

* feat(ci): Add helm promote workflow

Taken from @nstng's repo (https://github.com/nstng/magma-artifactory-helm-promote/blob/master/.github/workflows/helm-promote.yml).

Signed-off-by: Moritz Huebner <[email protected]>

* feat(ci): Add docker promote script and workflow

Taken from @ShubhamTatvamasi's repo (https://github.com/ShubhamTatvamasi/magma-artifactory-docker-promote/blob/master/.github/workflows/docker-promote.yml).

Signed-off-by: Moritz Huebner <[email protected]>

* feat(ci): Small improvements to the docker promote workflow

- Remove checkout action because we are using `wget` to get the `promote.sh` script.
- Pin the docker login action to version 2.0.0.
- Hand variables to `promote.sh` via environment variables, check at the beginning of the script that they exist.
- Add an echo response at the end of the inner loop in `promote.sh` to log out which artifacts have been promoted.
- Disable a shellcheck check.

Signed-off-by: Moritz Huebner <[email protected]>

* feat(ci): Improved a logging string

Signed-off-by: Moritz Huebner <[email protected]>

* feat(ci): Added double quotes

Signed-off-by: Moritz Huebner <[email protected]>

* feat(ci): Improved docker-promote workflow

- Added versions as inputs
- Added check if user is a member of "approvers-ci"
- fixed incorrect path to promote script

Signed-off-by: Moritz Huebner <[email protected]>

* feat(ci): Improved docker-promote workflow

- Added version as input
- Added check if user is a member of "approvers-ci"

Signed-off-by: Moritz Huebner <[email protected]>

* feat(ci): Fixed version pinning

Signed-off-by: Moritz Huebner <[email protected]>

* feat(ci): Fixed version pinning

Signed-off-by: Moritz Huebner <[email protected]>

* feat(ci): Simplified use of inputs

Signed-off-by: Moritz Huebner <[email protected]>

* feat(ci): Improved the naming of some variables

Signed-off-by: Moritz Huebner <[email protected]>

* feat(ci): Added license headers

Signed-off-by: Moritz Huebner <[email protected]>

* feat(ci): Remove default values in promote workflows.

Signed-off-by: Moritz Huebner <[email protected]>

Signed-off-by: Moritz Huebner <[email protected]>
…s1ap module (magma#13728)

* fix(agw): Added code to replace std:map wth protobuf map
* fix(agw): Move the c files to cpp and fixed compilation errors
* Changed the extension of header files to hpp in s1ap module
* Modified code to replace hash list with protobuf map for s1ap module
* Moved the map's unit test cases to common library
* Replaced hashlist of UEs within eNB description to map in s1ap test module
* Adding new file mme_init.hpp file
* fix(agw): Modified code to replace hashlist with protobuf map for enb_description_t in s1ap module
* fix(agw): Migrated hash table,mmeid2associd to protobuf map
* Modified code to convert mme_ue_id_imsi_htbl to protobuf map
* fix(agw): Migrate hash list of enb_description_t to protobuf_map
* Modified code to use state_ue_map, declared new parameter in s1ap state manager
* agw(fix): coverted C structure of ue context, ue_description_t to protobuf structure, UeDescription in s1ap module
* Defined S1ap UE state in proto file and removed the enum definition
from s1ap_types.hpp
* Modified code to convert C structure to protobuf structure for enb context

Signed-off-by: Rashmi <[email protected]>
@github-actions
Copy link

github-actions bot commented Oct 3, 2022

Oops! Looks like you failed the DCO check. Be sure to sign all your commits.

Howto

♻️ Updated: ❌ The check is still failing the DCO check after the last commit.

@rsarwad rsarwad force-pushed the rsarwad_move_s1ap_state_ctx branch from d7d1e9f to b16660e Compare October 3, 2022 06:22
nstng and others added 19 commits October 4, 2022 08:15
Signed-off-by: tmdzk <[email protected]>

Signed-off-by: tmdzk <[email protected]>
Co-authored-by: tmdzk <[email protected]>
…14081)

Signed-off-by: Alexander zur Bonsen <[email protected]>

Signed-off-by: Alexander zur Bonsen <[email protected]>
…ed (magma#14020)

* chore: deprecated packer templates for libvirt images are removed

Signed-off-by: Marco Pfirrmann <[email protected]>

* chore: deprecated packer images for debian machines are removed

Signed-off-by: Marco Pfirrmann <[email protected]>

* chore: deprecated aws images using debian are removed

Signed-off-by: Marco Pfirrmann <[email protected]>

* chore: deprecated `stretch_snapshot` ansible role is removed

Signed-off-by: Marco Pfirrmann <[email protected]>

* chore: deprecated `provision_stretch.sh` file is removed

Signed-off-by: Marco Pfirrmann <[email protected]>

* chore: several deprecated debian hints are removed

Signed-off-by: Marco Pfirrmann <[email protected]>

* chore: packer templates for Ubuntu 16.04 xenial are removed

Signed-off-by: Marco Pfirrmann <[email protected]>

* chore: temprary packer template for broken OVS are removed

Signed-off-by: Marco Pfirrmann <[email protected]>

* chore: incomplete packer template is removed

Signed-off-by: Marco Pfirrmann <[email protected]>

* chore: packer script for magma-dev vm is renamed

Signed-off-by: Marco Pfirrmann <[email protected]>

* chore: `setup.sh` since all steps are included in `ubuntu_setup.sh`

Signed-off-by: Marco Pfirrmann <[email protected]>

* chore: next batch of debian scripts are removed

Signed-off-by: Marco Pfirrmann <[email protected]>

* chore: hints to debian OS are removed from Ansible roles

Signed-off-by: Marco Pfirrmann <[email protected]>

* chore: unused `envoy` Ansible role is removed

Signed-off-by: Marco Pfirrmann <[email protected]>

* chore: deprecated `uselocalpkgrepo` Ansible role is removed

Signed-off-by: Marco Pfirrmann <[email protected]>

* chore: readabilty of `magma-dev-virtualbox.json` is improved

Signed-off-by: Marco Pfirrmann <[email protected]>

* chore: hints to old `magma_dev_focal` are adapted

Signed-off-by: Marco Pfirrmann <[email protected]>

Signed-off-by: Marco Pfirrmann <[email protected]>
* fix(lte): Fixed `detect_init_system`

- Added `exec_command_capture_output` to have an option to capture stdout and continue on non-zero exit codes.
- Removed `_is_installed` function.
- Simplified docker/systemd_magmad_running logic.
- Renamed `MagmadUtil._data` to `MagmadUtil._credentials` and removed "command" key.
- No longer write "command" to `MagmadUtil._credentials`, as this was not used anyway.

Signed-off-by: Moritz Huebner <[email protected]>

* fix(lte): Added _is_installed check back in

Signed-off-by: Moritz Huebner <[email protected]>

* fix(lte): Improve changes in previous commits

- replace `&` with `and` in magmad running checks so that second condition is only evaluated if the first suceeds
- Improved docstring of `exec_command_capture_output`
- Added type hints to `exec_command`, `exec_command_output`, and `exec_command_capture_output` to highlight how these methods are different

Signed-off-by: Moritz Huebner <[email protected]>

* fix(lte): Improve changes in previous commits

- Perform sequential checks for installation and if magma is running
- Remove exec_command_capture_output again as it is now unused

Signed-off-by: Moritz Huebner <[email protected]>

* Revert "fix(lte): Improve changes in previous commits"

This reverts commit 2bb7908.

Signed-off-by: Moritz Huebner <[email protected]>

* fix(lte): Properly moved installation checks first

Signed-off-by: Moritz Huebner <[email protected]>

Signed-off-by: Moritz Huebner <[email protected]>
The concept of shared mconfig was added on the top level of the
mconfig a while ago to handle configuration that is used in all
services. However, the health cli tool is using the top-level
entries of mconfig to decide which services to check. the shared
mconfig needs to be excluded here.

Signed-off-by: Sebastian Thomas <[email protected]>
Signed-off-by: Paulo Henrique Calaes Oliveira <[email protected]>
Co-authored-by: Paulo Henrique Calaes Oliveira <[email protected]>
Co-authored-by: Sebastian Thomas <[email protected]>
Signed-off-by: Sebastian Wolf <[email protected]>

Signed-off-by: Sebastian Wolf <[email protected]>
Signed-off-by: Sebastian Wolf <[email protected]>

Signed-off-by: Sebastian Wolf <[email protected]>
Signed-off-by: Cameron Voisey <[email protected]>

Signed-off-by: Cameron Voisey <[email protected]>
* chore(ci): add workflow that runs s1ap integ tests against dockerized agw running on magma_dev VM

Signed-off-by: Fritz Lehnert <[email protected]>
Signed-off-by: Alexander zur Bonsen <[email protected]>

* chore(ci): correct spelling of set up

Signed-off-by: Fritz Lehnert <[email protected]>

* chore(ci): shorten and clarify docstring

Signed-off-by: Fritz Lehnert <[email protected]>

* chore(ci): improve whitespace consistency

Signed-off-by: Fritz Lehnert <[email protected]>

* chore(ci): remove debug output

Signed-off-by: Fritz Lehnert <[email protected]>

Signed-off-by: Fritz Lehnert <[email protected]>
Signed-off-by: Alexander zur Bonsen <[email protected]>
Co-authored-by: Fritz Lehnert <[email protected]>
@rsarwad rsarwad force-pushed the rsarwad_move_s1ap_state_ctx branch from a333a74 to 5d2e6db Compare October 7, 2022 07:21
# to switch to a different release (for example v1.8)
git checkout v1.8

# to switch to master (developement version)
Copy link

Choose a reason for hiding this comment

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

[misspell] reported by reviewdog 🐶
"developement" is a misspelling of "development"

┏Access Control & ┓ ┏━━━━Session━━━━┓ │ ┏━━━━Device━━━━━┓ │┏━━━Optional━━━━┓
┃ Management ┃ ┃ & Policy ┃ │ ┃ Management ┃ │┃ Services ┃
┃ ┌───────────┐ ┃ ┃ Management ┃ │ ┃ ┌───────────┐ ┃ │┃ ┌────────────┐┃
┃ │ MME │ ┃ ┃ ┌───────────┐ ┃ └──╋─│ magmad │ ┃ │┃ │ monitord │┃
Copy link

Choose a reason for hiding this comment

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

[misspell] reported by reviewdog 🐶
"monitord" is a misspelling of "monitored"


Dynamic services are optional AGW services that must be enabled by updating the AGW's *magmad* configuration.

### Monitord
Copy link

Choose a reason for hiding this comment

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

[misspell] reported by reviewdog 🐶
"Monitord" is a misspelling of "Monitored"


### Monitord

*monitord* service. Monitors the CPEs connected to the AGW. Sends ICMP pings to the CPEs connected to the gateway and reports liveness metrics.
Copy link

Choose a reason for hiding this comment

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

[misspell] reported by reviewdog 🐶
"monitord" is a misspelling of "monitored"

wolfseb and others added 5 commits October 7, 2022 09:27
* Add new strtobool function

Signed-off-by: Krisztián Varga <[email protected]>

* chore: Clean up boolean arguments in fabfiles

Signed-off-by: Krisztián Varga <[email protected]>

Signed-off-by: Krisztián Varga <[email protected]>
Signed-off-by: Nils Semmelrock <[email protected]>

Signed-off-by: Nils Semmelrock <[email protected]>
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.