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

Can't inspect python packages for execution environment without warning #1867

Open
IPvSean opened this issue Oct 31, 2024 · 5 comments
Open
Labels
bug Researched, reproducible, committed to fix

Comments

@IPvSean
Copy link
Collaborator

IPvSean commented Oct 31, 2024

ISSUE TYPE
  • Bug Report
SUMMARY

I grab my ee:

podman pull quay.io/acme_corp/workshop_ee:bb2de800f0aa36bd76141ea9f81ee10bf32007e5

i go to images, then to python packages then I get this error->

image

ANSIBLE-NAVIGATOR VERSION
➜  ~ ansible-navigator --version
ansible-navigator 24.9.0
CONFIGURATION
LOG FILE
2024-08-14T15:01:12.187827+00:00 ERROR 'ansible_navigator.actions.collections._parse' /Users/sean/Library/Python/3.11/lib/python/site-packages/ansible_collections/community/aws/plugins/modules/waf_web_acl.py ScannerError (get
3086│  in "<unicode string>", line 2, column 30:
3087│        community.aws.waf_web_acl:
3088│                                 ^
3089│2024-08-14T15:01:12.187837+00:00 ERROR 'ansible_navigator.actions.collections._parse' /Users/sean/Library/Python/3.11/lib/python/site-packages/ansible_collections/community/aws/plugins/modules/waf_rule.py ScannerError (get_do
3090│  in "<unicode string>", line 2, column 27:
3091│        community.aws.waf_rule:
3092│                              ^
3093│2024-08-14T15:01:12.187848+00:00 ERROR 'ansible_navigator.actions.collections._parse' /Users/sean/Library/Python/3.11/lib/python/site-packages/ansible_collections/community/aws/plugins/modules/waf_condition.py ScannerError (g
3094│  in "<unicode string>", line 2, column 32:
3095│        community.aws.waf_condition:
3096│                                   ^
3097│2024-08-14T15:01:12.187859+00:00 ERROR 'ansible_navigator.actions.collections._parse' /Users/sean/Library/Python/3.11/lib/python/site-packages/ansible_collections/community/sops/plugins/lookup/sops.py ScannerError (get_docstr
3098│  in "<unicode string>", line 2, column 11:
3099│        author: Edoardo Tenani (@endorama) <e. ...
3100│              ^
3101│2024-08-14T15:01:12.187871+00:00 ERROR 'ansible_navigator.actions.collections._parse' /Users/sean/Library/Python/3.11/lib/python/site-packages/ansible_collections/community/sops/plugins/vars/sops.py ScannerError (get_docstrin
3102│  in "<unicode string>", line 2, column 11:
3103│        author: Edoardo Tenani (@endorama) <e. ...
3104│              ^
3105│2024-08-14T15:01:12.187882+00:00 ERROR 'ansible_navigator.actions.collections._parse' /Users/sean/Library/Python/3.11/lib/python/site-packages/ansible_collections/community/dns/plugins/filter/get_registrable_domain.yml Syntax
3106│2024-08-14T15:01:12.187895+00:00 ERROR 'ansible_navigator.actions.collections._parse' /Users/sean/Library/Python/3.11/lib/python/site-packages/ansible_collections/community/dns/plugins/filter/remove_public_suffix.yml SyntaxEr
3107│2024-08-14T15:01:12.187906+00:00 ERROR 'ansible_navigator.actions.collections._parse' /Users/sean/Library/Python/3.11/lib/python/site-packages/ansible_collections/community/dns/plugins/filter/get_public_suffix.yml SyntaxError
3108│2024-08-14T15:01:12.187917+00:00 ERROR 'ansible_navigator.actions.collections._parse' /Users/sean/Library/Python/3.11/lib/python/site-packages/ansible_collections/community/dns/plugins/filter/remove_registrable_domain.yml Syn
3109│2024-10-31T14:33:31.304279+00:00 ERROR 'ansible_navigator.actions.images._parse' Unable to extract introspection from stdout
3110│Traceback (most recent call last):
3111│  File "/usr/local/lib/python3.11/site-packages/ansible_navigator/actions/images.py", line 537, in _parse
3112│    _warnings, json_str = output.split("{", 1)
3113│    ^^^^^^^^^^^^^^^^^^^
3114│ValueError: not enough values to unpack (expected 2, got 1)
3115│2024-10-31T14:33:31.307972+00:00 ERROR 'ansible_navigator.actions.images._parse' Image introspection failed (parsed), the return value was: Traceback (most recent call last):
3116│  File "/Users/sean/.cache/ansible-navigator/image_introspect.py", line 16, in <module>
3117│    from typing import TypeAlias
3118│ImportError: cannot import name 'TypeAlias' from 'typing' (/usr/lib64/python3.9/typing.py)
3119│Traceback (most recent call last):
3120│  File "/usr/local/lib/python3.11/site-packages/ansible_navigator/actions/images.py", line 537, in _parse
3121│    _warnings, json_str = output.split("{", 1)
3122│    ^^^^^^^^^^^^^^^^^^^
3123│ValueError: not enough values to unpack (expected 2, got 1)
3124│2024-10-31T14:34:18.648233+00:00 ERROR 'ansible_navigator.actions.images._parse' Unable to extract introspection from stdout
3125│Traceback (most recent call last):
3126│  File "/usr/local/lib/python3.11/site-packages/ansible_navigator/actions/images.py", line 537, in _parse
3127│    _warnings, json_str = output.split("{", 1)
3128│    ^^^^^^^^^^^^^^^^^^^
3129│ValueError: not enough values to unpack (expected 2, got 1)
3130│2024-10-31T14:34:18.651157+00:00 ERROR 'ansible_navigator.actions.images._parse' Image introspection failed (parsed), the return value was: Traceback (most recent call last):
3131│  File "/Users/sean/.cache/ansible-navigator/image_introspect.py", line 16, in <module>
3132│    from typing import TypeAlias
3133│ImportError: cannot import name 'TypeAlias' from 'typing' (/usr/lib64/python3.9/typing.py)
3134│Traceback (most recent call last):
3135│  File "/usr/local/lib/python3.11/site-packages/ansible_navigator/actions/images.py", line 537, in _parse
3136│    _warnings, json_str = output.split("{", 1)
3137│    ^^^^^^^^^^^^^^^^^^^
3138│ValueError: not enough values to unpack (expected 2, got 1)
3139│2024-10-31T14:36:39.071143+00:00 CRITICAL 'ansible_navigator.actions._actions.run_interactive' Subcommand 'select' encountered a fatal error.
3140│2024-10-31T14:36:39.073595+00:00 ERROR 'ansible_navigator.actions._actions.run_interactive' Logging an uncaught exception
3141│Traceback (most recent call last):
3142│  File "/usr/local/lib/python3.11/site-packages/ansible_navigator/actions/_actions.py", line 172, in run_interactive
3143│    return run_action(app=app, interaction=interaction)
3144│           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3145│  File "/usr/local/lib/python3.11/site-packages/ansible_navigator/actions/select.py", line 41, in run
3146│    app.steps.append(app.steps.current.select_func())  # add next
3147│                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3148│  File "/usr/local/lib/python3.11/site-packages/ansible_navigator/actions/images.py", line 330, in _build_image_content
3149│    self._images.selected["python"]["details"],
3150│    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^                                                                                                                                                                                             ▒
3151│KeyError: 'python'

more from log file

2024-08-14T15:01:12.187848+00:00 ERROR 'ansible_navigator.actions.collections._parse' /Users/sean/Library/Python/3.11/lib/python/site-packages/ansible_collections/community/aws/plugins/modules/waf_condition.py ScannerError (get_docstring): mapping values are not allowed here
  in "<unicode string>", line 2, column 32:
        community.aws.waf_condition:
                                   ^
2024-08-14T15:01:12.187859+00:00 ERROR 'ansible_navigator.actions.collections._parse' /Users/sean/Library/Python/3.11/lib/python/site-packages/ansible_collections/community/sops/plugins/lookup/sops.py ScannerError (get_docstring): mapping values are not allowed here
  in "<unicode string>", line 2, column 11:
        author: Edoardo Tenani (@endorama) <e. ...
              ^
2024-08-14T15:01:12.187871+00:00 ERROR 'ansible_navigator.actions.collections._parse' /Users/sean/Library/Python/3.11/lib/python/site-packages/ansible_collections/community/sops/plugins/vars/sops.py ScannerError (get_docstring): mapping values are not allowed here
  in "<unicode string>", line 2, column 11:
        author: Edoardo Tenani (@endorama) <e. ...
              ^
2024-08-14T15:01:12.187882+00:00 ERROR 'ansible_navigator.actions.collections._parse' /Users/sean/Library/Python/3.11/lib/python/site-packages/ansible_collections/community/dns/plugins/filter/get_registrable_domain.yml SyntaxError (get_docstring): invalid syntax (<unknown>, line 1)
2024-08-14T15:01:12.187895+00:00 ERROR 'ansible_navigator.actions.collections._parse' /Users/sean/Library/Python/3.11/lib/python/site-packages/ansible_collections/community/dns/plugins/filter/remove_public_suffix.yml SyntaxError (get_docstring): invalid syntax (<unknown>, line 1)
2024-08-14T15:01:12.187906+00:00 ERROR 'ansible_navigator.actions.collections._parse' /Users/sean/Library/Python/3.11/lib/python/site-packages/ansible_collections/community/dns/plugins/filter/get_public_suffix.yml SyntaxError (get_docstring): invalid syntax (<unknown>, line 1)
2024-08-14T15:01:12.187917+00:00 ERROR 'ansible_navigator.actions.collections._parse' /Users/sean/Library/Python/3.11/lib/python/site-packages/ansible_collections/community/dns/plugins/filter/remove_registrable_domain.yml SyntaxError (get_docstring): invalid syntax (<unknown>, line 1)
2024-10-31T14:33:31.304279+00:00 ERROR 'ansible_navigator.actions.images._parse' Unable to extract introspection from stdout
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/ansible_navigator/actions/images.py", line 537, in _parse
    _warnings, json_str = output.split("{", 1)
    ^^^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 1)
2024-10-31T14:33:31.307972+00:00 ERROR 'ansible_navigator.actions.images._parse' Image introspection failed (parsed), the return value was: Traceback (most recent call last):
  File "/Users/sean/.cache/ansible-navigator/image_introspect.py", line 16, in <module>
    from typing import TypeAlias
ImportError: cannot import name 'TypeAlias' from 'typing' (/usr/lib64/python3.9/typing.py)
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/ansible_navigator/actions/images.py", line 537, in _parse
    _warnings, json_str = output.split("{", 1)
    ^^^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 1)
2024-10-31T14:34:18.648233+00:00 ERROR 'ansible_navigator.actions.images._parse' Unable to extract introspection from stdout
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/ansible_navigator/actions/images.py", line 537, in _parse
    _warnings, json_str = output.split("{", 1)
    ^^^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 1)
2024-10-31T14:34:18.651157+00:00 ERROR 'ansible_navigator.actions.images._parse' Image introspection failed (parsed), the return value was: Traceback (most recent call last):
  File "/Users/sean/.cache/ansible-navigator/image_introspect.py", line 16, in <module>
    from typing import TypeAlias
ImportError: cannot import name 'TypeAlias' from 'typing' (/usr/lib64/python3.9/typing.py)
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/ansible_navigator/actions/images.py", line 537, in _parse
    _warnings, json_str = output.split("{", 1)
    ^^^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 1)
2024-10-31T14:36:39.071143+00:00 CRITICAL 'ansible_navigator.actions._actions.run_interactive' Subcommand 'select' encountered a fatal error.
2024-10-31T14:36:39.073595+00:00 ERROR 'ansible_navigator.actions._actions.run_interactive' Logging an uncaught exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/ansible_navigator/actions/_actions.py", line 172, in run_interactive
    return run_action(app=app, interaction=interaction)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/ansible_navigator/actions/select.py", line 41, in run
    app.steps.append(app.steps.current.select_func())  # add next
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/ansible_navigator/actions/images.py", line 330, in _build_image_content
    self._images.selected["python"]["details"],
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'python'
STEPS TO REPRODUCE

download EE and try to look at python packages

EXPECTED RESULTS

won't crash

ACTUAL RESULTS

crashes, screenshot above

ADDITIONAL INFORMATION
@IPvSean IPvSean added bug Researched, reproducible, committed to fix new New issues and PRs to triaged labels Oct 31, 2024
@onefourfive
Copy link

Also seeing this issue for inspecting Ansible information in EE

$ ansible-navigator --version
ansible-navigator 24.6.0

Steps:

  • ansible-navigator images
  • navigate to EE
  • 2 for Ansible version and collections

Results:

Same error as above:

humph. Something went really wrong while introspecting the image.
Details have been added to the log file
[HINT] Please log an issue about this one, it shouldn't have happened
2024-11-08T01:15:08.326557+00:00 DEBUG 'ansible-runner.wrap_args_for_containerization' container engine invocation: docker run --rm --tty --interactive --workdir /runner/project -v /tmp/ssh-XXXXsCx6oA/:/tmp/ssh-XXXXsCx6oA/ -e SSH_AUTH_SOCK=/tmp/ssh-XXXXsCx6oA/agent.3825924 -v /home/me/.ssh/:/home/runner/.ssh/ -v /home/me/.ssh/:/root/.ssh/ -v /tmp/ansible-navigator_njod07nu/artifacts/:/runner/artifacts/:Z -v /tmp/ansible-navigator_njod07nu/:/runner/:Z -v /home/me/.cache/ansible-navigator/:/home/me/.cache/ansible-navigator/ --env-file /tmp/ansible-navigator_njod07nu/artifacts/98c107fc-e537-4a02-aee8-10d6d5df23ac/env.list --user=1000 --name ansible_runner_98c107fc-e537-4a02-aee8-10d6d5df23ac cgei-docker-release-virtual.artifactory.megacorp.com/cgei-unstable/infra-awx-ee:local /usr/bin/python3 /home/me/.cache/ansible-navigator/image_introspect.py
2024-11-08T01:15:08.326609+00:00 DEBUG 'ansible-runner.handle_command_wrap' command: docker run --rm --tty --interactive --workdir /runner/project -v /tmp/ssh-XXXXsCx6oA/:/tmp/ssh-XXXXsCx6oA/ -e SSH_AUTH_SOCK=/tmp/ssh-XXXXsCx6oA/agent.3825924 -v /home/me/.ssh/:/home/runner/.ssh/ -v /home/me/.ssh/:/root/.ssh/ -v /tmp/ansible-navigator_njod07nu/artifacts/:/runner/artifacts/:Z -v /tmp/ansible-navigator_njod07nu/:/runner/:Z -v /home/me/.cache/ansible-navigator/:/home/me/.cache/ansible-navigator/ --env-file /tmp/ansible-navigator_njod07nu/artifacts/98c107fc-e537-4a02-aee8-10d6d5df23ac/env.list --user=1000 --name ansible_runner_98c107fc-e537-4a02-aee8-10d6d5df23ac cgei-docker-release-virtual.artifactory.megacorp.com/cgei-unstable/infra-awx-ee:local /usr/bin/python3 /home/me/.cache/ansible-navigator/image_introspect.py
2024-11-08T01:15:09.545534+00:00 ERROR 'ansible_navigator.actions.images._parse' Unable to extract introspection from stdout
Traceback (most recent call last):
  File "/home/me/.local/lib/python3.12/site-packages/ansible_navigator/actions/images.py", line 537, in _parse
    _warnings, json_str = output.split("{", 1)
    ^^^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 1)
2024-11-08T01:15:09.548680+00:00 DEBUG 'ansible_navigator.actions.images._parse' error json loading output: 'not enough values to unpack (expected 2, got 1)'
2024-11-08T01:15:09.548974+00:00 DEBUG 'ansible_navigator.actions.images._parse' Traceback (most recent call last):
  File "/home/me/.cache/ansible-navigator/image_introspect.py", line 16, in <module>
    from typing import TypeAlias
ImportError: cannot import name 'TypeAlias' from 'typing' (/usr/lib64/python3.9/typing.py)

2024-11-08T01:15:09.549107+00:00 ERROR 'ansible_navigator.actions.images._parse' Image introspection failed (parsed), the return value was: Traceback (most recent call last):
  File "/home/me/.cache/ansible-navigator/image_introspect.py", line 16, in <module>
    from typing import TypeAlias
ImportError: cannot import name 'TypeAlias' from 'typing' (/usr/lib64/python3.9/typing.py)
Traceback (most recent call last):
  File "/home/me/.local/lib/python3.12/site-packages/ansible_navigator/actions/images.py", line 537, in _parse
    _warnings, json_str = output.split("{", 1)
    ^^^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 1)

@audgirka
Copy link
Contributor

@IPvSean can you give more details about this as we see from the logs that the system version is 3.11 and the logs also point to the python version 3.9.

@audgirka audgirka removed the new New issues and PRs to triaged label Nov 13, 2024
@IPvSean
Copy link
Collaborator Author

IPvSean commented Nov 20, 2024

what do you want me to run @audgirka ?

@laurentiuandries
Copy link

Could you post the result of podman info --debug?

@IPvSean
Copy link
Collaborator Author

IPvSean commented Jan 2, 2025

➜  ~ podman info --debug
host:
  arch: arm64
  buildahVersion: 1.35.4
  cgroupControllers:
  - cpuset
  - cpu
  - io
  - memory
  - pids
  - rdma
  - misc
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.10-1.fc40.aarch64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.10, commit: '
  cpuUtilization:
    idlePercent: 99.41
    systemPercent: 0.32
    userPercent: 0.28
  cpus: 6
  databaseBackend: sqlite
  distribution:
    distribution: fedora
    variant: coreos
    version: "40"
  eventLogger: journald
  freeLocks: 2033
  hostname: localhost.localdomain
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 6.8.8-300.fc40.aarch64
  linkmode: dynamic
  logDriver: journald
  memFree: 1446723584
  memTotal: 2044911616
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns-1.10.0-1.fc40.aarch64
      path: /usr/libexec/podman/aardvark-dns
      version: aardvark-dns 1.10.0
    package: netavark-1.10.3-3.fc40.aarch64
    path: /usr/libexec/podman/netavark
    version: netavark 1.10.3
  ociRuntime:
    name: crun
    package: crun-1.14.4-1.fc40.aarch64
    path: /usr/bin/crun
    version: |-
      crun version 1.14.4
      commit: a220ca661ce078f2c37b38c92e66cf66c012d9c1
      rundir: /run/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  os: linux
  pasta:
    executable: /usr/bin/pasta
    package: passt-0^20240426.gd03c4e2-1.fc40.aarch64
    version: |
      pasta 0^20240426.gd03c4e2-1.fc40.aarch64-pasta
      Copyright Red Hat
      GNU General Public License, version 2 or later
        <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
  remoteSocket:
    exists: true
    path: /run/podman/podman.sock
  rootlessNetworkCmd: ""
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: false
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.2.2-2.fc40.aarch64
    version: |-
      slirp4netns version 1.2.2
      commit: 0ee2d87523e906518d34a6b423271e4826f71faf
      libslirp: 4.7.0
      SLIRP_CONFIG_VERSION_MAX: 4
      libseccomp: 2.5.3
  swapFree: 0
  swapTotal: 0
  uptime: 0h 3m 24.00s
  variant: v8
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - docker.io
store:
  configFile: /usr/share/containers/storage.conf
  containerStore:
    number: 7
    paused: 0
    running: 0
    stopped: 7
  graphDriverName: overlay
  graphOptions:
    overlay.imagestore: /usr/lib/containers/storage
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /var/lib/containers/storage
  graphRootAllocated: 106769133568
  graphRootUsed: 13034196992
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Supports shifting: "true"
    Supports volatile: "true"
    Using metacopy: "true"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 10
  runRoot: /run/containers/storage
  transientStore: false
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 5.0.3
  Built: 1715299200
  BuiltTime: Thu May  9 20:00:00 2024
  GitCommit: ""
  GoVersion: go1.22.2
  Os: linux
  OsArch: linux/arm64
  Version: 5.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Researched, reproducible, committed to fix
Projects
Status: No status
Development

No branches or pull requests

4 participants