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

Linux WPK package error: No module named 'botocore.httpchecksum #2668

Closed
Rebits opened this issue Dec 7, 2023 · 3 comments · Fixed by #2669
Closed

Linux WPK package error: No module named 'botocore.httpchecksum #2668

Rebits opened this issue Dec 7, 2023 · 3 comments · Fixed by #2669
Assignees
Labels
level/task Subtask issue type/bug Bug issue

Comments

@Rebits
Copy link
Member

Rebits commented Dec 7, 2023

Wazuh version Install type Action performed Platform
4.8.0 WPK Linux

Description

WPK package generation fails due to AWS seems to be broken in the docker container:

    from s3transfer.copies import CopySubmissionTask
  File "/usr/local/lib/python3.7/site-packages/s3transfer/copies.py", line 16, in <module>
    from s3transfer.tasks import (
  File "/usr/local/lib/python3.7/site-packages/s3transfer/tasks.py", line 16, in <module>
    from s3transfer.utils import get_callbacks
  File "/usr/local/lib/python3.7/site-packages/s3transfer/utils.py", line 25, in <module>
    from botocore.httpchecksum import AwsChunkedWrapper
ModuleNotFoundError: No module named 'botocore.httpchecksum'

This seems to be related with the installation of a specific botocore dependency

RUN pip3 install --upgrade botocore==1.20.54

It is necessary to upgrade botocore in order to allow WPK Linux package

@Rebits Rebits added level/task Subtask issue type/bug Bug issue labels Dec 7, 2023
@Rebits Rebits self-assigned this Dec 7, 2023
@Rebits
Copy link
Member Author

Rebits commented Dec 7, 2023

Upgrading botocore seems to solve the issue:

[root@b277d563fe08 /]# pip3 install --upgrade botocore==1.33.9
Collecting botocore==1.33.9
  Using cached botocore-1.33.9-py3-none-any.whl (11.8 MB)
Requirement already satisfied: jmespath<2.0.0,>=0.7.1 in /usr/local/lib/python3.7/site-packages (from botocore==1.33.9) (0.10.0)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /usr/local/lib/python3.7/site-packages (from botocore==1.33.9) (2.8.2)
Requirement already satisfied: urllib3<1.27,>=1.25.4 in /usr/local/lib/python3.7/site-packages (from botocore==1.33.9) (1.26.18)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.7/site-packages (from python-dateutil<3.0.0,>=2.1->botocore==1.33.9) (1.16.0)
Installing collected packages: botocore
  Attempting uninstall: botocore
    Found existing installation: botocore 1.20.54
    Uninstalling botocore-1.20.54:
      Successfully uninstalled botocore-1.20.54
Successfully installed botocore-1.33.9
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 22.0.4; however, version 23.3.1 is available.
You should consider upgrading via the '/usr/local/bin/python3.7 -m pip install --upgrade pip' command.
[root@b277d563fe08 /]# aws
Note: AWS CLI version 2, the latest major version of the AWS CLI, is now stable and recommended for general use. For more information, see the AWS CLI version 2 installation instructions at: https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html

usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: the following arguments are required: command
[root@b277d563fe08 /]# 

ECSTasks and containers were already upgraded

@Rebits Rebits linked a pull request Dec 7, 2023 that will close this issue
@wazuhci wazuhci moved this to In progress in Release 4.8.0 Dec 7, 2023
@wazuhci wazuhci moved this from In progress to Pending review in Release 4.8.0 Dec 7, 2023
@fcaffieri
Copy link
Member

LGTM

@wazuhci wazuhci moved this from Pending review to Pending final review in Release 4.8.0 Dec 7, 2023
@davidjiglesias
Copy link
Member

LGTM!

@wazuhci wazuhci moved this from Pending final review to Done in Release 4.8.0 Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Subtask issue type/bug Bug issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants