Project

General

Profile

Bug #79320

Fix iocage traceback by grabbing the first index for enabled DC

Added by Bonnie Follweiler over 2 years ago. Updated over 2 years ago.

Status:
Done
Priority:
No priority
Assignee:
Brandon Schneider
Category:
Middleware
Target version:
Seen in:
Severity:
High
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

This is in the Internal for 11.2-U3: FreeNAS-11.2-U2-INTERNAL95

I tried to install a jail and got the following error message:
FAILED

list indices must be integers or slices, not str

Error: concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/local/lib/python3.6/concurrent/futures/process.py", line 175, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 128, in main_worker
res = loop.run_until_complete(coro)
File "/usr/local/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
return future.result()
File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 88, in _run
return await self._call(f'{service_name}.{method}', serviceobj, methodobj, params=args, job=job)
File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 81, in _call
return methodobj(*params)
File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 81, in _call
return methodobj(*params)
File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/jail.py", line 158, in create_job
if dc['enable'] and (
TypeError: list indices must be integers or slices, not str
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/middlewared/job.py", line 332, in run
await self.future
File "/usr/local/lib/python3.6/site-packages/middlewared/job.py", line 356, in _run_body
rv = await self.middleware._call_worker(self.serviceobj, self.method_name, *self.args, job={'id': self.id})
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1105, in _call_worker
job,
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1036, in run_in_proc
return await self.run_in_executor(self.
_procpool, method, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1021, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
TypeError: list indices must be integers or slices, not str


Related issues

Has duplicate FreeNAS - Bug #79338: Jail creation broken in UIClosed

History

#1 Updated by William Grzybowski over 2 years ago

  • Assignee changed from William Grzybowski to Brandon Schneider
  • Target version changed from Backlog to 11.2-U4
  • Severity changed from New to High

#2 Updated by Dru Lavigne over 2 years ago

  • Target version changed from 11.2-U4 to 11.2-U3

#3 Updated by Bonnie Follweiler over 2 years ago

  • Private changed from No to Yes

Please note: I tried installing with the internal nameservers set with the values for QE and with 8.8.8.8

#4 Updated by Aaron St. John over 2 years ago

On FreeNAS-11.2-U2-INTERNAL95 jail creation does not work in the CLI either. However, jail creation through the CLI worked on INTERNAL94.

After running iocage create command, I always get:

[root@freenas ~]# iocage create -r 11.2-RELEASE -n testjail dhcp=on
Traceback (most recent call last):
  File "/usr/local/bin/iocage", line 10, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/iocage_cli/create.py", line 164,in cli
    basejail=basejail, thickjail=thickjail, empty=empty)
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/iocage.py", line 611,in create
    clone=clone,
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_create.py", line 87, in create_jail
    return self._create_jail(jail_uuid, location)
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_create.py", line 194, in _create_jail
    config = self.create_config(jail_uuid, cloned_release)
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_create.py", line 574, in create_config
    jail_props = ioc_json.json_check_default_config()
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_json.py", line 1901, in json_check_default_config
    default_props, default=True)
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_json.py", line 939, in json_check_config
    f'{iocroot}/releases/{release}/root/bin/freebsd-version'
UnboundLocalError: local variable 'release' referenced before assignment

#5 Updated by Bug Clerk over 2 years ago

  • Status changed from Unscreened to In Progress

#6 Updated by Bug Clerk over 2 years ago

  • Status changed from In Progress to Ready for Testing

#7 Updated by Dru Lavigne over 2 years ago

  • Subject changed from Jails fail to install with an error message: FAILED list indices must be integers or slices, not str to Fix iocage traceback by grabbing the first index for enabled DC
  • Private changed from Yes to No
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

#8 Updated by Dru Lavigne over 2 years ago

  • File deleted (debug-fn07-20190307084834.tgz)

#11 Updated by Bonnie Follweiler over 2 years ago

  • Status changed from Ready for Testing to Passed Testing
  • Needs QA changed from Yes to No

Test Passed in FreeNAS-11.2-U2-INTERNAL97

#12 Updated by Dru Lavigne over 2 years ago

  • Status changed from Passed Testing to Done

#13 Updated by Dru Lavigne over 2 years ago

  • Has duplicate Bug #79338: Jail creation broken in UI added

Also available in: Atom PDF