Skip to content

TypeError: get() got an unexpected keyword argument 'eid' #1743

@chuanchang

Description

@chuanchang

Describe the bug
Although provision is successful, I got error as follows.

TASK [gather_resources : Info] **********************************************************************************************************************************************************************ok: [localhost] => {
    "msg": "/tmp/rhel-8.2-nightly-latest-c235c8.inventory"
}

TASK [gather_resources : Add inventory_path to outputs] *********************************************************************************************************************************************[WARNING]: The value [{'inventory_path': ['/tmp/rhel-8.2-nightly-latest-c235c8.inventory']}] (type list) in a string field was converted to "[{'inventory_path': ['/tmp/rhel-8.2-nightly-
latest-c235c8.inventory']}]" (type string). If this does not look like what you expect, quote the entire value to ensure it does not change.

changed: [localhost] => {"changed": true, "output": "[1]"}

PLAY RECAP ******************************************************************************************************************************************************************************************localhost                  : ok=28   changed=4    unreachable=0    failed=0    skipped=27   rescued=0    ignored=0

Action 'up' on Target 'rhel-8.2' is complete
Traceback (most recent call last):
  File "/usr/local/bin/linchpin", line 10, in <module>
    sys.exit(runcli())
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 73, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/linchpin/shell/__init__.py", line 318, in up
    env_vars=env_vars)
  File "/usr/local/lib/python3.7/site-packages/linchpin/cli/__init__.py", line 380, in lp_up
    tx_id=tx_id)
  File "/usr/local/lib/python3.7/site-packages/linchpin/cli/__init__.py", line 565, in _execute_action
    run_id=run_id)
  File "/usr/local/lib/python3.7/site-packages/linchpin/cli/__init__.py", line 742, in _execute
    tx_id=tx_id)
  File "/usr/local/lib/python3.7/site-packages/linchpin/__init__.py", line 549, in do_action
    run_id)
  File "/usr/local/lib/python3.7/site-packages/linchpin/__init__.py", line 615, in run_target
    self.run_hooks('inv', action)
  File "/usr/local/lib/python3.7/site-packages/linchpin/__init__.py", line 633, in run_hooks
    self.hook_state = hook
  File "/usr/local/lib/python3.7/site-packages/linchpin/__init__.py", line 253, in hook_state
    callback(self._hook_state)
  File "/usr/local/lib/python3.7/site-packages/linchpin/hooks/__init__.py", line 200, in run_hooks
    run_data = self.prepare_inv_params()
  File "/usr/local/lib/python3.7/site-packages/linchpin/hooks/__init__.py", line 167, in prepare_inv_params
    run_id=self._rundb_id)
  File "/usr/local/lib/python3.7/site-packages/linchpin/rundb/basedb.py", line 41, in get_record
    return self.driver.get_record(table, action=action, run_id=run_id)
  File "/usr/local/lib/python3.7/site-packages/linchpin/rundb/__init__.py", line 10, in func_wrapper
    x = func(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/linchpin/rundb/tinydb.py", line 116, in get_record
    record = t.get(eid=int(run_id))
TypeError: get() got an unexpected keyword argument 'eid'

To Reproduce
Steps to reproduce the behavior:

  1. To follow documentation - https://github.com/CentOS-PaaS-SIG/linchpin/blob/6c7c656b9b396790ab76491fec9f263f3d43f8ff/config/Dockerfiles/linchpin/README.rst

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: RHEL-8.2
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

sh-5.0$ linchpin --version
linchpin version 2.0.0  
sh-5.0$ ansible --version
ansible 2.9.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/linchpin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.7/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.7.7 (default, Mar 13 2020, 10:23:39) [GCC 9.2.1 20190827 (Red Hat 9.2.1-1)]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions