Project

General

Profile

Bug #7408

can't install plugins

Added by Djordje Kosanovic over 5 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Nice to have
Assignee:
John Hixson
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:
ChangeLog Required:
No

Description

I just updated from version 9.2.1.5 to 9.3 via GUI. I tried after the update to install transmission plugin, but got the following error.

Jan 6 15:33:58 freenas warden: Building new Jail... Please wait...
Jan 6 15:33:58 freenas warden: zfs clone Storage/jails/.warden-template-pluginjail@clean Storage/jails/transmission_1
Jan 6 15:33:58 freenas warden: ERROR: Failed creating clean ZFS base clone
Jan 6 15:33:58 freenas manage.py: [middleware.exceptions:38] [MiddlewareError: Failed to install plugin: cannot open 'Storage/jails/.warden-template-pluginjail@clean': dataset does not exist
ERROR: Failed creating clean ZFS base clone
]

Then I tried to install another plugin which failed with the same message. I already have 3 jails with different plugins that run fine (plex, teamspeak server and AMP server).

Associated revisions

Revision 1ad3c791 (diff)
Added by John Hixson over 5 years ago

Add mtree field to jail templates Ticket: #7408

Revision 694036b6 (diff)
Added by John Hixson over 5 years ago

Use mtree to verify jail templates - Code has been checked into the freenas-jails repo to generate mtree files when templates are build. These should be upload with the templates. - Downloading of the mtree file as well as when the mtree check is being done should be hooked as steps in the UI during the create process. Coming soon. - This works good for now ;-) Ticket: #7408

Revision aaa24a2a (diff)
Added by John Hixson over 5 years ago

Hook mtree downloading and checking into the progress meter Ticket: #7408

Revision cc2aa8b2 (diff)
Added by John Hixson over 5 years ago

Add mtree field to jail templates Ticket: #7408 (cherry picked from commit 1ad3c7919bd3b9bdddfc84386bb338f49b194217)

Revision d953597f (diff)
Added by John Hixson over 5 years ago

Use mtree to verify jail templates - Code has been checked into the freenas-jails repo to generate mtree files when templates are build. These should be upload with the templates. - Downloading of the mtree file as well as when the mtree check is being done should be hooked as steps in the UI during the create process. Coming soon. - This works good for now ;-) Ticket: #7408 (cherry picked from commit 694036b6793be5fc95e6353a64b178fae60a2158)

Revision 3d463096 (diff)
Added by John Hixson over 5 years ago

Hook mtree downloading and checking into the progress meter Ticket: #7408 (cherry picked from commit aaa24a2a990a1a7f1afa030107bedc30fe474a3a)

Revision bd50d3ff (diff)
Added by John Hixson over 5 years ago

Add mtree field to jail templates Ticket: #7408 (cherry picked from commit 1ad3c7919bd3b9bdddfc84386bb338f49b194217)

Revision a13be664 (diff)
Added by John Hixson over 5 years ago

Use mtree to verify jail templates - Code has been checked into the freenas-jails repo to generate mtree files when templates are build. These should be upload with the templates. - Downloading of the mtree file as well as when the mtree check is being done should be hooked as steps in the UI during the create process. Coming soon. - This works good for now ;-) Ticket: #7408 (cherry picked from commit 694036b6793be5fc95e6353a64b178fae60a2158)

Revision a73ad9ca (diff)
Added by John Hixson over 5 years ago

Hook mtree downloading and checking into the progress meter Ticket: #7408 (cherry picked from commit aaa24a2a990a1a7f1afa030107bedc30fe474a3a)

History

#1 Updated by Jordan Hubbard over 5 years ago

  • Assignee changed from Djordje Kosanovic to John Hixson

That's a weird error. Over to John to look at.

#2 Updated by John Hixson over 5 years ago

  • Status changed from Unscreened to Screened

#3 Updated by Cyber Jock over 5 years ago

Can you please provide a debug file for your system? This file can be obtained from system -> advanced -> save debug.

Thanks.

#4 Updated by Djordje Kosanovic over 5 years ago

  • File debug-freenas-20150127064258.tgz added

Sorry for the very late reply

#5 Updated by Djordje Kosanovic over 5 years ago

Now when I had some time to investigate, I saw that the 'pluginjail' template was corrupted or not installed correctly during the upgrade to 9.3. So I killed it with warden

warden template delete pluginjail

and reinstalled it

warden template create -nick pluginjail -tar http://download.freenas.org/jails/9.3/x64/freenas-pluginjail-9.3-RELEASE.tgz

again and now it works. Since I am a bit of a newb on BSD I feel pretty proud of myself :)

#6 Updated by Jordan Hubbard over 5 years ago

Good detective work! This does raise questions for us, however, since templates are installed as a stream of bits with no checksumming or validation on our part:

1. Is there any way for us to store a list of checksums to validate a template install with after it's extracted (since we do it as a stream rather than downloading the template file first, there's no way to just validate the file) - seems like a lot of "mystery plugin problems" might be avoided by adding that seatbelt. We could also allow this to be done at any time, just as the system package validation check works now, to detect a jail instance that had gotten altered or corrupted.

Alternately, we could do template installs over SSL, which would catch corruption in the stream itself, and at least unwind a failed template install.

2. Would it be easy for us to add UI for deleting cached templates (in case corruption was suspected in an already-downloaded template) such that the user wouldn't have to go to the CLI and start playing with warden, as this user was forced to do?

#7 Updated by Jordan Hubbard over 5 years ago

  • Target version changed from 9.3-RELEASE to Unspecified

#8 Updated by John Hixson over 5 years ago

I will look into ways of doing this since it seems to occur a little more frequently than I'd like.

#9 Updated by John Hixson over 5 years ago

I haven't yet had a chance to think about this. It's still in my queue, however ;-)

#10 Updated by John Hixson over 5 years ago

This is still on hold

#11 Updated by John Hixson over 5 years ago

This is still on hold.

#12 Updated by John Hixson over 5 years ago

^^^

#13 Updated by Djordje Kosanovic over 5 years ago

My body just updated his company's server to 9.3 from 9.1.something and he hit the same problem. In his case after the update the whole template directory was almost empty part for some empty folders, so I did once again what I wrote in my last post and now he can install plugins.

Is it possible that during the installation/update another process kills the process of creating the template?

#14 Updated by John Hixson over 5 years ago

I'm looking into this right now. I think I have a solution.

#15 Updated by John Hixson over 5 years ago

  • Status changed from Screened to Investigation

#16 Updated by John Hixson over 5 years ago

So the fix for this (and why I never thought of it previously), is to create an mtree file for each jail, then compare the extracted template against the mtree file using mtree. I should be able to get this hammered out at some point this week.

#17 Updated by John Hixson over 5 years ago

I'm working on this today. Hopefully I can have it ready by tonight ;-)

#18 Updated by John Hixson over 5 years ago

see commit:freenas-jails|951497b4463dc6d938e5d8391e4ea693e79b220c. Half way there. I've added mtree files to the jails build. I'm uploading the new jails and mtree files now. Once there, I can roll the logic into the warden template code to use them.

#19 Updated by John Hixson over 5 years ago

I've committed the mtree checking code to verify the template was extracted correctly. I'm working on hooking it into the UI now.

#20 Updated by John Hixson over 5 years ago

  • Status changed from Investigation to Ready For Release

Hooked into UI and progress meter. I've tested this and it looks good.

#21 Updated by Josh Paetzel over 5 years ago

  • ChangeLog Entry updated (diff)

#22 Updated by Jordan Hubbard over 5 years ago

  • ChangeLog Entry updated (diff)

#23 Updated by Jordan Hubbard over 5 years ago

  • Status changed from Ready For Release to Resolved

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

  • Target version changed from Unspecified to N/A

#25 Updated by Dru Lavigne almost 3 years ago

  • File deleted (debug-freenas-20150127064258.tgz)

Also available in: Atom PDF