在kubernetes上用helm图表安装locust会进入CrashLoopBackOff

问题描述 投票:0回答:1

我正在使用 helm Chart 在 kubernetes 上设置 [电子邮件受保护]。 在启动 locust 图像时,我收到此错误,并且容器进入 CrashLoopBackOff。有什么解决办法吗?

locust-master-5bffc94676-6nd4q locust Installing collected packages: pysha3, pylru, ethereum-utils, ethereum-tester, ethereum-abi-utils, bitarray, toolz, pycryptodome, parsimonious, hexbytes, eth-typing, eth-hash, cytoolz, eth-utils, rlp, eth-keys, eth-abi, web3, eth-rlp, eth-keyfile, eth_account
locust-master-5bffc94676-6nd4q locust   Running setup.py install for pysha3: started
locust-master-5bffc94676-6nd4q locust   Running setup.py install for pysha3: finished with status 'error'
locust-master-5bffc94676-6nd4q locust   error: subprocess-exited-with-error
locust-master-5bffc94676-6nd4q locust
locust-master-5bffc94676-6nd4q locust   × Running setup.py install for pysha3 did not run successfully.
locust-master-5bffc94676-6nd4q locust   │ exit code: 1
locust-master-5bffc94676-6nd4q locust   ╰─> [15 lines of output]
locust-master-5bffc94676-6nd4q locust       running install
locust-master-5bffc94676-6nd4q locust       /opt/venv/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
locust-master-5bffc94676-6nd4q locust         warnings.warn(
locust-master-5bffc94676-6nd4q locust       running build
locust-master-5bffc94676-6nd4q locust       running build_py
locust-master-5bffc94676-6nd4q locust       creating build
locust-master-5bffc94676-6nd4q locust       creating build/lib.linux-x86_64-cpython-310
locust-master-5bffc94676-6nd4q locust       copying sha3.py -> build/lib.linux-x86_64-cpython-310
locust-master-5bffc94676-6nd4q locust       running build_ext
locust-master-5bffc94676-6nd4q locust       building '_pysha3' extension
locust-master-5bffc94676-6nd4q locust       creating build/temp.linux-x86_64-cpython-310
locust-master-5bffc94676-6nd4q locust       creating build/temp.linux-x86_64-cpython-310/Modules
locust-master-5bffc94676-6nd4q locust       creating build/temp.linux-x86_64-cpython-310/Modules/_sha3
locust-master-5bffc94676-6nd4q locust       gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_WITH_KECCAK=1 -I/opt/venv/include -I/usr/local/include/python3.10 -c Modules/_sha3/sha3module.c -o build/temp.linux-x86_64-cpython-310/Modules/_sha3/sha3module.o
locust-master-5bffc94676-6nd4q locust       error: command 'gcc' failed: No such file or directory
locust-master-5bffc94676-6nd4q locust       [end of output]
locust-master-5bffc94676-6nd4q locust
locust-master-5bffc94676-6nd4q locust   note: This error originates from a subprocess, and is likely not a problem with pip.
locust-master-5bffc94676-6nd4q locust error: legacy-install-failure

[更新]这是我使用的values.yaml 文件。 安装下面列出的 pip 包时出现错误。

image:
  repository: locustio/locust
  tag: 2.12.1
  pullPolicy: IfNotPresent

loadtest:
  locust_host: http://quorum-node-dev-tx-1.svc.cluster.local
  locust_locustfile_configmap: locustfile
  pip_packages:
  - eth_account
  - web3

master:
  resources:
    limits:
      cpu: 2000m
      memory: 1024Mi
    requests:
      cpu: 1000m
      memory: 1024Mi
  logLevel: INFO

worker:
  replicas: 1
  resources:
    limits:
      cpu: 500m
      memory: 256Mi
    requests:
      cpu: 500m
      memory: 256Mi
  logLevel: INFO
kubernetes kubernetes-helm locust
1个回答
2
投票

Locust在我更改了values.yaml的pip包的顺序后最终安装成功了。

  • 来自
pip_packages:
  - eth_account
  - web3
pip_packages:
  - eth_account
  - web3

我真的不知道为什么问题得到了解决,但可能与与相关的库依赖问题有关 https://github.com/ethereum/web3.py/issues/2396

谢谢。

© www.soinside.com 2019 - 2024. All rights reserved.