Project

General

Profile

Bug #65931

Improve exception handling for iocage listing

Added by Efrain Lozada 11 months ago. Updated 7 months ago.

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

Description

I disabled Plex and rebooted the server now I am getting this error and the Jail is lost.

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/schema.py", line 668, in nf
return f(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/jail.py", line 463, in list_resource
resource_list = iocage.list("all", plugin=True)
File "/usr/local/lib/python3.6/site-packages/iocage_lib/iocage.py", line 1176, in list
quick=quick
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_list.py", line 75, in list_datasets
_all = self.list_all(ds)
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_list.py", line 262, in list_all
full_ip4 = f"{interface}|" \
IndexError: list index out of range
"""

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/main.py", line 161, in call_method
result = await self.middleware.call_method(self, message)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1109, in call_method
return await self._call(message['method'], serviceobj, methodobj, params, app=app, io_thread=False)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1046, in call
return await self._call_worker(serviceobj, name, *args)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1073, in _call_worker
job,
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1004, 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 989, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
IndexError: list index out of range


Related issues

Related to FreeNAS - Bug #73975: Improve exception handling for iocage listingDone
Has duplicate FreeNAS - Bug #65922: Jail Plugging dissapearClosed

History

#1 Updated by William Grzybowski 11 months ago

  • Has duplicate Bug #65922: Jail Plugging dissapear added

#2 Updated by William Grzybowski 11 months ago

  • Assignee changed from Release Council to Waqar Ahmed
  • Target version changed from Backlog to 11.2-U3

Waqar can you investigate, please? Might be a duplicate

#3 Updated by William Grzybowski 11 months ago

  • Category changed from Plugins to Middleware

#4 Updated by Waqar Ahmed 11 months ago

  • Status changed from Unscreened to In Progress

#5 Updated by Waqar Ahmed 11 months ago

  • Status changed from In Progress to Blocked
  • Reason for Blocked set to Need additional information from Author

Can you please attach a system debug - You can generate it from System -> Advacned -> Save Debug ? Many thanks

#6 Updated by Efrain Lozada 11 months ago

  • File debug-NAS-20181227180248.tgz added

Hello,

Attached the requested Debug. The jail re-appeared again but already I had another installed. But it went away again with the same error.

#7 Updated by Waqar Ahmed 11 months ago

  • Status changed from Blocked to In Progress

#8 Updated by Dru Lavigne 11 months ago

  • Private changed from No to Yes
  • Reason for Blocked deleted (Need additional information from Author)

#9 Updated by Waqar Ahmed 10 months ago

  • Status changed from In Progress to Blocked
  • Reason for Blocked set to Waiting for feedback

Hello, I haven't been able to reproduce this issue. It is possible that this might be fixed already. Can you please confirm if you destroyed your earlier plex jail ? I can't see anything related to it in the debug which indicates that it does not exist anymore in the system. I can have a patch for this which will make sure that we don't get an exception here but I would like to know if possible what exactly went wrong. Please let me know if you have faced this similar issue with any other jails/plugins you have as well. Looking forward to hearing from you. Thank you :)

#10 Updated by Efrain Lozada 10 months ago

Hello,
So it has happened twice with the same Jail in this case Plex. The only thing I did was to stop the Jail and reboot the system, when the system came back I couldn't find the Jail under the installed pluggings. Then when I reinstalled the plugging it reappeared again.

#11 Updated by Waqar Ahmed 10 months ago

So you did not remove the original plex jail which showed this behaviour at any point ? Apologies for being repetitive, just being sure that I am following you correctly

#12 Updated by Efrain Lozada 10 months ago

I could not remove the jail, I just couldn't find it, the only place I saw the plugging was under installed plugging and that is where I received the exception when it was refreshing the installed plugging. So I installed another plugging and when I finished I reboot the server and that is when the one that disappeared, reappeared again, so I was able to remove it. In a side note the plugging was working when it disappeared, it never stopped working.

#13 Updated by Waqar Ahmed 10 months ago

  • Status changed from Blocked to In Progress
  • Reason for Blocked deleted (Waiting for feedback)

Sadly as I could not reproduce the issue and we don't have that jail around anymore we could not get to the root of the issue. However, I have brought up a PR - https://github.com/iocage/iocage/pull/775, which should log this operation better and also make sure that we don't raise an error in this scenario and just log it appropriately from where we can get to the root of the issue. Thank you for your help

#14 Updated by Waqar Ahmed 10 months ago

  • Status changed from In Progress to Ready for Testing

#15 Updated by Dru Lavigne 10 months ago

  • File deleted (debug-NAS-20181227180248.tgz)

#16 Updated by Dru Lavigne 10 months ago

  • Target version changed from 11.2-U3 to 11.3
  • Private changed from Yes to No
  • Needs Merging changed from Yes to No

#17 Updated by Dru Lavigne 10 months ago

  • Target version changed from 11.3 to 11.3-BETA1

#18 Updated by Dru Lavigne 10 months ago

  • Subject changed from Jail Plugging dissapear to Improve exception handling for iocage listing
  • Needs Doc changed from Yes to No

#19 Updated by Dru Lavigne 9 months ago

  • Related to Bug #73975: Improve exception handling for iocage listing added

#20 Updated by Dru Lavigne 9 months ago

  • Status changed from Ready for Testing to Done

#22 Updated by Dru Lavigne 7 months ago

  • Target version changed from 11.3-BETA1 to 11.3-ALPHA1

Also available in: Atom PDF