Is there anyone interested helping me test the upcoming changes I have?
I don’t yet have permission from management but first want to see if there is community interest in double checking my work before it gets committed to production. If we find an issue, I can correct and repost in very short cycle time.
To share what it will look like: (please ignore the version of PMS used)
chuck@plexdev:~/git/output-all$ sudo dpkg -i plexmediaserver_1.18.5.2194-74214c250_amd64.deb
(Reading database ... 187293 files and directories currently installed.)
Preparing to unpack plexmediaserver_1.18.5.2194-74214c250_amd64.deb ...
PlexMediaServer install: Pre-installation Validation.
PlexMediaServer install: Warning: Multiple override files found in "/etc/systemd/system/plexmediaserver.service.d". PMS may not function as expected.
PlexMediaServer install: Files found are: 01.conf a file.conf local.conf one-dummy.conf override.conf two-dummy.conf
PlexMediaServer install: Selected: "/etc/systemd/system/plexmediaserver.service.d/override.conf".
PlexMediaServer install: Warning: "/var/lib/plexmediaserver/Library/Application Support" isn't owned by "chuck", UID: 1026. Found "plex", UID: 998 instead. Continuing.
PlexMediaServer install: Pre-installation Validation complete. Errors: 0, Warnings: 2
Unpacking plexmediaserver (1.18.5.2194-74214c250) over (1.18.5.2194-74214c250) ...
Setting up plexmediaserver (1.18.5.2194-74214c250) ...
PlexMediaServer install:
PlexMediaServer install: Now installing based on:
PlexMediaServer install: Installation Type: Update
PlexMediaServer install: Process Control: Systemd
PlexMediaServer install: Plex User: chuck
PlexMediaServer install: Plex Group: plex
PlexMediaServer install: Video Group: video
PlexMediaServer install: Metadata Dir: /var/lib/plexmediaserver/Library/Application Support
PlexMediaServer install: Temp Directory: /tmp (set in Preferences.xml)
PlexMediaServer install: Lang Encoding: en_US.UTF-8
PlexMediaServer install: Config file used: /etc/systemd/system/plexmediaserver.service.d/override.conf
PlexMediaServer install: Transcoding HW: Found
PlexMediaServer install:
PlexMediaServer install: Completing final configuration.
PlexMediaServer install: PlexMediaServer-1.18.5.2194-74214c250 - Installation successful. Errors: 0, Warnings: 2
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
chuck@plexdev:~/git/output-all$
Sorry for the delay in getting back to this. Work yanked me away for a bit. You’re right on in all regards. It is indeed an upstart system. Does that mean upgrades won’t be supported in the short term? I don’t know what the previous installations did, but I do see the plex media server service in the systemd path (/etc/systemd/system/plexmediaserver.service). The output surrounding what you asked is below.
Much appreciated!
jimmy@jester:~ cat /proc/1/comm
init
jimmy@jester:~ ls -la /sbin/init
lrwxrwxrwx 1 root root 7 May 19 2016 /sbin/init -> upstart
Back in here as an update knocked my server offline and I had to go manually set LinuxContainer=1 in plexinstaller.log again.
systemd seems to think it is, based on https://github.com/systemd/systemd/blob/a859abf062cef1511e4879c4ee39c6036ebeaec8/src/basic/virt.c#L473 which is the container-detecting code for the systemd-detect-virt command. It looks like that still might not be exhaustive, but egrep -zi "^container=.+$" /proc/1/environ seems like it should pick up the ones that set the container variable without caring much what flavor of container it is.
I cannot use systemd-detect-virt as not all systems will have systemd. Some will have init.
What you should find in the *preinst script is:
# Independently, evaluate if in a LXC. This is used later in installation to avoid UDEV trigger bug
if [ "$(grep -i 'container=lxc' /proc/1/environ )" != "" ]; then
LinuxContainer=1
fi
# Validate the override file contents if it exists
if [ $HaveOverride -eq 1 ]; then
Which containerization do you use for the LXC ?
I can minimize the grep to be container= and accept that.
Yeah, I wasn’t intending to suggest that. Would be nice if you could, but I get that you’re trying to support a lot of different environments.
As above, using systemd-nspawn. /proc/1/environ still contains container=systemd-nspawn. My only hesitation with just looking for container= is that the systemd code implies that the var being empty is an indication that we are in fact not in a container, hence my suggestion for grep -zi '^container=.\+$' to avoid a false positive.
root@chuck-container:/# if [ "$(grep -zi '^container=.\+$' /proc/1/environ)" != "" ]; then echo Yes, this is valid; fi
bash: warning: command substitution: ignored null byte in input
Yes, this is valid
root@chuck-container:/#
Yeah, that seems sensible. I added the -z flag assuming it would be necessary to get whole variables with the file being NUL byte separated, but it does seem to work just fine without it.
Hi i need some help to update my plexmediaserver.
It’s a reasonable new installed Ubuntu 18.04.4 LTS 64 bit but the PlexMediaServer folder is moved from an older server.
it run on a Intel® Core™ i5-7400T CPU with hardware trancode enabled.
sudo dpkg -i plexmediaserver_1.18.8.2468-5d395aa9d_amd64.deb
[sudo] password for plex:
(Reading database ... 159641 files and directories currently installed.)
Preparing to unpack plexmediaserver_1.18.8.2468-5d395aa9d_amd64.deb ...
Removed /etc/systemd/system/multi-user.target.wants/plexmediaserver.service.
PlexMediaServer install: Pre-installation Validation.
dpkg: error processing archive plexmediaserver_1.18.8.2468-5d395aa9d_amd64.deb (--install):
new plexmediaserver package pre-installation script subprocess returned error exit status 2
Created symlink /etc/systemd/system/multi-user.target.wants/plexmediaserver.service → /lib/systemd/system/plexmediaserver.service.
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Errors were encountered while processing:
plexmediaserver_1.18.8.2468-5d395aa9d_amd64.deb
I always get the error 2 in the Pre-installation Validation
it does not create an /tmp/plexinstall.log
/lib/systemd/system/plexmediaserver.service looks like
No, you don’t need one. I’m trying to understand where the error status “2” is coming from.
Do have any IPA services running (e.g. LDAP) ?
If you’d like, we can extract the modules from the DEB file and run it manually to see where it’s causing problems. That will also help me to improve the packaging.