one melo a day

moon indicating dark mode
sun indicating light mode

DSM 6 Adventures: Explosive Update

March 31, 2016

I actually planned to make my next post about setting up Synology’s Directory Server on DSM and use it for authentication with GitBlit, but as John Lennon once said:

Life is what happens while you are busy making other plans

And so it happened that DSM 6 was released. I thought I just update to the new version real quick, enjoy some new features and go on with the plans I have for my home lab, but things went down a very different road.

The Situation

If you look through this blog, you see that I am using my NAS for a little bit more than just for storing and streaming my media. As of now this very blog is hosted on my NAS. Your visit is tracked in Piwik so that I can get some vanity numbers and this is also hosted on my NAS. I run a GitBlit server for my little hobby projects and Jenkins for picking up changes to my resume.json inspired git repository and publish them to my CV website, which makes up the About Me page of this blog. I host these two applications with the help of Tomcat, which runs on my NAS, too. This is true for both before and after the update from DSM 5.2 to version 6.0, but basically all of this was down for the entire weekend and some of it even up until yesterday.

What happened

Afte updating to DSM 6.0, which is basically just a click away in the Control Panel of your update ready Synology NAS device (find the list of supported models here), all of the things described above were not working correctly in one way or another.

WordPress got weird

My WordPress blog was in a more or less broken state. Some posts looked normal but for other posts things were broken. The sidebar did not show up and neither did the comments section. I couldn’t change anything about the theme, because when starting the customizer I was greeted by a dialog telling me that this theme required WordPress version 4.4.2. A look at the dashboard explained the situation: The DSM 6.0 update, which brought along updates for a lot of its packages, also applied an update to the WordPress package, which actually downgraded my WordPress installation from version 4.4.2 down to version 4.3.2. Better yet, the ability to update WordPress itself along with the installed plugins and themes was gone! I found myself stuck with a WordPress 4.3.2 installation that was using a theme and features requiring WordPress 4.4.2. A situation that was obviously leading to some problems. It took me a while to get things working again. I will describe described the path I took to fix this in a separate post. Check it out!

Piwik went down

Piwik simply stopped working entirely. Its package had been updated after the DSM 6.0 update, too. When trying to access Piwik, I was simply greeted by a 404 page. Needless to say that tracking my WordPress visits with Piwik was not working. Thankfully the database itself and all the data was still there. There are still some unsolved implications of the update that I need to go around at the moment, but all in all it is up and running again and tracking my blog. Again, I will describe the situation I encountered and how I solved it in a separate post for the sake of not cluttering this post more than I am already doing.

Tomcat got resetted

With GitBlit and Jenkins the situation was actually quite funny. I was not able to access them through HTTPS, but with HTTP they were still working fine. At least at first glance. I accessed Jenkins and was looking at its empty welcome page. None of my jobs were to be found and no login required for access in the first place. When accessing GitBlit I noticed that I was not able to log in with my usual credentials. Just out of curiosity I tried the default admin/admin credentials and to my surprise I was logged in, but all my repositories had gone. The root cause was the fact that Tomcat had encountered the same fate as almost (or maybe even) all of the installed packages and got updated. In that process several Tomcat configuration files had been overwritten with their vanilla versions and in case you are wondering: No, you do not get asked what to do with your old configuration files before they get wiped during the update process! In the related (yet to be written) post I will summarize the config files that I had customized and lost during the update in the hope of sparing you some pain and allowing you to save them to your backup before updating. Check it out here.

Wrong Expectations

So that is my experience of updating my NAS, used both for media purposes and as a home lab, from DSM 5.2 to 6.0. I was genuinely caught by surprise here. I never had any issues with DSM updates and did not expect to get into so much trouble. But this was my fault! I had wrong expectations! DSM 6.0 update was a big one and updated lots of packages in my case. All of the Synology owned packages updated flawlessly, continue to work without issues and sport nice new features. The problems I encountered are all related to third party packages. A discussion on reddit made a very good analogy on how this is similar to third party packages being provided by an organization backing a Linux repository. I would not expect that organization to have tested every package and all possible update paths for all third party packages they provide. I am simply happy they do package third party software so that I have a convenient way of installing it and I need to take my own precautions when running and updating that software.

On the bright side

Everything is back up and sort of functional again, but I still might use some input from Synology’s support department on some details like the use of Nginx for example. On the bright side I am richer for the experience, learned some new things, need to learn some more, have rethought my backup strategy and will write down those detailed posts about how I fixed the described issues hoping that it might be of use to someone and possibly even spare you some of the trouble I had.