Upgrading docker 2.0 to 2.2 experience

I just upgraded my OH2.0 install, done with an early-ish version of the 2.0 Docker image, to the 2.2.0 image that’s currently available on docker.io. I experienced several challenges and thought I’d share them in case someone else travels the same path:

  • Missing userdata/etc/version.properties file – my 2.0 image didn’t provide this file, and the new image fails hard if it’s missing. I resolved this by copying the file from the 2.2 image and editing all of the version numbers to make them different to trigger the upgrade process. (If I read the upgrade script correctly, any difference in the file is enough to trigger the upgrade process)
  • Stricter syntax checking on sitemaps – my only sitemap file had several syntax issues that the (apparently) more permissive 2.0 parser permitted:
    – Group without item= . (changed to Text)
    – sendFrequency parameters no longer permitted on Slider (removed)
    – Stray entries at bottom of sitemap file (removed)
  • All items exposed to Alexa (via Hue emulation) were duplicated, causing them to stop working. Solution was to delete the duplicate entries using the Alexa app
  • Log files not written (not solved yet)

I haven’t thoroughly checked 2.2 out, but the basics seem to work – control via Alexa and the Android app. I’ll focus on the log issue next.

1 Like

I resolved my log file issue by replacing userdata/etc/org.ops4j.pax.logging.cfg with the copy from userdata.dist.

That revealed a number of issues with rules files, including the use of Locale::default as the first argument to String::format which is apparently no longer valid, and a few cases where rules that were probably broken due to typos were now causing parse errors (i.e., “change” instead of "changed’).

I’m also getting warnings that wildcard imports are deprecated, but I haven’t done the work to sort out which specific ones I need to replace them with. I believe I’m up and running now with the same functionality I had before the upgrade…