configure_instances.yml failing in master-395

Bug #1803809 reported by vimal
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
Trunk
Fix Committed
Critical
Nitish Krishna Kaveri

Bug Description

configure_instances.yml failing in master-395

logs
------

2018-11-17 02:55:15,832 p=13333 u=root | [DEPRECATION WARNING]: The use of 'include' for tasks has been deprecated. Use
'import_tasks' for static inclusions or 'include_tasks' for dynamic inclusions.
 This feature will be removed in a future release. Deprecation warnings can be
disabled by setting deprecation_warnings=False in ansible.cfg.
2018-11-17 02:55:15,900 p=13333 u=root | [DEPRECATION WARNING]: include is kept for backwards compatibility but usage is
 discouraged. The module documentation details page may explain more about this
 rationale.. This feature will be removed in a future release. Deprecation
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
2018-11-17 02:55:15,938 p=13333 u=root | ERROR! Unexpected Exception, this is probably a bug: No module named requests
2018-11-17 02:55:15,938 p=13333 u=root | to see the full traceback, use -vvv
2018-11-17 02:55:15,941 p=13333 u=root | the full traceback was:

  File "/usr/bin/ansible-playbook", line 106, in <module>
    exit_code = cli.run()
  File "/usr/lib/python2.7/site-packages/ansible/cli/playbook.py", line 130, in run
    results = pbex.run()
  File "/usr/lib/python2.7/site-packages/ansible/executor/playbook_executor.py", line 82, in run
    pb = Playbook.load(playbook_path, variable_manager=self._variable_manager, loader=self._loader)
  File "/usr/lib/python2.7/site-packages/ansible/playbook/__init__.py", line 54, in load
    pb._load_playbook_data(file_name=file_name, variable_manager=variable_manager)
  File "/usr/lib/python2.7/site-packages/ansible/playbook/__init__.py", line 106, in _load_playbook_data
    entry_obj = Play.load(entry, variable_manager=variable_manager, loader=self._loader)
  File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 117, in load
    return p.load_data(data, variable_manager=variable_manager, loader=loader)
  File "/usr/lib/python2.7/site-packages/ansible/playbook/base.py", line 254, in load_data
    self._attributes[name] = method(name, ds[name])
  File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 197, in _load_roles
    roles.append(Role.load(ri, play=self))
  File "/usr/lib/python2.7/site-packages/ansible/playbook/role/__init__.py", line 157, in load
    r._load_role_data(role_include, parent_role=parent_role)
  File "/usr/lib/python2.7/site-packages/ansible/playbook/role/__init__.py", line 211, in _load_role_data
    self._task_blocks = load_list_of_blocks(task_data, play=self._play, role=self, loader=self._loader, variable_manager=self._variable_manager)
 File "/usr/lib/python2.7/site-packages/ansible/playbook/helpers.py", line 59, in load_list_of_blocks
    loader=loader,
  File "/usr/lib/python2.7/site-packages/ansible/playbook/block.py", line 86, in load
    return b.load_data(data, variable_manager=variable_manager, loader=loader)
  File "/usr/lib/python2.7/site-packages/ansible/playbook/base.py", line 254, in load_data
    self._attributes[name] = method(name, ds[name])
  File "/usr/lib/python2.7/site-packages/ansible/playbook/block.py", line 122, in _load_block
    use_handlers=self._use_handlers,
  File "/usr/lib/python2.7/site-packages/ansible/playbook/helpers.py", line 130, in load_list_of_tasks
    all_vars = variable_manager.get_vars(play=play, task=t)
  File "/usr/lib/python2.7/site-packages/ansible/vars/manager.py", line 383, in get_vars
    vars_file = templar.template(vars_file)
  File "/usr/lib/python2.7/site-packages/ansible/template/__init__.py", line 450, in template
    disable_lookups=disable_lookups,
  File "/usr/lib/python2.7/site-packages/ansible/template/__init__.py", line 642, in do_template
    myenv.filters.update(self._get_filters())
  File "/usr/lib/python2.7/site-packages/ansible/template/__init__.py", line 279, in _get_filters
    plugins = [x for x in self._filter_loader.all()]
  File "/usr/lib/python2.7/site-packages/ansible/plugins/loader.py", line 426, in all
    self._module_cache[path] = self._load_module_source(name, path)
  File "/usr/lib/python2.7/site-packages/ansible/plugins/loader.py", line 339, in _load_module_source
    module = imp.load_source(full_name, path, module_file)
  File "/tmp/ansible.0BWCTj_contrail/contrail-ansible-deployer/playbooks/roles/contrail_deployer/filter_plugins/calculate_contrail_roles.py", line 9, in <module>
    import requests
ImportError: No module named requests

2018-11-17 02:55:16,004 p=12843 u=root | fatal: [localhost]: FAILED! => {
    "changed": true,
    "cmd": [
        "ansible-playbook",
        "-i",
        "inventory/",
        "-e",
        "orchestrator=openstack",
        "playbooks/configure_instances.yml",
        "-v"
    ],
    "delta": "0:00:00.943843",
    "end": "2018-11-17 02:55:15.972738",
    "rc": 250,
    "start": "2018-11-17 02:55:15.028895"
}

STDOUT:

Using /tmp/ansible.0BWCTj_contrail/contrail-ansible-deployer/ansible.cfg as config file
to see the full traceback, use -vvv

STDERR:

 [WARNING]: Found both group and host with same name: localhost
[DEPRECATION WARNING]: The use of 'include' for tasks has been deprecated. Use
'import_tasks' for static inclusions or 'include_tasks' for dynamic inclusions.
 This feature will be removed in a future release. Deprecation warnings can be
disabled by setting deprecation_warnings=False in ansible.cfg.

logs:
------

/cs-shared/bugs/1803809

ls
ansible.log instances.yaml

vimal (vappachan)
description: updated
description: updated
Changed in juniperopenstack:
assignee: Ramprakash R (ramprakash) → Nitish Krishna Kaveri (nitishk)
Revision history for this message
Nitish Krishna Kaveri (nitishk) wrote :

Are you sure about this being a 5.0.2 bug? My code was not merged in 5.0 branch

Revision history for this message
Nitish Krishna Kaveri (nitishk) wrote :

Workaround:
yum install -y python-pip
pip install requests

vimal (vappachan)
description: updated
summary: - configure_instances.yml failing in R5.0 359
+ configure_instances.yml failing in master-395
Revision history for this message
Nitish Krishna Kaveri (nitishk) wrote :

Change made for UI:
https://review.opencontrail.org/#/c/47737/
But not picked up in latest builds. Mailed Vinay to investigate

Revision history for this message
Nitish Krishna Kaveri (nitishk) wrote :

Fixed when above change was merged. Verified by Prachi

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.