Openhabian OH3 migration feedback/tip

This burned a lot more of my time that it should have, so I wanted to add a post that others in a similar situation might find.

I was getting frustrated that OH3 was not picking up changes I was making to rules files, or even when I deleted them.

In my case, I guess the upgrade procedure had copied the files from /srv/openhab2-conf/ or /etc/openhab2 to /etc/openhab and was monitoring the new location for changes. My Samba share was still pointing at the old location, so no amount of changing or deleting made any difference. I only worked it out when I ran a find in bash and discovered the parallel locations where all the rules were being held. This seems obvious now, but I’m fairly sure I didn’t see any explicit reference to this in any migration documentation or OpenHabian prompts.

It would have been ideal if the upgrade script had recognized that I had Samba shares pointing at what was now a legacy location. Even if it had simply removed these shares, I would have immediately gone back to openhab-config and re-run the Samba configuration action.

I hope this post saves someone an hour or two!

The change from openhab2 to openhab is mentioned in the release notes, but it doesn’t directly point out that this will be an issue for Samba. That’s tricky, because it could be an issue for lots of things that affect individual users. Also, I suspect that people who are upgrading now aren’t looking closely at release notes from 3.0.0, since it’s no longer the most recent version. I suppose it could have been mentioned in the breaking changes.

That aside, a post in the community won’t do much to help future upgraders. I’d instead suggest looking for the right spot(s) to add this to the documentation (I don’t know what those spots are), and then submitting the edit yourself. Otherwise, upgraders won’t find your useful tip until after they’ve gone through the same experience and come here looking for answers. :wink:

There’s a great post that can help you get started with documentation, and once you do it a couple of times it’s easy.

So did you use the openHABian menu option to migrate as the release instructions told you to ?
It takes care of this change.
There is no need to manually do it or mention it in any docs.

1 Like

@mstormi Yes, I performed the update fully within openhab-config in openHABian. If the Samba shares were supposed to be updated, I can only say that it did not work in my case. Sorry, I imagine too much time has passed now to give you any more specific information. I finally fixed it by rerunning the script in openhab-config and then rebooting. The changes did not seem to take effect until after the reboot.

@rpwong I would love to contribute to the documentation once I understand what the expected behaviour is. At the moment, the migration page only lists three simple steps to upgrade with OpenHABian, which does seem to suggest that it’s “fire and forget”. The breaking changes list is part of the release notes, which I don’t think are open to public edits or pull requests. This might be the best place for any mention of this issue, because it doesn’t currently call out the change of config directory or the possibility that Samba shares will no longer point at the active configuration.

Hello Markus, as info for you: I upgraded yesterday via openhabian-config menue entry 03 and my shares were also not updates. I had to run the menu entries 13 and 15 after the upgrade and the srv/logs folder was also missing. I added this folder today via a mount command.
I first upgraded openhab and in a next step Linux from Stretch to Buster. Maybe this had an impact …