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

SONiC-VPP VM image build is failing. #28

Closed
nikunjdh opened this issue May 8, 2023 · 2 comments
Closed

SONiC-VPP VM image build is failing. #28

nikunjdh opened this issue May 8, 2023 · 2 comments
Assignees

Comments

@nikunjdh
Copy link
Contributor

nikunjdh commented May 8, 2023

According to Shashi - The build error is caused by docker/docker-py#3116

Failure details:

See http://10.64.98.183:8080/job/SONiC-VPP-Build-VM-Image/45/display/redirect

Changes:


[...truncated 448.25 KB...]
{
"version": "1.0.0",
"package": {
"version": "1.0.0",
"depends": [],
"name": "gbsyncd"
},
"service": {
"name": "gbsyncd",
"requires": [],
"after": [],
"before": [],
"dependent-of": [],
"asic-service": true,
"host-service": false,
"warm-shutdown": {
"after": [],
"before": []
},
"fast-shutdown": {
"after": [],
"before": []
},
"syslog": {
"support-rate-limit": true
}
},
"container": {
"privileged": false,
"volumes": [],
"tmpfs": []
},
"cli": {
"config": "",
"show": "",
"clear": ""
}
}

  • SONIC_PACKAGE_MANAGER_FOLDER=/var/lib/sonic-package-manager/
  • sudo mkdir -p ./fsroot-vpp//var/lib/sonic-package-manager/
  • target_machine=vpp
  • j2 files/build_templates/packages.json.j2
  • sudo tee ./fsroot-vpp//var/lib/sonic-package-manager//packages.json
    {
    "database": {
    "repository": "docker-database",
    "description": "SONiC database package",
    "default-reference": "1.0.0",
    "installed-version": "1.0.0",
    "built-in": true,
    "installed": true
    },
    "eventd": {
    "repository": "docker-eventd",
    "description": "SONiC eventd package",
    "default-reference": "1.0.0",
    "installed-version": "1.0.0",
    "built-in": true,
    "installed": true
    },
    "fpm-frr": {
    "repository": "docker-fpm-frr",
    "description": "SONiC fpm-frr package",
    "default-reference": "1.0.0",
    "installed-version": "1.0.0",
    "built-in": true,
    "installed": true
    },
    "lldp": {
    "repository": "docker-lldp",
    "description": "SONiC lldp package",
    "default-reference": "1.0.0",
    "installed-version": "1.0.0",
    "built-in": true,
    "installed": true
    },
    "mux": {
    "repository": "docker-mux",
    "description": "SONiC mux package",
    "default-reference": "1.0.0",
    "installed-version": "1.0.0",
    "built-in": true,
    "installed": true
    },
    "nat": {
    "repository": "docker-nat",
    "description": "SONiC nat package",
    "default-reference": "1.0.0",
    "installed-version": "1.0.0",
    "built-in": true,
    "installed": true
    },
    "swss": {
    "repository": "docker-orchagent",
    "description": "SONiC swss package",
    "default-reference": "1.0.0",
    "installed-version": "1.0.0",
    "built-in": true,
    "installed": true
    },
    "p4rt": {
    "repository": "docker-sonic-p4rt",
    "description": "SONiC p4rt package",
    "default-reference": "1.0.0",
    "installed-version": "1.0.0",
    "built-in": true,
    "installed": true
    },
    "pmon": {
    "repository": "docker-platform-monitor",
    "description": "SONiC pmon package",
    "default-reference": "1.0.0",
    "installed-version": "1.0.0",
    "built-in": true,
    "installed": true
    },
    "radv": {
    "repository": "docker-router-advertiser",
    "description": "SONiC radv package",
    "default-reference": "1.0.0",
    "installed-version": "1.0.0",
    "built-in": true,
    "installed": true
    },
    "sflow": {
    "repository": "docker-sflow",
    "description": "SONiC sflow package",
    "default-reference": "1.0.0",
    "installed-version": "1.0.0",
    "built-in": true,
    "installed": true
    },
    "snmp": {
    "repository": "docker-snmp",
    "description": "SONiC snmp package",
    "default-reference": "1.0.0",
    "installed-version": "1.0.0",
    "built-in": true,
    "installed": true
    },
    "mgmt-framework": {
    "repository": "docker-sonic-mgmt-framework",
    "description": "SONiC mgmt-framework package",
    "default-reference": "1.0.0",
    "installed-version": "1.0.0",
    "built-in": true,
    "installed": true
    },
    "teamd": {
    "repository": "docker-teamd",
    "description": "SONiC teamd package",
    "default-reference": "1.0.0",
    "installed-version": "1.0.0",
    "built-in": true,
    "installed": true
    },
    "telemetry": {
    "repository": "docker-sonic-telemetry",
    "description": "SONiC telemetry package",
    "default-reference": "1.0.0",
    "installed-version": "1.0.0",
    "built-in": true,
    "installed": true
    },
    "syncd": {
    "repository": "docker-syncd-vpp",
    "description": "SONiC syncd package",
    "default-reference": "1.0.0",
    "installed-version": "1.0.0",
    "built-in": true,
    "installed": true
    },
    "gbsyncd": {
    "repository": "docker-gbsyncd-vpp",
    "description": "SONiC gbsyncd package",
    "default-reference": "1.0.0",
    "installed-version": "1.0.0",
    "built-in": true,
    "installed": true
    }

}

  • '[' 0 '!=' 0 ']'
  • sudo cp files/build_templates/docker_image_ctl.j2 ./fsroot-vpp/usr/share/sonic/templates/docker_image_ctl.j2
  • sudo LANG=C DOCKER_HOST= chroot ./fsroot-vpp /usr/local/bin/generate_shutdown_order.py
    Traceback (most recent call last):
    File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 214, in _retrieve_server_version
    return self.version(api_version=False)["ApiVersion"]
    File "/usr/local/lib/python3.9/dist-packages/docker/api/daemon.py", line 181, in version
    return self._result(self._get(url), json=True)
    File "/usr/local/lib/python3.9/dist-packages/docker/utils/decorators.py", line 46, in inner
    return f(self, *args, **kwargs)
    File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 237, in _get
    return self.get(url, **self._set_request_timeout(kwargs))
    File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 600, in get
    return self.request("GET", url, **kwargs)
    File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
    File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
    File "/usr/local/lib/python3.9/dist-packages/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
    File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 790, in urlopen
    response = self._make_request(
    File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 496, in _make_request
    conn.request(
    TypeError: request() got an unexpected keyword argument 'chunked'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/bin/generate_shutdown_order.py", line 15, in
main()
File "/usr/local/bin/generate_shutdown_order.py", line 8, in main
manager = PackageManager.get_manager()
File "/usr/local/lib/python3.9/dist-packages/sonic_package_manager/manager.py", line 1003, in get_manager
docker_api = DockerApi(docker.from_env(), ProgressManager())
File "/usr/local/lib/python3.9/dist-packages/docker/client.py", line 96, in from_env
return cls(
File "/usr/local/lib/python3.9/dist-packages/docker/client.py", line 45, in init
self.api = APIClient(*args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 197, in init
self._version = self._retrieve_server_version()
File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 221, in _retrieve_server_version
raise DockerException(
docker.errors.DockerException: Error while fetching server API version: request() got an unexpected keyword argument 'chunked'

  • clean_sys
  • sudo chroot ./fsroot-vpp umount /sys/fs/cgroup/blkio /sys/fs/cgroup/cpu /sys/fs/cgroup/cpu,cpuacct /sys/fs/cgroup/cpuacct /sys/fs/cgroup/cpuset /sys/fs/cgroup/devices /sys/fs/cgroup/freezer /sys/fs/cgroup/hugetlb /sys/fs/cgroup/memory /sys/fs/cgroup/misc /sys/fs/cgroup/net_cls /sys/fs/cgroup/net_cls,net_prio /sys/fs/cgroup/net_prio /sys/fs/cgroup/perf_event /sys/fs/cgroup/pids /sys/fs/cgroup/rdma /sys/fs/cgroup/systemd /sys/fs/cgroup /sys
    umount: /sys/fs/cgroup/cpu: no mount point specified.
    umount: /sys/fs/cgroup/cpu,cpuacct: no mount point specified.
    umount: /sys/fs/cgroup/cpuacct: no mount point specified.
    umount: /sys/fs/cgroup/net_cls: no mount point specified.
    umount: /sys/fs/cgroup/net_cls,net_prio: no mount point specified.
    umount: /sys/fs/cgroup/net_prio: no mount point specified.
    umount: /sys/fs/cgroup/systemd: no mount point specified.
  • true
  • true
  • sudo LANG=C chroot ./fsroot-vpp umount /proc
  • true
    [ FAIL LOG END ] [ target/sonic-vpp.img.gz ]
    make: *** [slave.mk:1250: target/sonic-vpp.img.gz] Error 1
    make[2]: *** [Makefile.work:598: target/sonic-vpp.img.gz] Error 2
    make[2]: Leaving directory 'http://10.64.98.183:8080/job/SONiC-VPP-Build-VM-Image/ws/build/sonic-buildimage'
    make[1]: *** [Makefile:41: target/sonic-vpp.img.gz] Error 2
    make[1]: Leaving directory 'http://10.64.98.183:8080/job/SONiC-VPP-Build-VM-Image/ws/build/sonic-buildimage'
    make: *** [Makefile:39: build/sonic-buildimage/target/sonic-vpp.img.gz] Error 2
    Build step 'Execute shell' marked build as failure
@patilshashidhar
Copy link
Contributor

As part of docker==5.0.3 py3 package installation urllib3==2.0.2 got installed . urllib3==2.0.2 is incompatible with
docker==4.0.3 and requests packages.

  • sudo https_proxy=http://proxy-wsa.esl.cisco.com:80 LANG=C chroot ./fsroot-vpp pip3 install docker==5.0.3
    Collecting docker==5.0.3
    Downloading docker-5.0.3-py2.py3-none-any.whl (146 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 146.2/146.2 kB 18.0 MB/s eta 0:00:00
    Collecting websocket-client>=0.32.0 (from docker==5.0.3)
    Downloading websocket_client-1.5.1-py3-none-any.whl (55 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 55.9/55.9 kB 27.0 MB/s eta 0:00:00
    Collecting requests!=2.18.0,>=2.14.2 (from docker==5.0.3)
    Downloading requests-2.30.0-py3-none-any.whl (62 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.5/62.5 kB 25.2 MB/s eta 0:00:00
    Collecting charset-normalizer<4,>=2 (from requests!=2.18.0,>=2.14.2->docker==5.0.3)
    Downloading charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (199 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 199.2/199.2 kB 45.4 MB/s eta 0:00:00
    Collecting idna<4,>=2.5 (from requests!=2.18.0,>=2.14.2->docker==5.0.3)
    Downloading idna-3.4-py3-none-any.whl (61 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.5/61.5 kB 31.1 MB/s eta 0:00:00
    Collecting urllib3<3,>=1.21.1 (from requests!=2.18.0,>=2.14.2->docker==5.0.3)
    Downloading urllib3-2.0.2-py3-none-any.whl (123 kB)

@patilshashidhar
Copy link
Contributor

The fix is to either install the older urllib3 which is compatible with docker=5.0.3 OR
upgrade both docker and urllib3 python packages as required by docker/docker-py#3116.

Taking the former approach for now.

patilshashidhar added a commit to patilshashidhar/sonic-platform-vpp that referenced this issue May 9, 2023
The build breaks with failure of script generate_shutdown_order.py which queries
docker to fetch packages. The incompatility between docker python API and urllib3
causes docker connection failure. Fix is to install the compatible urllib3 py package.

Signed-off-by: Shashidhar Patil <shashidhar.patil@gmail.com>
patilshashidhar added a commit that referenced this issue May 9, 2023
Issue #28 : SONiC-VPP VM image build is failing.
@patilshashidhar patilshashidhar self-assigned this May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants