Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Docker shell module failed in the latest sonic-mgmt for some tasks #1268

Closed
msosyak opened this issue Dec 9, 2019 · 1 comment · Fixed by #1269
Closed

Docker shell module failed in the latest sonic-mgmt for some tasks #1268

msosyak opened this issue Dec 9, 2019 · 1 comment · Fixed by #1269

Comments

@msosyak
Copy link
Contributor

msosyak commented Dec 9, 2019

Description
According to #1243, the fix #1253 was merged.
But this fix turned out to be incomplete and cause an error similar to previous when running some tasks with docker shell e.g. copy, template.

Here are the logs:

The full traceback is:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/ansible/executor/task_executor.py", line 111, in run
    item_results = self._run_loop(items)
  File "/usr/local/lib/python2.7/dist-packages/ansible/executor/task_executor.py", line 371, in _run_loop
    res = self._execute(variables=task_vars)
  File "/usr/local/lib/python2.7/dist-packages/ansible/executor/task_executor.py", line 664, in _execute
    result = self._handler.run(task_vars=variables)
  File "/usr/local/lib/python2.7/dist-packages/ansible/plugins/action/copy.py", line 590, in run
    self._remove_tmp_path(self._connection._shell.tmpdir)
  File "/usr/local/lib/python2.7/dist-packages/ansible/plugins/action/__init__.py", line 398, in _remove_tmp_path
    cmd = self._connection._shell.remove(tmp_path, recurse=True)
  File "/var/user/jenkins/bfn-sonic-mgmt/ansible/shell_plugins/docker.py", line 44, in remove
    argv = self.get_option('ansible_python_interpreter').split()
  File "/usr/local/lib/python2.7/dist-packages/ansible/plugins/__init__.py", line 60, in get_option
    raise KeyError(to_native(e))
KeyError: 'Requested entry (plugin_type: shell plugin: docker setting: ansible_python_interpreter ) was not defined in configuration.'

fatal: [cab18-2-dut]: FAILED! => {
    "msg": "Unexpected failure during module execution.", 
    "stdout": ""
}

Steps to reproduce the issue:

  1. run ecn_wred CT

Describe the results you received:

Describe the results you expected:

Additional information you deem important:

**Output of `show version`:**

```
(paste your output here)
```

**Attach debug file `sudo generate_dump`:


```
(paste your output here)
```
@msosyak
Copy link
Contributor Author

msosyak commented Dec 9, 2019

Here is the fix for this issue: #1262
But it not looks like the best option which we can choose.
As I mentioned here #1253 (comment)
"maybe it is the time to look to the docker connection plugin."
So I've spent some time and created #1269 where I tried to use the docker connection plugin.

@qiluo-msft @lguohan Please have a look to #1269

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant