Upgrading 1.30.2 to 1.32.3 on U18.04

Forum for questions and support relating to the 1.32.x releases only.
Baylink
Posts: 330
Joined: Sun Jun 19, 2005 3:19 am

Upgrading 1.30.2 to 1.32.3 on U18.04

Post by Baylink » Sun Jul 14, 2019 4:54 pm

I've read the install guide and the wiki Easy Way's and I still have a couple questions.

My 1.30.2 install appears to be from APT on the Ubuntu LTS install; the box is checked in Synaptic anyways. But that also appears to be the most recent packaged version for U18.

First: is that correct? If not, I'll look into why my machine thinks so.

If so, then I think I'll take a shot at cross-grading to the Docker install. Any pointers on how to make that pick up the configuration and image archives from the current install? Do I just shut down the current system and install to Docker and start that? Or will there be interim configuration-porting work I'll have to do?

On another 18.04LTS machine, I've recently tried installing Xibo signage, and I discovered that some U18 machines get Docker from Snappy, and that seems to be proving problematic; un-Snapping Docker and reinstalling from APT proved necessary to get that to work; should I expect that here as well?

The list of new features looks particularly neato; I see in there a couple things that I know I hoped for (though i don't remember if I ever mentioned them in public). Zoneminder remains one of my favorite FOSS packages, and it's great to see it getting renewed attention; my thanks to all involved.

Baylink
Posts: 330
Joined: Sun Jun 19, 2005 3:19 am

Re: Upgrading 1.30.2 to 1.32.3 on U18.04

Post by Baylink » Sun Jul 14, 2019 5:00 pm

I suppose I should have said that the 1.30.2 install's been running fine for almost 2 years, with 12 cams at 720p on an i7 with 8GB of RAM and 16GB of swap.

Baylink
Posts: 330
Joined: Sun Jun 19, 2005 3:19 am

Re: Upgrading 1.30.2 to 1.32.3 on U18.04

Post by Baylink » Sun Jul 14, 2019 5:40 pm

<sound="screeching brakes">

Sorry; I apparently did not read *closely* enough the Easy Way, where it notes there's a new PPA for each release. I'll go add

$ add-apt-repository ppa:iconnor/zoneminder-1.32

and try again.

Baylink
Posts: 330
Joined: Sun Jun 19, 2005 3:19 am

Re: Upgrading 1.30.2 to 1.32.3 on U18.04

Post by Baylink » Sun Jul 14, 2019 5:47 pm

Yup, confirmed: I'm a doofus.

Isaac's PPA now shows up in Synaptic as an upgrade, and I'll run it tonight when I have some time free. Thanks again to Isaac for maintaining a PPA for the package. ${EXCUSE}, but I'll chip in some coin when I can.

( Just now, the variable is filled with "being evicted after 28 years cause my landlord sold to a flipper and didn't tell me." )

bbunge
Posts: 2442
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Upgrading 1.30.2 to 1.32.3 on U18.04

Post by bbunge » Sun Jul 14, 2019 6:36 pm

Run the upgrade from a command line and stop Zoneminder first: service zoneminder stop

Since Ubuntu 18.04 did not have Zoneminder in its release make sure you remove any prior PPA.

Baylink
Posts: 330
Joined: Sun Jun 19, 2005 3:19 am

Re: Upgrading 1.30.2 to 1.32.3 on U18.04

Post by Baylink » Sun Jul 14, 2019 10:46 pm

'Remove the old PPA first'. Great tip!

The upgrade script, will it automatically unwind the overlay mount thingamajig? Or am I going to have to do that manually before I start the new version?

bbunge
Posts: 2442
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Upgrading 1.30.2 to 1.32.3 on U18.04

Post by bbunge » Mon Jul 15, 2019 1:13 am

Baylink wrote:
Sun Jul 14, 2019 10:46 pm
'Remove the old PPA first'. Great tip!

The upgrade script, will it automatically unwind the overlay mount thingamajig? Or am I going to have to do that manually before I start the new version?
Not sure what you mean by "overlay mount thingamajig" and don't think there is a script involved. Doing and apt upgrade once the 1.32 PPA is added should do it. If you mean the database upgrade, yes, the zoneminder-1.32.3 .deb package will upgrade the database.

Baylink
Posts: 330
Joined: Sun Jun 19, 2005 3:19 am

Re: Upgrading 1.30.2 to 1.32.3 on U18.04

Post by Baylink » Mon Jul 15, 2019 2:27 am

I mean the practice which results in this in my fstab:

/zmdata/1/zoneminder/images /var/cache/zoneminder/images none defaults,bind 0 2
/zmdata/1/zoneminder/events /var/cache/zoneminder/events none defaults,bind 0 2

recommended for 1.30. I know there's a ZM term of art for that, but I can't remember it.

[ /zmdata/1 is a mount point in the root partition. It was expected at install time I might need more than one data drive, so I pushed it down a layer.

# and the ZM data is on /dev/sda3
/dev/sda3 /zmdata/1 ext4 errors=remount-ro 0 2
]

I see that this practice is now deprecated; my question is will the 1.32.3 upgrade script convert it to whatever's preferred now, or will it expect me to do so, and before or after I run it?

The last entry in this wiki article:

https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way

mentions the new PPA, but doesn't talk about what the automatic upgrade process will *do*; is there something else I should also have read?

User avatar
iconnor
Posts: 831
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Upgrading 1.30.2 to 1.32.3 on U18.04

Post by iconnor » Mon Jul 15, 2019 2:48 pm

The old methods should still work. You can switch over to the new ways if you want.

Installing a new version installs new files, updates some db entries. We generally try not to change any settings.

Baylink
Posts: 330
Joined: Sun Jun 19, 2005 3:19 am

Re: Upgrading 1.30.2 to 1.32.3 on U18.04

Post by Baylink » Mon Jul 15, 2019 3:27 pm

Ok.

So I should be able to

1) Bring down 1.30
2) Remove the old PPA
3) $ sudo apt upgrade
4) Bring up 1.32.3 and let it do it's upgradingly stuff
5) Bring it back down again once it's done, and then
6) Unmount those 2 deep mounts and put the relevant paths in the configuration manually, at my leisure?

Do I understand it correctly?

bbunge
Posts: 2442
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Upgrading 1.30.2 to 1.32.3 on U18.04

Post by bbunge » Mon Jul 15, 2019 4:30 pm

No, your system should work without any mount changes. If it works under 1.30.x it will work under 1.32.x

Oh, Using a systemd mount is safer than fstab mount as you can control Zoneminder to start after all the mounts are verified.

https://wiki.zoneminder.com/Common_Issu ... ive_or_NAS

Baylink
Posts: 330
Joined: Sun Jun 19, 2005 3:19 am

Re: Upgrading 1.30.2 to 1.32.3 on U18.04

Post by Baylink » Mon Jul 15, 2019 4:40 pm

Oh, this is systemd-related?

systemd is evil. I'll stick with the mounts I have. Thanks. :-)

Baylink
Posts: 330
Joined: Sun Jun 19, 2005 3:19 am

Re: Upgrading 1.30.2 to 1.32.3 on U18.04

Post by Baylink » Tue Jul 16, 2019 1:25 am

In work. Turns out that the old PPA file in the sources-list.d was automagically disabled by... somebody.

Baylink
Posts: 330
Joined: Sun Jun 19, 2005 3:19 am

Re: Upgrading 1.30.2 to 1.32.3 on U18.04

Post by Baylink » Tue Jul 16, 2019 1:35 am

Well, what a bummer.

A number of steps in the autoupgrade failed, not including the DB upgrades, and for some reason, all the logging scroll has disappeared out of my terminal scrollback buffer, so I can't see (or post) it.

Does the autoupgrade script tee that off to somewhere?

The most important part, according to journalctl -xe, is that it thinks the DB is still the old version. Hmmm.

Ok; here's a manual run of zmupdate.pl, run from sudo:

Code: Select all

jra@pano:~$ sudo zmupdate.pl

Initiating database upgrade to version 1.32.3 from version 1.30.4

Please ensure that ZoneMinder is stopped on your system prior to upgrading the database.
Press enter to continue or ctrl-C to stop :

Do you wish to take a backup of your database prior to upgrading?
This may result in a large file in /tmp/zm if you have a lot of events.
Press 'y' for a backup or 'n' to continue : y
Creating backup to /tmp/zm/zm-1.30.4.dump. This may take several minutes.
Database successfully backed up to /tmp/zm/zm-1.30.4.dump, proceeding to upgrade.

Upgrading database to version 1.32.3
Loading config from DB 223 entries
Saving config to DB 223 entries
Upgrading DB to 1.31.0 from 1.30.4

Database successfully upgraded to version 1.31.0.
Upgrading DB to 1.31.1 from 1.30.4

Database successfully upgraded to version 1.31.1.
Upgrading DB to 1.31.2 from 1.30.4

Database successfully upgraded to version 1.31.2.
Upgrading DB to 1.31.3 from 1.30.4

Database successfully upgraded to version 1.31.3.
Upgrading DB to 1.31.4 from 1.30.4

Database successfully upgraded to version 1.31.4.
Upgrading DB to 1.31.5 from 1.30.4

Database successfully upgraded to version 1.31.5.
Upgrading DB to 1.31.6 from 1.30.4

Database successfully upgraded to version 1.31.6.
Upgrading DB to 1.31.7 from 1.30.4

Database successfully upgraded to version 1.31.7.
Upgrading DB to 1.31.8 from 1.30.4

Database successfully upgraded to version 1.31.8.
Upgrading DB to 1.31.9 from 1.30.4

Database successfully upgraded to version 1.31.9.
Upgrading DB to 1.31.10 from 1.30.4

Database successfully upgraded to version 1.31.10.
Upgrading DB to 1.31.11 from 1.30.4

Database successfully upgraded to version 1.31.11.
Upgrading DB to 1.31.12 from 1.30.4

Database successfully upgraded to version 1.31.12.
Upgrading DB to 1.31.13 from 1.30.4

Database successfully upgraded to version 1.31.13.
Upgrading DB to 1.31.14 from 1.30.4

Database successfully upgraded to version 1.31.14.
Upgrading DB to 1.31.15 from 1.30.4

Database successfully upgraded to version 1.31.15.
Upgrading DB to 1.31.16 from 1.30.4

Database successfully upgraded to version 1.31.16.
Upgrading DB to 1.31.17 from 1.30.4

Database successfully upgraded to version 1.31.17.
Upgrading DB to 1.31.18 from 1.30.4

Database successfully upgraded to version 1.31.18.
Upgrading DB to 1.31.19 from 1.30.4
ERROR 1370 (42000) at line 1: alter routine command denied to user 'zmuser'@'localhost' for routine 'zm.update_storage_stats'
Output:
Command 'mysql -hlocalhost -uzmuser -p"zmpass" zm < /usr/share/zoneminder/db/zm_update-1.31.19.sql' exited with status: 1
jra@pano:~$
I note that all those lines say "from 1.30.4".

Does that mean that *none* of them actually did any updating? There's a password in my /etc/zm/zm.conf, and it's apparently valid, since I could manually pull a dump using it.

Or is there a missing GRANT on my DB?

Baylink
Posts: 330
Joined: Sun Jun 19, 2005 3:19 am

Re: Upgrading 1.30.2 to 1.32.3 on U18.04

Post by Baylink » Thu Jul 18, 2019 6:02 pm

There was a missing GRANT on my DB, likely.

I followed the instructions here, and reran zmupdate.pl as root, and it ran ok this time, and zm restarted and I can access it, and all my monitors are there, and all is well.

Perhaps those commands should be added to the update script?

Sidenote: it really *is* disconcerting that the zmupdate script says

Updating from $ORIGINAL_VERSION to $NEW_VERSION

at every step; it's something of a red herring for diagnosis -- inasmuch as that's what it did to me on this successful run too, I assume it's purposeful. Perhaps the maintainer could comment on how hard it would be to make each step's message contain the version number the previous step successfully upgraded to, instead?

Any event*, this is CLOSED FIXED; thanks for the help, folks.

[ * Pun entirely intentional, yes ]

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests