Yorick
Wizard
- Joined
- Nov 4, 2018
- Messages
- 1,912
I got my Plex Media Server plugin updated. This wasn't entirely intuitive, so here's the process I followed.
https://www.ixsystems.com/blog/december-freenas-plugins-updates/ is the blog post that mentions update from CLI.
Update March 2020: The jail name seems to be incidental, it's the plugin name that matters. Ignore the original post, which applied to 11.2 only. If you're creating the plugin in 11.3-U1 or later, you'll be fine.
If it was created before that, you should be able to 'iocage set plugin_name="plexmediaserver" plex_jail_name' or, of course, 'iocage set plugin_name="plexmediaserver-plexpass" plex_jail_name' if you're running the "beta" code.
If iocage set doesn't do the trick, look at /mnt/MYPOOL/iocage/jails/MYPLEXJAIL and edit config.json and make sure the plugin_name is set to either "plexmediaserver" or "plexmediaserver-plexpass", depending on which package you are using in the plugin.
If there is a plex.json in the same location as config.json, rename it to plexmediaserver.json, or plexmediaserver-plexpass.json if you use the beta code.
And that should resolve all your upgrade woes. I think 11.2 might have done that behind the scenes when renaming a plugin jail, and that's why what I describe below worked for me.
--
If you are on 11.3 stop here and read above, the below is not expected to help in 11.3.
In my case, I had Plex Media Server (Plexpass) installed, and it came in as a jail named "plex". TL;DR: That naming was the problem.
Attempting to update from UI (11.2-U1) claimed it was successful, but the Plex version hadn't changed.
Attempting to update from CLI complained about a missing plex.json, which was the required clue.
To fix:
Edit: I stopped the jail before doing this, and started it after. I'm assuming it needs to be stopped, but I didn't try it while running.
Open CLI from UI
# Ctrl-Insert and Shift-Insert are your friend to avoid excessive typing - allows copy/paste in the web CLI window
iocage list
# Get the name of your jail. In my case it was plex, adjust as necessary on your system
iocage rename plex plexmediaserver-plexpass
# That step will differ depending on which you want: Rename to plexmediaserver or to plexmediaserver-plexpass
# The goal here is to match the json. See also /mnt/MYMOUNTPOINT/iocage/.plugin_index
# Edit: On 11.3 the json files are in /mnt/MYMOUNTPOINT/iocage/.plugins/github_com_freenas_iocage-ix-plugins_git/
iocage list
# Just to verify that worked
iocage snaplist plexmediaserver-plexpass
# Or indeed plexmediaserver, whichever one you have. If this is empty great; if not, we need to remove a snapshot first
iocage snapremove plexmediaserver-plexpass -n NAME_THAT_SNAPLIST_SHOWED_YOU
# Otherwise you just get "we already have a snapshot" on update attempt, not very helpful.
iocage update plexmediaserver-plexpass
# Or plexmediaserver, if that's what you have. This should now show messages about updating your plex plugin, as the name matches the .json
Edit: "iocage upgrade plexmediaserver-plexpass -r 11.3-RELEASE" worked for me after moving from 11.2 to 11.3
It's quite possible that after rename and removal of previous-failed-attempt snapshot, the UI update button would have worked just as well. I didn't test that.
Edit: UI update works with renamed jail in 11.3; no luck for me in 11.2
https://www.ixsystems.com/blog/december-freenas-plugins-updates/ is the blog post that mentions update from CLI.
Update March 2020: The jail name seems to be incidental, it's the plugin name that matters. Ignore the original post, which applied to 11.2 only. If you're creating the plugin in 11.3-U1 or later, you'll be fine.
If it was created before that, you should be able to 'iocage set plugin_name="plexmediaserver" plex_jail_name' or, of course, 'iocage set plugin_name="plexmediaserver-plexpass" plex_jail_name' if you're running the "beta" code.
If iocage set doesn't do the trick, look at /mnt/MYPOOL/iocage/jails/MYPLEXJAIL and edit config.json and make sure the plugin_name is set to either "plexmediaserver" or "plexmediaserver-plexpass", depending on which package you are using in the plugin.
If there is a plex.json in the same location as config.json, rename it to plexmediaserver.json, or plexmediaserver-plexpass.json if you use the beta code.
And that should resolve all your upgrade woes. I think 11.2 might have done that behind the scenes when renaming a plugin jail, and that's why what I describe below worked for me.
--
If you are on 11.3 stop here and read above, the below is not expected to help in 11.3.
In my case, I had Plex Media Server (Plexpass) installed, and it came in as a jail named "plex". TL;DR: That naming was the problem.
Attempting to update from UI (11.2-U1) claimed it was successful, but the Plex version hadn't changed.
Attempting to update from CLI complained about a missing plex.json, which was the required clue.
To fix:
Edit: I stopped the jail before doing this, and started it after. I'm assuming it needs to be stopped, but I didn't try it while running.
Open CLI from UI
# Ctrl-Insert and Shift-Insert are your friend to avoid excessive typing - allows copy/paste in the web CLI window
iocage list
# Get the name of your jail. In my case it was plex, adjust as necessary on your system
iocage rename plex plexmediaserver-plexpass
# That step will differ depending on which you want: Rename to plexmediaserver or to plexmediaserver-plexpass
# The goal here is to match the json. See also /mnt/MYMOUNTPOINT/iocage/.plugin_index
# Edit: On 11.3 the json files are in /mnt/MYMOUNTPOINT/iocage/.plugins/github_com_freenas_iocage-ix-plugins_git/
iocage list
# Just to verify that worked
iocage snaplist plexmediaserver-plexpass
# Or indeed plexmediaserver, whichever one you have. If this is empty great; if not, we need to remove a snapshot first
iocage snapremove plexmediaserver-plexpass -n NAME_THAT_SNAPLIST_SHOWED_YOU
# Otherwise you just get "we already have a snapshot" on update attempt, not very helpful.
iocage update plexmediaserver-plexpass
# Or plexmediaserver, if that's what you have. This should now show messages about updating your plex plugin, as the name matches the .json
Edit: "iocage upgrade plexmediaserver-plexpass -r 11.3-RELEASE" worked for me after moving from 11.2 to 11.3
It's quite possible that after rename and removal of previous-failed-attempt snapshot, the UI update button would have worked just as well. I didn't test that.
Edit: UI update works with renamed jail in 11.3; no luck for me in 11.2
Last edited: