sonic-buildimage/dockers
Zhaohui Sun 21b2361027 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-10-03 19:00:22 +00: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 Support SONiC OpenSSL FIPS 140-3 based on SymCrypt engine (#9573) 2022-05-06 07:21:30 +08:00
docker-base-buster Image disk space reduction (#10172) 2022-03-15 18:12:49 -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 Revert "Fix docker database flush_unused_database failed issue (#11600) (#11677)" (#12084) 2022-09-15 14:19:56 -07:00
docker-dhcp-relay [dhcp_relay] Add "vlan missing ip helper" dhcp relay unittest (#10654) 2022-09-09 20:53:02 +00:00
docker-fpm-frr Bullseye frr (#11777) 2022-08-27 16:16:17 +00: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-11 16:19:46 +00:00
docker-macsec [macsec]: Add MACsec clear CLI support (#11731) 2022-09-08 15:47:49 +00: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-11 16:19:37 +00:00
docker-pde PDE migration to bullseye (#10836) 2022-08-11 23:14:10 +00:00
docker-platform-monitor Add ping package to pmon docker (#11550) 2022-08-08 20:44:06 +00:00
docker-ptf Enable system-site-packages for ptf docker and install thrift for test_qos_sai (#12094) 2022-10-03 19:00:22 +00: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-21 21:18:45 +00:00
docker-sflow Parallel building of sonic dockers using native dockerd(dood). (#10352) 2022-04-28 08:39:37 +08:00
docker-snmp Upgrade snmp docker to Bullseye (#11741) (#11942) 2022-09-02 18:51:34 -07:00
docker-sonic-mgmt Add scapy support for python3 virtual environment in the sonic-mgmt docker container (#10234) 2022-03-16 12:00:51 +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 Parallel building of sonic dockers using native dockerd(dood). (#10352) 2022-04-28 08:39:37 +08: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 14:48:14 +00:00
docker-swss-layer-buster Add ping to swss-layer docker (#11093) 2022-06-10 14:48:14 +00:00
docker-teamd [teamd]: Upgrade teamd docker to Bullseye (#11536) 2022-08-08 20:43:33 +00: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