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

headless apt-get install python-apt #69322

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

lod
Copy link

@lod lod commented May 4, 2020

SUMMARY

The initial apt-get install python3-apt was missing the dpkg_options
This can cause the operation to hang if python-apt drags in dependencies
which desire user interaction.

Fixes #63134

Signed-off-by: David Tulloh git-david@tulloh.id.au

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

modules/packaging/os/apt

ADDITIONAL INFORMATION

Could not craft a nice concise integration test to excite the bug.
Passes existing integration tests.

@ansibot
Copy link
Contributor

ansibot commented May 4, 2020

The test ansible-test sanity --test compile --python 2.6 [explain] failed with 1 error:

lib/ansible/modules/packaging/os/apt.py:1061:55: SyntaxError: module.run_command(['apt-get', 'install', *options, PYTHON_APT], check_rc=True)

The test ansible-test sanity --test compile --python 2.7 [explain] failed with 1 error:

lib/ansible/modules/packaging/os/apt.py:1061:55: SyntaxError: module.run_command(['apt-get', 'install', *options, PYTHON_APT], check_rc=True)

The test ansible-test sanity --test import --python 2.6 [explain] failed with 1 error:

lib/ansible/modules/packaging/os/apt.py:1061:55: traceback: SyntaxError: invalid syntax

The test ansible-test sanity --test import --python 2.7 [explain] failed with 1 error:

lib/ansible/modules/packaging/os/apt.py:1061:55: traceback: SyntaxError: invalid syntax

click here for bot help

@ansibot ansibot added affects_2.10 This issue/PR affects Ansible v2.10 bug This issue/PR relates to a bug. module This issue/PR relates to a module. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. packaging Packaging category python3 small_patch support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels May 4, 2020
@lod lod force-pushed the apt_install_pyapt branch 2 times, most recently from 238e0e8 to fd106f0 Compare May 5, 2020 02:44
@lod
Copy link
Author

lod commented May 5, 2020

Initial push wasn't python-2 compatible, update fixed that

@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels May 5, 2020
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label May 7, 2020
@bcoca bcoca self-assigned this May 7, 2020
@bcoca bcoca added P3 Priority 3 - Approved, No Time Limitation and removed affects_2.10 This issue/PR affects Ansible v2.10 labels May 7, 2020
@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. and removed core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. labels May 17, 2020
@ansibot ansibot added the module This issue/PR relates to a module. label May 25, 2020
The initial apt-get install python3-apt was missing the dpkg_options
This can cause the operation to hang if python-apt drags in dependancies
which desire user interaction.

Signed-off-by: David Tulloh <git-david@tulloh.id.au>
@lod
Copy link
Author

lod commented Jun 4, 2020

updated to reflect file restructuring

@ansibot ansibot removed the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Jun 12, 2020
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jun 12, 2020
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. pre_azp This PR was last tested before migration to Azure Pipelines. and removed core_review In order to be merged, this PR must follow the core review workflow. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Dec 6, 2020
@ansibot ansibot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.11 bug This issue/PR relates to a bug. module This issue/PR relates to a module. needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. new_contributor This PR is the first contribution by a new community member. P3 Priority 3 - Approved, No Time Limitation packaging Packaging category pre_azp This PR was last tested before migration to Azure Pipelines. python3 small_patch support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Apt Module hangs forever when running on Kali Linux
3 participants