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

DTT2 - Unclassified debug log is present in the logs: [DEBUG] SPNEGO._GSS #5277

Open
pro-akim opened this issue Apr 19, 2024 · 2 comments
Open
Labels

Comments

@pro-akim
Copy link
Member

The [DEBUG] SPNEGO._GSS log is present

[2024-04-19 15:38:17,396] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi'
[2024-04-19 15:38:17,396] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi'

in the following context

[2024-04-19 15:37:36,558] [WARNING] [98869] [ThreadPoolExecutor-1_0] [workflow_engine]: [allocate-manager-linux-ubuntu-22.04-amd64] Skipping task due to dependency failure.
[2024-04-19 15:38:16,987] [INFO] [99186] [MainThread] [workflow_engine]: Executing DAG tasks.
[2024-04-19 15:38:16,987] [INFO] [99186] [MainThread] [workflow_engine]: Executing tasks in parallel.
[2024-04-19 15:38:16,988] [INFO] [99186] [ThreadPoolExecutor-0_0] [workflow_engine]: [allocate-manager-linux-ubuntu-22.04-amd64] Starting task.
[2024-04-19 15:38:17,396] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi'
[2024-04-19 15:38:17,396] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi'
[2024-04-19 15:38:17,490] [INFO] ALLOCATOR: Creating instance at /tmp/wazuh-qa
[2024-04-19 15:38:17,605] [DEBUG] ALLOCATOR: No config provided. Generating from payload
[2024-04-19 15:38:17,605] [DEBUG] ALLOCATOR: Using provided key pair
[2024-04-19 15:38:18,217] [DEBUG] ALLOCATOR: Creating temp directory: /tmp/wazuh-qa/AWS-54E18266-FA1C-4B9C-ABA1-A1302793A445
[2024-04-19 15:38:36,121] [DEBUG] ALLOCATOR: Renaming temp /tmp/wazuh-qa/AWS-54E18266-FA1C-4B9C-ABA1-A1302793A445 directory to /tmp/wazuh-qa/i-049c5136985c87616
[2024-04-19 15:38:36,132] [INFO] ALLOCATOR: Instance i-049c5136985c87616 created.
[2024-04-19 15:38:37,390] [INFO] ALLOCATOR: Instance i-049c5136985c87616 started.
[2024-04-19 15:38:37,590] [INFO] ALLOCATOR: Inventory file generated at /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml

An analysis of its occurrence must be carried out and define whether it should disappear, modify its name/label or take action to correct what it reports.

@mhamra
Copy link
Member

mhamra commented Apr 19, 2024

UPDATE

  • I've reproduced the issue by running this workflow file
version: 0.1
description: This workflow is used to test agents' deployment for DDT1 PoC
variables:
  agent-os:
    - linux-ubuntu-18.04-amd64
    - linux-ubuntu-20.04-amd64
    - linux-ubuntu-22.04-amd64
    - linux-debian-10-amd64
    - linux-debian-11-amd64
    - linux-debian-12-amd64
    - linux-oracle-9-amd64
    - linux-centos-7-amd64
    - linux-centos-8-amd64
    - linux-redhat-7-amd64
    - linux-redhat-8-amd64
    - linux-redhat-9-amd64
    - linux-amazon-2-amd64
  manager-os: linux-ubuntu-22.04-amd64
  infra-provider: aws
  working-dir: /tmp/dtt1-poc

tasks:
  # Unique manager allocate task
  - task: "allocate-manager-{manager-os}"
    description: "Allocate resources for the manager."
    do:
      this: process
      with:
        path: python3
        args:
          - modules/allocation/main.py
          - action: create
          - provider: "{infra-provider}"
          - size: large
          - composite-name: "{manager-os}"
          - inventory-output: "{working-dir}/manager-{manager-os}/inventory.yaml"
          - track-output: "{working-dir}/manager-{manager-os}/track.yaml"
          - label-termination-date: "1d"
          - label-team: "qa"
    on-error: "abort-all"
    cleanup:
      this: process
      with:
        path: python3
        args:
          - modules/allocation/main.py
          - action: delete
          - track-output: "{working-dir}/manager-{manager-os}/track.yaml"

  # Unique agent allocate task
  - task: "allocate-agent-{agent}"
    description: "Allocate resources for the agent."
    do:
      this: process
      with:
        path: python3
        args:
          - modules/allocation/main.py
          - action: create
          - provider: "{infra-provider}"
          - size: small
          - composite-name: "{agent}"
          - inventory-output: "{working-dir}/agent-{agent}/inventory.yaml"
          - track-output: "{working-dir}/agent-{agent}/track.yaml"
          - label-termination-date: "1d"
          - label-team: "qa"
    on-error: "abort-all"
    foreach:
      - variable: agent-os
        as: agent
    cleanup:
      this: process
      with:
        path: python3
        args:
          - modules/allocation/main.py
          - action: delete
          - track-output: "{working-dir}/agent-{agent}/track.yaml"
    depends-on:
      - "provision-manager-{manager-os}"

  # Unique manager provision task
  - task: "provision-manager-{manager-os}"
    description: "Provision the manager."
    do:
      this: process
      with:
        path: python3
        args:
          - modules/provision/main.py
          - inventory: "{working-dir}/manager-{manager-os}/inventory.yaml"
          - install:
            - component: wazuh-manager
              type: assistant
              version: 4.7.3
              live: True
    depends-on:
      - "allocate-manager-{manager-os}"
    on-error: "abort-all"

  # Generic agent test task
  - task: "run-agent-{agent}-tests"
    description: "Run tests install for the agent {agent}."
    do:
      this: process
      with:
        path: python3
        args:
          - modules/testing/main.py
          - targets:
            - wazuh-1: "{working-dir}/manager-{manager-os}/inventory.yaml"
            - agent: "{working-dir}/agent-{agent}/inventory.yaml"
          - tests: "install,registration,restart,stop,uninstall"
          - component: "agent"
          - wazuh-version: "4.7.3"
          - wazuh-revision: "40714"
          - live: "True"
    foreach:
      - variable: agent-os
        as: agent
    depends-on:
      - "allocate-agent-{agent}"


I've obtained the following workflow.log file workflow-pthreads-12-with-gssapi-error.log

  • The gssapi is an optional dependency of the paramiko package. See this link.

I've installed the gssapi package with this commands:

sudo apt install libkrb5-dev
pip install gssapi krb5


/wazuh/wazuh-qa/deployability$ pip show gssapi
Name: gssapi
Version: 1.8.3
Summary: Python GSSAPI Wrapper
Home-page: https://github.com/pythongssapi/python-gssapi
Author: The Python GSSAPI Team
Author-email: jborean93@gmail.com
License: LICENSE.txt
Location: /home/marcelo/.pyenv/versions/dtt-test/lib/python3.10/site-packages
Requires: decorator
Required-by: 
(dtt-test) marcelo@marcelo-B460-AORUS-PRO-AC:~/wazuh/wazuh-qa/deployability$ pip show paramiko gssapi krb5
Name: paramiko
Version: 3.4.0
Summary: SSH2 protocol library
Home-page: https://paramiko.org
Author: Jeff Forcier
Author-email: jeff@bitprophet.org
License: LGPL
Location: /home/marcelo/.pyenv/versions/dtt-test/lib/python3.10/site-packages
Requires: bcrypt, cryptography, pynacl
Required-by: 
---
Name: gssapi
Version: 1.8.3
Summary: Python GSSAPI Wrapper
Home-page: https://github.com/pythongssapi/python-gssapi
Author: The Python GSSAPI Team
Author-email: jborean93@gmail.com
License: LICENSE.txt
Location: /home/marcelo/.pyenv/versions/dtt-test/lib/python3.10/site-packages
Requires: decorator
Required-by: 
---
Name: krb5
Version: 0.5.1
Summary: Kerberos API bindings for Python
Home-page: https://github.com/jborean93/pykrb5
Author: Jordan Borean
Author-email: jborean93@gmail.com
License: MIT
Location: /home/marcelo/.pyenv/versions/dtt-test/lib/python3.10/site-packages
Requires: I obtained the following workflow.log file 
[workflow-pthreads-12-with-gssapi-error.log](https://github.com/wazuh/wazuh-qa/files/15044539/workflow-pthreads-12-with-gssapi-error.log)
Required-by: 

  • I've rerun the same workflow file after installing the gssapi package, and the messages disappeared from the log: workflow.log

@rauldpm
Copy link
Member

rauldpm commented Apr 22, 2024

As it is an optional dependency and does not affect the DTT1 directly, we will address this issue in DTT2

@rauldpm rauldpm changed the title DTT1 - Unclassified debug log is present in the logs: [DEBUG] SPNEGO._GSS DTT2 - Unclassified debug log is present in the logs: [DEBUG] SPNEGO._GSS Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants