sonic-buildimage/dockers
Zhaohui Sun 1effff9836
Enable system-site-packages for ptf docker and install thrift for test_qos_sai (#12094)
Why I did it
test_sai_qos failed because of the following error:

"stderr_lines": [
        "Traceback (most recent call last):", 
        "  File \"/usr/bin/ptf\", line 522, in <module>", 
        "    test_modules = load_test_modules(config)", 
        "  File \"/usr/bin/ptf\", line 413, in load_test_modules", 
        "    mod = imp.load_module(modname, *imp.find_module(modname, [root]))", 
        "  File \"saitests/switch.py\", line 19, in <module>", 
        "    import switch_sai_thrift", 
        "ImportError: No module named switch_sai_thrift"
    ], 

It's because test_sai_qos runs ptf script which imports switch_sai_thrift, switch_sai_thrift is installed from python-saithrift_0.9.4_amd64.deb.
For master image, the deb file is for python3, but ptf only has virtual python3 environment, that's why we add --system-site-packages to allow virtual env to access system site-packeges.

Add thrift package in docker ptf virtual python3 env, because currently env-python3 doesn't have thrift module which is needed in switch_sai_thrift.

How I did it
Enable --system-site-packages for virtual py3 env in ptf docker and install thrift for test_qos_sai

How to verify it
load and login ptf conatiner
dpkg - i python-saithrift_0.9.4_amd64.deb
source /root/env-python3/bin/activate
python
import switch_sai_thrift.switch_sai_rpc
Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
2022-09-17 13:33:53 +08:00
..
docker-base Add a config variable to override default container registry instead of dockerhub. (#10166) 2022-03-14 18:09:20 +08:00
docker-base-bullseye Add python-is-python3 package for bullseye base docker (#11895) 2022-09-01 08:13:24 +08:00
docker-base-buster Ported Marvell armhf build on amd64 host for debian buster to use cross-comp… (#8035) 2022-07-21 14:15:16 -07:00
docker-base-stretch Add a config variable to override default container registry instead of dockerhub. (#10166) 2022-03-14 18:09:20 +08:00
docker-basic_router [supervisord]: use abspath as supervisord entrypoint (#5995) 2020-11-22 21:18:44 -08:00
docker-config-engine Parallel building of sonic dockers using native dockerd(dood). (#10352) 2022-04-28 08:39:37 +08:00
docker-config-engine-bullseye Parallel building of sonic dockers using native dockerd(dood). (#10352) 2022-04-28 08:39:37 +08:00
docker-config-engine-buster Parallel building of sonic dockers using native dockerd(dood). (#10352) 2022-04-28 08:39:37 +08:00
docker-config-engine-stretch Parallel building of sonic dockers using native dockerd(dood). (#10352) 2022-04-28 08:39:37 +08:00
docker-database Fix docker database flush_unused_database failed issue (#11600) 2022-08-03 10:18:00 +08:00
docker-dhcp-relay [dhcp_relay] Add "vlan missing ip helper" dhcp relay unittest (#10654) 2022-06-04 11:37:04 -07:00
docker-eventd Streaming structured events implementation (#11848) 2022-09-03 07:33:25 -07:00
docker-fpm-frr Fix PR build failure (#11973) 2022-09-06 15:13:05 -07:00
docker-fpm-gobgp Parallel building of sonic dockers using native dockerd(dood). (#10352) 2022-04-28 08:39:37 +08:00
docker-iccpd Parallel building of sonic dockers using native dockerd(dood). (#10352) 2022-04-28 08:39:37 +08:00
docker-lldp Upgrade LLDP docker to Bullseye (#11628) 2022-08-09 17:05:36 -07:00
docker-macsec [macsec]: Add MACsec clear CLI support (#11731) 2022-09-07 08:16:23 +08:00
docker-mux [master][sonic-linkmgrd] submodule updates (#10763) 2022-05-06 13:42:23 -07:00
docker-nat Parallel building of sonic dockers using native dockerd(dood). (#10352) 2022-04-28 08:39:37 +08:00
docker-orchagent [swss]: Run tunnel_pkt_handler on dualtor only (#11627) 2022-08-09 16:19:59 -07:00
docker-pde PDE migration to bullseye (#10836) 2022-07-13 11:58:47 -07:00
docker-platform-monitor Add ping package to pmon docker (#11550) 2022-08-03 10:04:37 -07:00
docker-ptf Enable system-site-packages for ptf docker and install thrift for test_qos_sai (#12094) 2022-09-17 13:33:53 +08:00
docker-ptf-sai Parallel building of sonic dockers using native dockerd(dood). (#10352) 2022-04-28 08:39:37 +08:00
docker-router-advertiser Fix radv.conf traceback when VLAN_INTERFACE is not defined (#12034) 2022-09-09 12:54:05 -07:00
docker-sflow Replace swsssdk with swsscommon (#11215) 2022-07-11 10:01:10 +08:00
docker-snmp Upgrade snmp docker to Bullseye (#11741) 2022-08-19 11:20:17 -07:00
docker-sonic-mgmt Revert PR#11831 (#12035) "Upgrade docker-sonic-mgmt base image from Ubuntu18.04 to 20.04" 2022-09-09 22:18:13 +08:00
docker-sonic-mgmt-framework Parallel building of sonic dockers using native dockerd(dood). (#10352) 2022-04-28 08:39:37 +08:00
docker-sonic-p4rt Update p4rt configuration to match SONiC upstream schema. (#10725) 2022-08-04 14:56:48 -07:00
docker-sonic-restapi Parallel building of sonic dockers using native dockerd(dood). (#10352) 2022-04-28 08:39:37 +08:00
docker-sonic-sdk Parallel building of sonic dockers using native dockerd(dood). (#10352) 2022-04-28 08:39:37 +08:00
docker-sonic-sdk-buildenv Parallel building of sonic dockers using native dockerd(dood). (#10352) 2022-04-28 08:39:37 +08:00
docker-sonic-telemetry Parallel building of sonic dockers using native dockerd(dood). (#10352) 2022-04-28 08:39:37 +08:00
docker-swss-layer-bullseye Add ping to swss-layer docker (#11093) 2022-06-10 07:40:37 -07:00
docker-swss-layer-buster Add ping to swss-layer docker (#11093) 2022-06-10 07:40:37 -07:00
docker-teamd [teamd]: Upgrade teamd docker to Bullseye (#11536) 2022-07-27 18:21:22 -07:00
dockerfile-macros.j2 [sonic-config-engine] Clean up dependencies, pin versions; install Python 3 package in Buster container (#5656) 2020-10-26 13:48:50 -07:00