Skip to content

Unexpected failure during module execution: "_is_text_encoding=False" #407

Description

@infernix

This is a tricky one. Let me try to summarize.

  • Playbook manages entire OS for Debian desktop devices
  • Playbook in question upgrades target hosts from Debian 8 to 9. Several asyncs are used throughout.
  • Runs about a dozen different roles after the dist-upgrade without problems
  • At a specific point, all modules fail with _is_text_encoding=False error.
  • Rerunning the exact playbook afterwards does not trigger the issue.

This play still works:

- name: Install OS package dependancies
  apt: pkg={{ item }} state=present
  retries: 4
  delay: 15
  with_items:
  - libudev-dev
  - libjson-c-dev
  - libcurl4-gnutls-dev
  - node-colors
  - node-request
  - nodejs
  tags: domotica

And then this right after fails with above error:

- name: Install npm packages block
  block:
    - name: Install npm packages with npm module
      npm: path="/home/{{ domotica_user }}/domotica" ignore_scripts=yes
      become: yes
      become_user: "{{ domotica_user }}"
  rescue:
    - name: Install npm packages with command line
      command: npm install --ignore-scripts
      args:
        chdir: "/home/{{ domotica_user }}/domotica"
      become: yes
      become_user: "{{ domotica_user }}"
  tags: domotica

Both npm and command fail with the same error. I first thought it was an npm module issue, but evidently it's not.

The host executing the play runs Debian sid, and as mentioned the target host runs Debian 8 at the start of the play and then is upgraded during the play.

Unfortunately the only way I can reproduce this, is by instantiating one of those Debian 8 desktops and then executing this entire upgrade play (takes 30mins-2hrs depending on download speed and target host cpu). I haven't been able to reproduce in any other way.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ansibleIssues relating to Mitogen for AnsiblebugCode feature that hinders desired execution outcomeuser-reported

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions