Re: Update OpenNMS from 20.0.1 to 21.0.3 on CentOS 7

JohnD Blackburn <[email protected]>
Newsgroups gmane.network.opennms.general
Message-ID <DB6PR0602MB2902DA0E10D683DDBD671C80CBB70@DB6PR0602MB2902.eurprd06.prod.outlook.com>
Hi Jason,

I’ve found that if you have any customised XML configuration files that would get overwritten by the upgrade, they are not replaced, but rather, the new file that would overwrite the old is named <filename>.rpmnew, and that all you need to do is to find all the .rpmnew files, and compare with your original.  Then it is just a case of merging the differences.  It gets tricky when there has been a change to the default config files that is only a formatting change to make the format of the default config files match that which would be generated when updating via the web interface.

I just do a “find ${OPENNMS_HOME} –name \*.rpm\* -print”

There is usually several .rpmnew and/or .rpmsave files.  I believe the .rpmsave files are copies of your customised config files where that file has been obsoleted, or the install has replaced your customised file, so your changes would need to be reviewed and merged into the new config file if still appropriate for the new version.  Obsoleted files should be referenced in the release notes of the version they were obsoleted in.

We have sandpit, test and UAT opennms servers where we perform the changes 1st to make sure we’re not breaking anything before pushing the config changes to prod.

I’ve never had problems with upgrading once I understood the creation of .rpmnew and .rpmsave files, and how to handle them.

I’ve set our foreign ID in our Servers requisition to the server host name, and setting  “org.opennms.rrd.storeByForeignSource=true” in opennms.properties.  That way, if I need to rebuild an OpenNMS server from scratch, I can restore the rrd directory tree thus preserving most of the historic performance metrics. There will be a gap in the metrics between when the backup was taken and when it was restored of course, but my users were happy with that.

Regards,
John





From: Jonathan Heard [mailto:[email protected]]
Sent: Monday, 16 April 2018 10:27 PM
To: [email protected]
Subject: Re: [opennms-discuss] Update OpenNMS from 20.0.1 to 21.0.3 on CentOS 7

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


Hi Jason,

   The following pages might help you:

https://wiki.opennms.org/wiki/Upgrade_Guide:_20_to_21<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.opennms.org%2Fwiki%2FUpgrade_Guide%3A_20_to_21&data=02%7C01%7Cjohnd.blackburn%40au.abb.com%7Ce034d2cf83754913047808d5a39a5ecc%7C372ee9e09ce04033a64ac07073a91ecd%7C0%7C1%7C636594805774369962&sdata=0DUgFfP3sVBOY1RUdnMzLRKR%2BHQIvFBxDOWxmRdlMrw%3D&reserved=0>   (This isn't really a guide but lists all the config files which change and known-issues)

Personally I've found upgrading OpenNMS to be a very painful and laborious process - You'll need to keep backups of all your customised XML configuration files from /etc/opennms and then re-apply those changes once the new version is installed. If you're lucky it will be a simple case of copying the old files back into place, but you then risk losing useful and/or important default changes from the new version.

You'll almost certainly want to do a backup  - this is documented here: https://wiki.opennms.org/wiki/Backup_and_Restore<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.opennms.org%2Fwiki%2FBackup_and_Restore&data=02%7C01%7Cjohnd.blackburn%40au.abb.com%7Ce034d2cf83754913047808d5a39a5ecc%7C372ee9e09ce04033a64ac07073a91ecd%7C0%7C1%7C636594805774369962&sdata=5C6rqazTHzeebA6O5U8brI4JiGbQs9cHO6Ss4%2B8OW5U%3D&reserved=0>

After updating the OpenNMS packages, the installer will take care of updating the database etc...

${OPENNMS_HOME}/bin/install -dis  (From: https://docs.opennms.org/opennms/releases/21.0.3/guide-install/guide-install.pdf<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.opennms.org%2Fopennms%2Freleases%2F21.0.3%2Fguide-install%2Fguide-install.pdf&data=02%7C01%7Cjohnd.blackburn%40au.abb.com%7Ce034d2cf83754913047808d5a39a5ecc%7C372ee9e09ce04033a64ac07073a91ecd%7C0%7C1%7C636594805774369962&sdata=BBYfuICEA00TihGenpVM9wtrcGBogiOmG2cdHPbRtHs%3D&reserved=0> )
In my personal opinion, I would not bother trying to upgrade but instead would rebuild from scratch and apply any custom config. The setup I run is fully automated using puppet - it took a fair bit of work but I just build a new virtual machine, run puppet and then OpenNMS automatically populates by doing a zone transfer from our DNS. Crucially in our case we don't care about losing historic stats which may be a different situation for you. As I write I'm upgrading from 21.0.2 to 21.0.5 in exactly this way.

Hope this helps - Good luck!
Jonathan
On 09/04/18 20:46, Jason Burgess wrote:
Hello,

  I'm fairly new to OpenNMS as well as Linux... I installed 20.0.1 around maybe 8 months ago and I want to update it to the latest version.  Unfortunately I'm not seeing any specific guides for this.  It looks like I need to update PostgreSQL as well (I'm on 9.2 and would like to go to 10.x) but again, I'm not entirely sure how this making changes to the database could impact the installation.
  Is there a walkthrough I'm missing?  If I do a Yum Update opennms, will that include the dependencies?  Will it migrate the DB to the newer instance, leaving the data intact?

  Thank you.




------------------------------------------------------------------------------

Check out the vibrant tech community on one of the world's most

engaging tech sites, Slashdot.org! http://sdm.link/slashdot<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsdm.link%2Fslashdot&data=02%7C01%7Cjohnd.blackburn%40au.abb.com%7Ce034d2cf83754913047808d5a39a5ecc%7C372ee9e09ce04033a64ac07073a91ecd%7C0%7C1%7C636594805774369962&sdata=Czcw3xtNIzCb4oSEQmJQH%2BxhISkgFNBR%2F8w2Nz8xKwE%3D&reserved=0>




_______________________________________________

Please read the OpenNMS Mailing List FAQ:

http://www.opennms.org/index.php/Mailing_List_FAQ<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.opennms.org%2Findex.php%2FMailing_List_FAQ&data=02%7C01%7Cjohnd.blackburn%40au.abb.com%7Ce034d2cf83754913047808d5a39a5ecc%7C372ee9e09ce04033a64ac07073a91ecd%7C0%7C1%7C636594805774369962&sdata=2Ydsj1sui5Rmh9ke5v6u8LjsuOJz3bAA4oduQBDZgnE%3D&reserved=0>



opennms-discuss mailing list



To *unsubscribe* or change your subscription options, see the bottom of this page:

https://lists.sourceforge.net/lists/listinfo/opennms-discuss<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fopennms-discuss&data=02%7C01%7Cjohnd.blackburn%40au.abb.com%7Ce034d2cf83754913047808d5a39a5ecc%7C372ee9e09ce04033a64ac07073a91ecd%7C0%7C1%7C636594805774369962&sdata=A1%2BlJqsmug1kPPRkNp%2BIBdCSAva8htTTsLIxrUUI5Jo%3D&reserved=0>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-discuss mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.