Skip to content
This repository was archived by the owner on Sep 7, 2020. It is now read-only.

Ppm 30#1583

Closed
odkq wants to merge 455 commits intomasterfrom
PPM-30
Closed

Ppm 30#1583
odkq wants to merge 455 commits intomasterfrom
PPM-30

Conversation

@odkq
Copy link
Collaborator

@odkq odkq commented Aug 5, 2020

No description provided.

@odkq odkq requested review from arnout and rmelotte August 5, 2020 14:52
Comment on lines 94 to 95
self._run_shell_cmd("docker", ["stop", self.name])
self._run_shell_cmd("docker", ["container", "rm", "-f", self.name])
Copy link
Collaborator

Choose a reason for hiding this comment

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

This needs to use docker_name as well:

Suggested change
self._run_shell_cmd("docker", ["stop", self.name])
self._run_shell_cmd("docker", ["container", "rm", "-f", self.name])
self._run_shell_cmd("docker", ["stop", self.docker_name])
self._run_shell_cmd("docker", ["container", "rm", "-f", self.docker_name])

self.docker_network = "boardfarm-ci_default"

if self.role == "controller":
self._docker_compose(["-d", "--name", self.name, "controller"],
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
self._docker_compose(["-d", "--name", self.name, "controller"],
self._docker_compose(["-d", "--name", self.docker_name, "controller"],

self.controller_entity = \
ALEntityDocker(self.name, device=self, is_controller=True, compose=True)
else:
self._docker_compose(["-d", "--name", self.name, "agent"],
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
self._docker_compose(["-d", "--name", self.name, "agent"],
self._docker_compose(["-d", "--name", self.docker_name, "agent"],

mariomaz and others added 24 commits August 6, 2020 13:23
This is a preparatory commit.

Method calc_curr_traffic() is defined in mon_wlan_hal_dwpal and used
when getting radio and VAP statistics. In order to later use it also from
mon_wlan_hal_nl80211, move it to a common base class.

Signed-off-by: Mario Maz <mmazzapater@gmail.com>
Create method to get usage statistics of a local network interface.
This method is copied and extended from 802_3 link metrics collector.
In a future commit, code will be refactored to avoid duplication.

Signed-off-by: Mario Maz <mmazzapater@gmail.com>
Use network_utils::get_iface_stats() to obtain radio and VAP stats in
the nl80211 flavor of the BWL.

Signed-off-by: Mario Maz <mmazzapater@gmail.com>
Signed-off-by: Mario Maz <mmazzapater@gmail.com>
…ctor

Complete moving code from ieee_802_3_link_metrics_collector to
network_utils::get_iface_stats() by removing code here.

Signed-off-by: Mario Maz <mmazzapater@gmail.com>
High CPU was noticed in platforms that use prplmesh_watchdog.
Currently, polling time is configured to 1 sec which is too
frequent and can be optimized.

In openWrt based platforms the init.d provides respawn
functionality which starts the process again
(up to 5 tries) if it ends "too soon" (configurable).
However, the prplmesh processes are started using the
prplmesh utils script and if the script fulfills its
purpose and exists the init.d will again start the
prplmesh using the prplmesh utils script as it things
the process ended too soon.
This means we need to "hang" the script until we really
wish to exit it (on user request or on failure).

Watchdog serves 2 purposes:

steady-state: check that one of the controller/agent/agent_wlan
prplmesh processes did not end and if so - end the script.
on failure: make sure all processes are closed properly to prevent
duplicate of prplmesh processes as was previously experienced.
Testing shows that increasing to 5 sec is more optimal and still
serves the same purpose.

Signed-off-by: Alex Kanter <alexx.kanter@intel.com>
Need to create new folder with cmake and prplmesh_platform_db.in
files, modify prplmesh_platform_db.in by adding new variables for
hostapd control path and wpa supplicant control path.

Add 6 variables 3 for hostapd and 3 for wpa supplicant, modify
cmake file for building bpl by adding directory with new cmake
file for generation prplmesh_platform_db file.

Signed-off-by: Vladyslav Tupikin <v.tupikin@inango-systems.com>
Need to remove prplmesh_platform_db creation
from the prplmesh_platform_db_init() function
because now prplmesh_platform_db generates by
cmake.

Signed-off-by: Vladyslav Tupikin <v.tupikin@inango-systems.com>
Need to create 2 stubs for 2 methods:
bpl_cfg_get_wpa_supplicant_ctrl_path
bpl_cfg_get_hostapd_ctrl_path

Create stubs and prototypes with documentation
for the new methods for linux and uci platforms.

Signed-off-by: Vladyslav Tupikin <v.tupikin@inango-systems.com>
…l_path()

Add implementation in linux platform for
bpl_cfg_get_wpa_supplicant_ctrl_path() method.

Signed-off-by: Vladyslav Tupikin <v.tupikin@inango-systems.com>
Add implementation in lunux platform for
bpl_cfg_get_hostapd_ctrl_path() method.

Signed-off-by: Vladyslav Tupikin <v.tupikin@inango-systems.com>
Need to add correct wpa_ctrl_path for ap_manager
(for AP manager it's hostapd_ctrl_path) using method
from the bpl library.

Signed-off-by: Vladyslav Tupikin <v.tupikin@inango-systems.com>
Signed-off-by: Vladyslav Tupikin <v.tupikin@inango-systems.com>
Need to update ap_wlan_hal_dummy() method
by adding argument for hal_conf_t structure,
and update dummy HAL for using new argument.

Signed-off-by: Vladyslav Tupikin <v.tupikin@inango-systems.com>
Need to update ap_wlan_hal_dwpal() method
by adding argument for hal_conf_t structure,
and update dummy HAL for using new argument.

Signed-off-by: Vladyslav Tupikin <v.tupikin@inango-systems.com>
Need to update ap_wlan_hal_nl80211() method
by adding argument for hal_conf_t structure,
and update dummy HAL for using new argument.

Signed-off-by: Vladyslav Tupikin <v.tupikin@inango-systems.com>
Add wpa_ctrl_path object of hal_conf structure and
fill up using bpl method bpl_cfg_get_hostapd_ctrl_path.

Signed-off-by: Vladyslav Tupikin <v.tupikin@inango-systems.com>
Need to update mon_wlan_hal_create() method
by adding argument for hal_conf_t structure,
and update dummy HAL for using new argument.

Signed-off-by: Ivan Efimov <i.efimov@inango-systems.com>
Signed-off-by: Vladyslav Tupikin <v.tupikin@inango-systems.com>
Need to update mon_wlan_hal_create() method
by adding argument for hal_conf_t structure,
and update dwpal HAL for using new argument.

Signed-off-by: Ivan Efimov <i.efimov@inango-systems.com>
Signed-off-by: Vladyslav Tupikin <v.tupikin@inango-systems.com>
Need to update mon_wlan_hal_create() method
by adding argument for hal_conf_t structure,
and update nl80211 HAL for using new argument.

Signed-off-by: Ivan Efimov <i.efimov@inango-systems.com>
Signed-off-by: Vladyslav Tupikin <v.tupikin@inango-systems.com>
Need to update WPA_ATTACH handler - create ojcect
of hal_conf_t structure, fill up wpa_ctrl_path using
bpl_cfg_get_wpa_supplicant_ctrl_path() method,
tranfer hal_conf_t object to the sta_wlan_hal_create() method.

Also need to update arguments in sta_wlan_hal_create()
method - add new argument for hal_conf_t structure.

Signed-off-by: Vladyslav Tupikin <v.tupikin@inango-systems.com>
Need to update sta_wlan_hal_create() method
by adding argument for hal_conf_t structure,
and update dummy HAL for using new argument.

Signed-off-by: Ivan Efimov <i.efimov@inango-systems.com>
Signed-off-by: Vladyslav Tupikin <v.tupikin@inango-systems.com>
Need to update sta_wlan_hal_create() method
by adding argument for hal_conf_t structure,
and update dwpal HAL for using new argument.

Signed-off-by: Ivan Efimov <i.efimov@inango-systems.com>
Signed-off-by: Vladyslav Tupikin <v.tupikin@inango-systems.com>
Need to update sta_wlan_hal_create() method
by adding argument for hal_conf_t structure,
and update nl80211 HAL for using new argument.

Signed-off-by: Ivan Efimov <i.efimov@inango-systems.com>
Signed-off-by: Vladyslav Tupikin <v.tupikin@inango-systems.com>
morantr and others added 28 commits August 6, 2020 13:29
Cleanup preparative commit.
PR #1504 has added all the members are required for the Topology Task to the AgentDB.
Since at that time the AgentDB was not really shared since the son_slaves were on a different
process than the backhaul manager, we had to create a local copy of everything which is
passed on on messages between the son_slaves and the backhaul manager.
Now that PR #1584 is merged and the database is shared, we can delete all of these local
copies:
1. Remove passing local_gw and local_controller flags.
2. Remove passing bridge_mac on backhaul connected notification, and setting a local
copy of it on the backhaul constructor.
3. Removed passing of vap list update to the backhaul manager.
4. Remove passing client associated and disconnected messages to the backhaul manager.
5. Remove dependency on backhaul manager member "slaves_sockets" for "freq_type" and
remove it from the backhaul manager.
6. Remove adding the radio nodes again on the backhaul manager (it is added on the
son_slave already).
7. Remove the local copy of a bunch of parameters on the "BACKHAUL_ENABLE" handler,
that we now have access to through the DB.

PPM-320

Signed-off-by: Moran Shoeg <moranx.shoeg@intel.com>
Remove these messages since they are no longer being used:
ACTION_BACKHAUL_CLIENT_DISCONNECTED_NOTIFICATION
ACTION_BACKHAUL_CLIENT_ASSOCIATED_NOTIFICATION
ACTION_BACKHAUL_HOSTAP_VAPS_LIST_UPDATE_NOTIFICATION

PPM-320

Signed-off-by: Moran Shoeg <moranx.shoeg@intel.com>
On GW platform the ethernet interface which is used for backhaul connection must be
empty since the GW doesn't need wired backhaul connection. Since it is being set on
the constructor from the agent configuration file, clear it here when we know if the
agent runs on a GW.
Since now on GW platform the ethernet interface is empty, add a precondition for not
being a GW before doing backhaul interfaces validation on STATE_BACKHAUL_ENABLE.

PPM-320

Signed-off-by: Moran Shoeg <moranx.shoeg@intel.com>
Until now, only the front interface mac has been set to a value
after the fronthaul has joined.
Add code that set the back radio interface mac as well after
successful attach, and clear both front and back radio on a restart phase.

PPM-320

Signed-off-by: Moran Shoeg <moranx.shoeg@intel.com>
Media type functionality is needed by few Multi-AP flows.
One of the Unified Agent goals is to keep the backhaul manager slim as
possible and moving all code that is unrelated to backhaul link
establishment out of the thread.
Therefore, move media_type functionality out to an external file.

PPM-320

Signed-off-by: Moran Shoeg <moranx.shoeg@intel.com>
Add a skeleton for the Topology task, without any real content except a constructor.
Add the task to the task pool on the backhaul manager.
On the follow-ups commits I will move pieces by pieces of code from the backhaul
manager to the Topology Task, to make the review easier.

PPM-320

Signed-off-by: Moran Shoeg <moranx.shoeg@intel.com>
Preparative commit.
Add send_topology_notification function to topology task.
This function is not replacing any function on the backhaul manager since it does not exist.
Currently, the backhaul manager builds this message on each place it needs to send it.
This function will be used on the next commits.

PPM-320

Signed-off-by: Moran Shoeg <moranx.shoeg@intel.com>
Preparative commit.
Add send_topology_discovery function to the topology task.
Remove the same function from the backhaul manager.
Note that this commit breaks the compilation since the call for the removed
function remained on the backhaul manager.
This is done for code reviewability and will be fixed on the next commit.

PPM-320

Signed-off-by: Moran Shoeg <moranx.shoeg@intel.com>
Add to the topology task a work function.
Move the topology related code from backhaul manager "after_select"
function new topology task work function.

PPM-320

Signed-off-by: Moran Shoeg <moranx.shoeg@intel.com>
Move the topology discovery handler from the backhaul manager to the Topology Task.
As part of this commit add the cmdu handler to the topology task as well.

PPM-320

Signed-off-by: Moran Shoeg <moranx.shoeg@intel.com>
Move the topology query handler from the backhaul manager to the Topology Task.

As part of this commit I changed the representation of MID print from decimal
to hex since it makes more sense to print it in hex, but this change has broken
the topology test on test_flows script which expected to a decimal value.
Change the format on test_flows.py so the topology task will not fail.

PPM-320

Signed-off-by: Moran Shoeg <moranx.shoeg@intel.com>
Add event handler function to the Topology Task with a handler to
event type "AGENT_RADIO_STATE_CHANGED".
Send the above event to the task from all the relevant places on the
backhaul manager.

PPM-320

Signed-off-by: Moran Shoeg <moranx.shoeg@intel.com>
This is a preparative commit for a future PR, preparing the handlers of
client connect/disconnect event which will have to move from the unified
Agent to this task.

PPM-320

Signed-off-by: Moran Shoeg <moranx.shoeg@intel.com>
This commit is only cosmetic and does not change any logic.

The topology query handler currently adds five tlvs to the response message.
Some of them are pretty huge and it makes the function very long and unreadable.
Create a function that adds and fill each tlv to the response message, and call
them from the handler.

PPM-320

Signed-off-by: Moran Shoeg <moranx.shoeg@intel.com>
PPM-320

Signed-off-by: Moran Shoeg <moranx.shoeg@intel.com>
Signed-off-by: pablo <pablo@odkq.com>
Use directly the hostname instead of querying for the ip

Signed-off-by: pablo <pablo@odkq.com>
Entrypoint calls the json for "in compose" tests

Signed-off-by: pablo <pablo@odkq.com>
Dockerfile to create boardfarm docker image and docker-compose.yml with
the configuration for boardfarm, controller and extender

Signed-off-by: pablo <pablo@odkq.com>
It wraps docker-compose tests

- Verifies versions of docker and docker-compose
- Creates and launches boardfarm image with the correct environment
  variables
- Cleans images after building
- Returns value from boardfarm process inside the image

Signed-off-by: pablo <pablo@odkq.com>
Signed-off-by: pablo <pablo@odkq.com>
Signed-off-by: pablo <pablo@odkq.com>
Signed-off-by: pablo <pablo@odkq.com>
Signed-off-by: odkq <pablo@odkq.com>
Signed-off-by: odkq <pablo@odkq.com>
Signed-off-by: odkq <pablo@odkq.com>
@rmelotte
Copy link
Collaborator

Superseded by #1587

@rmelotte rmelotte closed this Aug 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.