Project

General

Profile

Bug #18956

"Query returned multiple jails"; Can't access, change, or delete jails with similar names

Added by Gaelan Lloyd almost 4 years ago. Updated over 3 years ago.

Status:
Closed: Not To Be Fixed
Priority:
Expected
Assignee:
Suraj Ravichandran
Category:
Middleware
Target version:
Seen in:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:

Supermicro X10SL7 motherboard
Intel(R) Xeon(R) CPU E3-1240 v3
32 Gb ECC memory
6 WD Red 3Tb drives in raid-z2
System on 2 mirrored DREVO X1-60G D1BB12 SSDs

ChangeLog Required:
No

Description

I created two jails called:

  1. lms
  2. lms-build

When you launch the shell into either instance, you only get the shell for [lms-build]. I figured FreeNAS didn't like the fact that the jails are named so similarly and was getting confused, so I went to delete the jails and try more unique names.

But, I cannot delete the jails because of this error:


Request Method: GET
Request URL: http://192.168.1.30/jails/edit/3
Software Version: FreeNAS-9.10.1-U4 (ec9a7d3)
Exception Type: MultipleObjectsReturned
Exception Value: Query returned multiple Jails
Exception Location: /usr/local/www/freenasUI/../freenasUI/jails/queryset.py in get, line 155
Server time: Wed, 16 Nov 2016 09:30:17 -0800


Traceback

Environment:

Software Version: FreeNAS-9.10.1-U4 (ec9a7d3)
Request Method: GET
Request URL: http://192.168.1.30/jails/edit/3

Traceback:
File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
105. response = middleware_method(request, callback, callback_args, callback_kwargs)
File "/usr/local/www/freenasUI/../freenasUI/freeadmin/middleware.py" in process_view
156. return login_required(view_func)(request, *view_args, **view_kwargs)
File "/usr/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
22. return view_func(request, *args, **kwargs)
File "/usr/local/www/freenasUI/../freenasUI/jails/views.py" in jail_edit
100. jail = models.Jails.objects.get(id=id)
File "/usr/local/lib/python2.7/site-packages/django/db/models/manager.py" in get
151. return self.get_queryset().get(*args, **kwargs)
File "/usr/local/www/freenasUI/../freenasUI/jails/queryset.py" in get
155. "Query returned multiple Jails"

Exception Type: MultipleObjectsReturned at /jails/edit/3
Exception Value: Query returned multiple Jails


Request information

GET

No GET data
POST

No POST data
FILES

No FILES data
COOKIES

Variable Value
fntreeSaveStateCookie 'root%2Croot%2F55%2Croot%2F55%2F56%2Croot%2F55%2F56%2F57%2Croot%2F1%2F5%2Croot%2F56%2Croot%2F56%2F57%2Croot%2F56%2F57%2F58%2F63%2Croot%2F56%2F57%2F58%2F59%2Croot%2F103%2Croot%2F103%2F113%2Croot%2F56%2F57%2F58%2Croot%2F1%2F2%2Croot%2F1%2F6%2Croot%2F104%2Croot%2F104%2F114%2Croot%2F57%2Croot%2F57%2F58%2Croot%2F57%2F58%2F59%2Croot%2F112%2Croot%2F112%2F122%2Croot%2F57%2F58%2F59%2F68%2Croot%2F57%2F58%2F59%2F72%2Croot%2F1%2F8%2Croot%2F114%2Croot%2F114%2F124%2Croot%2F59%2Croot%2F59%2F60%2Croot%2F59%2F60%2F61%2Croot%2F59%2F60%2F61%2F62%2Croot%2F118%2Croot%2F118%2F128%2Croot%2F59%2F60%2F61%2F82%2Croot%2F1%2F9%2Croot%2F61%2Croot%2F61%2F62%2F63%2Croot%2F124%2Croot%2F124%2F134%2Croot%2F61%2F62%2F63%2F64%2Croot%2F61%2F62%2F63%2F76%2Croot%2F220%2Croot%2F61%2F62%2F63%2F84%2Croot%2F224'
csrftoken 'RXIWb75si3v2xZkK0KE6J9t2iGUmqCFl'
sessionid 'lpo3tky5o36q888t75ll6toe5nfajkli'
META

Variable Value
HTTP_USER_AGENT 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36'
SERVER_SOFTWARE 'nginx/1.8.1'
SCRIPT_NAME u''
wsgi.multiprocess False
HTTP_ACCEPT '*/*'
QUERY_STRING ''
HTTP_CONTENT_TYPE 'application/x-www-form-urlencoded'
HTTP_CONNECTION 'keep-alive'
REDIRECT_STATUS '200'
wsgi.multithread True
SERVER_PROTOCOL 'HTTP/1.1'
wsgi.version (1, 0)
CONTENT_LENGTH ''
REMOTE_ADDR '192.168.1.102'
SERVER_PORT '80'
REMOTE_PORT '61850'
wsgi.run_once False
SERVER_NAME 'localhost'
wsgi.input <flup.server.fcgi_base.InputStream object at 0x814982410>
DOCUMENT_ROOT '/usr/local/etc/nginx/html'
HTTP_REFERER 'http://192.168.1.30/'
SERVER_ADDR '192.168.1.30'
CONTENT_TYPE 'application/x-www-form-urlencoded'
HTTPS ''
HTTP_ACCEPT_LANGUAGE 'en-US,en;q=0.8'
wsgi.url_scheme 'http'
HTTP_X_REQUESTED_WITH 'XMLHttpRequest'
REQUEST_METHOD 'GET'
DOCUMENT_URI '/jails/edit/3'
REQUEST_URI '/jails/edit/3'
PATH_INFO u'/jails/edit/3'
HTTP_HOST '192.168.1.30'
wsgi.errors <flup.server.fcgi_base.TeeOutputStream object at 0x8149f7d50>
HTTP_ACCEPT_ENCODING 'gzip, deflate, sdch'
HTTP_COOKIE 'sessionid=lpo3tky5o36q888t75ll6toe5nfajkli; csrftoken=RXIWb75si3v2xZkK0KE6J9t2iGUmqCFl; fntreeSaveStateCookie=root%2Croot%2F55%2Croot%2F55%2F56%2Croot%2F55%2F56%2F57%2Croot%2F1%2F5%2Croot%2F56%2Croot%2F56%2F57%2Croot%2F56%2F57%2F58%2F63%2Croot%2F56%2F57%2F58%2F59%2Croot%2F103%2Croot%2F103%2F113%2Croot%2F56%2F57%2F58%2Croot%2F1%2F2%2Croot%2F1%2F6%2Croot%2F104%2Croot%2F104%2F114%2Croot%2F57%2Croot%2F57%2F58%2Croot%2F57%2F58%2F59%2Croot%2F112%2Croot%2F112%2F122%2Croot%2F57%2F58%2F59%2F68%2Croot%2F57%2F58%2F59%2F72%2Croot%2F1%2F8%2Croot%2F114%2Croot%2F114%2F124%2Croot%2F59%2Croot%2F59%2F60%2Croot%2F59%2F60%2F61%2Croot%2F59%2F60%2F61%2F62%2Croot%2F118%2Croot%2F118%2F128%2Croot%2F59%2F60%2F61%2F82%2Croot%2F1%2F9%2Croot%2F61%2Croot%2F61%2F62%2F63%2Croot%2F124%2Croot%2F124%2F134%2Croot%2F61%2F62%2F63%2F64%2Croot%2F61%2F62%2F63%2F76%2Croot%2F220%2Croot%2F61%2F62%2F63%2F84%2Croot%2F224'
GATEWAY_INTERFACE 'CGI/1.1'
CSRF_COOKIE u'RXIWb75si3v2xZkK0KE6J9t2iGUmqCFl'

History

#1 Updated by Bonnie Follweiler almost 4 years ago

  • Assignee set to Kris Moore

#2 Avatar?id=14398&size=24x24 Updated by Kris Moore almost 4 years ago

  • Assignee changed from Kris Moore to Suraj Ravichandran
  • Target version set to 9.10.2-U1

#3 Avatar?id=14398&size=24x24 Updated by Kris Moore almost 4 years ago

  • Priority changed from No priority to Expected

#4 Updated by Suraj Ravichandran almost 4 years ago

  • Status changed from Unscreened to 15

Please attach a debug file as I cannot reproduce this on my machine.

#5 Updated by Gaelan Lloyd almost 4 years ago

  • File debug-gkfs-20161117175020.tgz added

#6 Updated by Suraj Ravichandran almost 4 years ago

Thanks for the debug file, I went through it and found nothing of importance that would help me narrow this down.

Also note, I created the same jails on my own freenas stable 9.10.1-U4 machine and I was able to get it to work, shell into the correct ones and edit too.

to be completely sure I also named them the exact same name (lms, lms-build).

Would you be available for a TeamViewer session to debug this with me?

#7 Updated by Gaelan Lloyd almost 4 years ago

Hi Suraj, I'd be happy to do a Team Viewer session with you. Here is my availability (all times US Pacific time zone)

- Today until 9 AM
- Tomorrow, Sat 19, all day after 8 AM
- Sunday 20, all day after 8 AM
- Monday 21, 7-9 AM

Let me know which time works for you. Thanks so much for helping me out with this!

#8 Updated by Gaelan Lloyd almost 4 years ago

Hi there, any update on when we can do a screen-sharing session to resolve this? At a minimum I'd like to be able to delete these jails from my system. I'm available from 6-9 AM or 4-9 PM Pacific time.

#9 Updated by Gaelan Lloyd almost 4 years ago

  • File deleted (debug-gkfs-20161117175020.tgz)

#10 Updated by Suraj Ravichandran almost 4 years ago

@Gaelan Llyod sorry for the lack of response, can we do it on Monday post 4.30 pst? you choose the time.

#11 Updated by Gaelan Lloyd almost 4 years ago

Yes, I will be online shortly (after 6 PM PST). What software do I need to have set up to do the web meeting, and how will I join?

#12 Updated by Suraj Ravichandran almost 4 years ago

Hi, can we use teamviewer? I am free now for a call if you are up for it

#13 Updated by Gaelan Lloyd almost 4 years ago

Sure, I have installed the program. How do I join?

#14 Updated by Suraj Ravichandran almost 4 years ago

Email your teamviewer id and password to

#15 Updated by Gaelan Lloyd almost 4 years ago

Thanks for the screen-share help session, Suraj. To recap:

  • Somehow the two jails had the same ID.
  • Manually changing the duplicated jail ID in the file system resolved the issue.
  • Suraj mentioned that he would review the code to see if there's a race condition or something else that might explain what could cause two jails to be created with the same ID.
  • Suraj mentioned that we should keep this ticket open for now, even though my issue has been resolved.

I will keep an eye out for any way to recreate this bug and let you know if I find it. I'd enjoy hearing your updates and finding out the cause of this bug.

#16 Updated by David Hines almost 4 years ago

  • Hardware Configuration updated (diff)

I have the same problem described here... even using the same jail names, though I have other jails. jls -v shows
JID Hostname Path
Name State
CPUSetID
IP Address(es)
1 bsd /mnt/z/jails_2/bsd
bsd ACTIVE
2
2 lms-build /mnt/z/jails_2/lms-build
lms-build ACTIVE
3
3 lms /mnt/z/jails_2/lms
lms ACTIVE
4
4 net /mnt/z/jails_2/net
net ACTIVE
5
5 vcs /mnt/z/jails_2/vcs
vcs ACTIVE
6
6 web /mnt/z/jails_2/web
web ACTIVE
7

I can stop & start all the jails except lms and lms-build; thise fail in the same way as shown here, with the python backtrace ending:
File "/usr/local/www/freenasUI/../freenasUI/jails/queryset.py" in get
155. "Query returned multiple Jails"

System updates have been applied since the jails were created, I don't know the exact version used to create them; it can not be too old as the system was built recently, the system boot list dated initial-install as 2016-10-28

#17 Avatar?id=14398&size=24x24 Updated by Kris Moore over 3 years ago

  • Target version changed from 9.10.2-U1 to 9.10.2-U2

#18 Updated by Suraj Ravichandran over 3 years ago

  • Status changed from 15 to Closed: Not To Be Fixed
  • Target version changed from 9.10.2-U2 to N/A

David Hines I can hop on a join.me session with you and fix your issue (email me at suraj_at_ixsystems.com, replace _at_ with )

As to fix this is not relevant anymore since we are moving way from warden and going to iocage and that will solve this issue, thus closing as Not to be fixed

Also available in: Atom PDF