#4806 Internal error on idview-apply --host= or --hostgroup=
Closed: Fixed None Opened 9 years ago by pvoborni.

If no host or host group is provided: --host= or --hostgroup= idview-apply ends up with:

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ipaserver/rpcserver.py", line 348, in wsgi_execute
    result = self.Command[name](*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 439, in __call__
    ret = self.run(*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 754, in run
    return self.execute(*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/plugins/idviews.py", line 257, in execute
    hosts_to_apply = list(options.get('host', []))
TypeError: 'NoneType' object is not iterable

or

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ipaserver/rpcserver.py", line 348, in wsgi_execute
    result = self.Command[name](*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 439, in __call__
    ret = self.run(*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 754, in run
    return self.execute(*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/plugins/idviews.py", line 259, in execute
    for hostgroup in options.get('hostgroup', ()):
TypeError: 'NoneType' object is not iterable

Same issue in idview-unapply


Quite a corner case, patch on the list, triaging to 4.1.3.

master:

  • c5c9d49 idviews: Ignore host or hostgroup options set to None

ipa-4-1:

  • 86a7dfc idviews: Ignore host or hostgroup options set to None

Metadata Update from @pvoborni:
- Issue assigned to tbabej
- Issue set to the milestone: FreeIPA 4.1.3

7 years ago

Login to comment on this ticket.

Metadata