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

debconf: MODULE FAILURE (not enough values to unpack (expected 4, got 3)) #83214

Open
1 task done
ArmandasRokas opened this issue May 8, 2024 · 5 comments · May be fixed by #83217
Open
1 task done

debconf: MODULE FAILURE (not enough values to unpack (expected 4, got 3)) #83214

ArmandasRokas opened this issue May 8, 2024 · 5 comments · May be fixed by #83217
Assignees
Labels
affects_2.16 bug This issue/PR relates to a bug. has_pr This issue has an associated PR. module This issue/PR relates to a module. verified This issue has been verified/reproduced by maintainer

Comments

@ArmandasRokas
Copy link

Summary

After the update from core 2.15 to core 2.16 debconf suddenly breaks running the task multiple times.

Issue Type

Bug Report

Component Name

debconf

Ansible Version

ansible [core 2.16.5]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/ansible/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/ansible/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (/usr/bin/python3)
  jinja version = 3.0.3
  libyaml = True

Configuration

[defaults]
roles_path=./XXXXXX/roles
collections_path=./XXXXXX
remote_user=XXXXXX
vault_password_file=~/.XXXXXX
timeout=60

OS / Environment

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.4 LTS"

Steps to Reproduce

- name: Debconf for phpmyadmin/mysql/app-pass
  ansible.builtin.debconf:
    name: phpmyadmin
    question: phpmyadmin/mysql/app-pass
    value: "{{ php_mysql_application_password_for_phpmyadmin }}"
    vtype: password

Expected Results

I expect debconf updated with the given password.

Actual Results

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ValueError: not enough values to unpack (expected 4, got 3)
fatal: [partner-site-dev]: FAILED! => {"changed": false, "module_stderr": "Shared connection to 172.18.165.198 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n  File \"/home/ubuntu/.ansible/tmp/ansible-tmp-1715170809.149087-85672-153389685417787/AnsiballZ_debconf.py\", line 107, in <module>\r\n    _ansiballz_main()\r\n  File \"/home/ubuntu/.ansible/tmp/ansible-tmp-1715170809.149087-85672-153389685417787/AnsiballZ_debconf.py\", line 99, in _ansiballz_main\r\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n  File \"/home/ubuntu/.ansible/tmp/ansible-tmp-1715170809.149087-85672-153389685417787/AnsiballZ_debconf.py\", line 47, in invoke_module\r\n    runpy.run_module(mod_name='ansible.modules.debconf', init_globals=dict(_module_fqn='ansible.modules.debconf', _modlib_path=modlib_path),\r\n  File \"<frozen runpy>\", line 226, in run_module\r\n  File \"<frozen runpy>\", line 98, in _run_module_code\r\n  File \"<frozen runpy>\", line 88, in _run_code\r\n  File \"/tmp/ansible_ansible.builtin.debconf_payload_73rof192/ansible_ansible.builtin.debconf_payload.zip/ansible/modules/debconf.py\", line 252, in <module>\r\n    \r\n  File \"/tmp/ansible_ansible.builtin.debconf_payload_73rof192/ansible_ansible.builtin.debconf_payload.zip/ansible/modules/debconf.py\", line 223, in main\r\n    self.dccomm.wait()\r\n
    ^^^^\r\n  File \"/tmp/ansible_ansible.builtin.debconf_payload_73rof192/ansible_ansible.builtin.debconf_payload.zip/ansible/modules/debconf.py\", line 147, in get_password_value\r\n    else:\r\n^^^^^^^^^^\r\nValueError: not enough values to unpack (expected 4, got 3)\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibot ansibot added bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. affects_2.16 module This issue/PR relates to a module. labels May 8, 2024
@ansibot
Copy link
Contributor

ansibot commented May 8, 2024

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the component bot command.

@Akasurde Akasurde self-assigned this May 8, 2024
@Akasurde Akasurde added the verified This issue has been verified/reproduced by maintainer label May 8, 2024
Akasurde added a commit to Akasurde/ansible that referenced this issue May 8, 2024
Fixes: ansible#83214

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
@Akasurde Akasurde linked a pull request May 8, 2024 that will close this issue
@ansibot ansibot added the has_pr This issue has an associated PR. label May 8, 2024
Akasurde added a commit to Akasurde/ansible that referenced this issue May 8, 2024
Fixes: ansible#83214

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
@Akasurde
Copy link
Member

Akasurde commented May 8, 2024

@ArmandasRokas Could you please check if PR #83217 works for you and let me know? Thanks in advance.

Akasurde added a commit to Akasurde/ansible that referenced this issue May 8, 2024
Fixes: ansible#83214

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
@ArmandasRokas
Copy link
Author

ArmandasRokas commented May 10, 2024

@ArmandasRokas Could you please check if PR #83217 works for you and let me know? Thanks in advance.

Seems to be working right now.

TASK [XXXXXX : Debconf for phpmyadmin/mysql/app-pass] *****************************************************
--- before
+++ after
@@ -1,3 +1,3 @@
 {
-    "phpmyadmin/mysql/app-pass": "(password omitted)"
+    "phpmyadmin/mysql/app-pass": "XXXXXX"
 }

changed: [XXXXX]

However it shows still "changed" although the given password was the same as in the previous run.
So it does not look like this idempotency is working:
#81484

@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label May 14, 2024
Akasurde added a commit to Akasurde/ansible that referenced this issue May 14, 2024
Fixes: ansible#83214

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
@Akasurde
Copy link
Member

@ArmandasRokas Can you please check the updated patch and let me know if it works for you? Thanks.

@fermosan
Copy link

@Akasurde Hello, i had the same issue and i can confirm that your patch fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.16 bug This issue/PR relates to a bug. has_pr This issue has an associated PR. module This issue/PR relates to a module. verified This issue has been verified/reproduced by maintainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants