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

AGW production scripts are analyzed #13606

Closed
nstng opened this issue Aug 12, 2022 · 1 comment
Closed

AGW production scripts are analyzed #13606

nstng opened this issue Aug 12, 2022 · 1 comment
Labels
component: agw Access gateway-related issue willfix This will be worked on and shouldn't be reaped

Comments

@nstng
Copy link
Contributor

nstng commented Aug 12, 2022

This an attempt to get an overview what python scripts are currently deployed in an AGW production environment. The issue originates from #13451.

  • what exists?
  • what is the status regarding functionality?
  • where are the scripts used?

Some general notes:

  • scripts are deployed in /usr/local/bin
  • scripts use modules deployed in usr/local/lib/python3.8/dist-packages this includes modules deployed via a .deb installation and also external pip dependencies installed via python3-foo packages
    • note that also service modules are used directly by some scripts
  • there are no unit tests for the scripts
  • the scripts originate from lte/gateway/python/scripts, orc8r/gateway/python/scripts and lte/gateway/python/load_tests
@nstng nstng added the willfix This will be worked on and shouldn't be reaped label Aug 12, 2022
@nstng
Copy link
Contributor Author

nstng commented Aug 12, 2022

Results from smoke testing, i.e., in some cases not all arguments were tried or system state pre-conditions analyzed and created.
⚠️: potentially broken or might not make sense in a production environment -> issue might be needed

lte/gateway/python/scripts/

script needs sudo called by notes
agw_health_cli.py ✔️ - instead of sudo also sudo chmod a+r /var/log/syslog possible
config_stateless_agw.py ✖️ s1ap_utils.py, bash script -
⚠️cpe_monitoring_cli.py ✖️ - missing shebang, no reasonable output
create_oai_certs.py ✔️ generate_oai_config.py -
dp_probe_cli.py ✔️ - -
enodebd_cli.py ✖️ - -
fake_user.py ✖️ - -
⚠️feg_hello_cli.py ✖️ dev_tools.py calling script is not deployed, error output E0812 06:44:11.272452381 689690 hpack_parser.cc:1216] Error parsing metadata: error=invalid value key=content-type value=text/html; charset=UTF-8, Error! [StatusCode.UNKNOWN] Stream removed
generate_dnsd_config.py ✔️ magma_dnsd.service -
⚠️generate_oai_config.py ✔️ magma_mme.service seems to be the origin of integ test syslog pollution, ERROR:root:Error retrieving config for mme, key not found: amf_region_id
⚠️ha_cli.py ✖️ - gRPC failed with StatusCode.UNIMPLEMENTED:
hello_cli.py ✖️ dev_tools.py calling script is not deployed
⚠️icmpv6.py ✔️ s1ap_utils.py missing shebang and header, no cmdline parser, bazel uses other scapy version, is this integ tests only and should not be packaged?
mobility_cli.py ✖️ dp_probe_cli, hil bash script
⚠️mobility_dhcp_cli.py ? - seems to be broken for a long time by at least #2292 and #9755
⚠️ocs_cli.py ? - see feg_hello_cli.py
⚠️packet_ryu_cli.py ? - ModuleNotFoundError: No module named 'integ_tests', does this make sense in a prod environment?, even if module added there are problems
packet_tracer_cli.py ✖️ - -
⚠️pcrf_cli.py ? - see feg_hello_cli.py
pipelined_cli.py ✖️ ✔️ dp_probe_cli.py, go files some functionality requires sudo
policydb_cli.py ✖️ - -
⚠️s6a_proxy_cli.py ? - see feg_hello_cli.py
s6a_service_cli.py ✖️ - -
⚠️session_manager_cli.py ? EModuleNotFoundError: No module named 'magma.pipelined.tests', does this make sense in a prod environment?
⚠️sgs_cli.py ? - see feg_hello_cli.py
⚠️sms_cli.py ? - nas_message_container: "\020", gRPC failed with StatusCode.UNIMPLEMENTED:
spgw_service_cli.py ✖️ - -
state_cli.py ✖️ s1ap_utils.py -
subscriber_cli.py ✖️ - -
user_trace_cli.py ✖️ - -

orc8r/gateway/python/scripts/

script needs sudo called by notes
checkin_cli.py ✖️ health_cli.py, various not deployed scripts seems to need a cloud setup (not tested here)
ctraced_cli.py ✖️ - no reasonable output
directoryd_cli.py ✖️ - no reasonable output
generate_fluent_bit_config.py ✔️ magma_td-agent-bit.service (not started by default) m: WARNING:root:Error loading yml config
⚠️generate_lighttpd_config.py ? magma_lighttpd.service (not started by default) AttributeError: 'dict' object has no attribute 'enable_caching'
generate_nghttpx_config.py ✔️ magma_control_proxy.service -
generate_service_config.py ✖️ see notes used by all generate scripts for services
health_cli.py ✖️ see notes called by agw_health_cli.py
⚠️magma_conditional_service.py ✖️ see notes very complex to test, was this intended to use in systemd service configurations and is not used anymore?
magma_get_config.py ✖️ - -
⚠️magmad_cli.py ✖️ - config_stateless switch -> UnboundLocalError: local variable 'config_arg' referenced before assignment
service303_cli.py ✖️ - -
service_util.py ? in (all?) systemd files in ExecStopPost does not make sense to call in terminal because is reading systemd status via env vars that only exist in context
show_gateway_info.py ✖️ - -
⚠️traffic_cli.py ? - no shebang, needs (not logged and not installed by default) nmcli (via network-manager)

lte/gateway/python/load_tests/

script needs sudo called by notes
⚠️loadtest_mobilityd.py ✖️ ModuleNotFoundError: No module named 'load_tests'
⚠️loadtest_pipelined.py ✖️ ModuleNotFoundError: No module named 'load_tests'
⚠️loadtest_sessiond.py ✖️ no shebang, ModuleNotFoundError: No module named 'load_tests'
⚠️loadtest_subscriberdb.py ✖️ ModuleNotFoundError: No module named 'load_tests'

@nstng nstng added the component: agw Access gateway-related issue label Dec 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: agw Access gateway-related issue willfix This will be worked on and shouldn't be reaped
Projects
None yet
Development

No branches or pull requests

2 participants