Umbraco-CMS: [v8] Presence of a connection string can cause boot failure
In v8 if you have a connection string set but haven’t configured the DB yet/haven’t run the installer, a BootFailure will be reported and result in a crash.
The problem comes from here: https://github.com/umbraco/Umbraco-CMS/blob/temp8/src/Umbraco.Core/Runtime/CoreRuntime.cs#L345-L353 (https://github.com/umbraco/Umbraco-CMS/blob/84e0d0571fdbb9b8ddf354bd8e9f088806859345/src/Umbraco.Core/Runtime/CoreRuntime.cs#L345-L353 is the current commit).
Basically, when it’s trying to set the runtime state level if there is a connection string but it fails to connect an exception is thrown which results in the BootLoader never running.
I don’t think this should be treated as an exception, but it should be treated as a need to run the installer. The scenarios where this could come up are using tools like Chauffeur or uSync to setup an instance from a fresh clone from git.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 22 (21 by maintainers)
Commits related to this issue
- Adding a hack for https://github.com/umbraco/Umbraco-CMS/issues/3935 — committed to aaronpowell/Chauffeur by aaronpowell 5 years ago
It’s been a while since I’ve touched Chauffeur for v8 so it may not be 100% accurate as of the current v8 release, but here’s what I did:
RuntimeOptionsin the entry point: https://github.com/aaronpowell/Chauffeur/blob/umbraco-v8/src/Chauffeur/Host/UmbracoHost.fs#L18-L19CoreRuntime: https://github.com/aaronpowell/Chauffeur/blob/umbraco-v8/src/Chauffeur/Host/ChauffeurRuntime.fsBootmethod (https://github.com/aaronpowell/Chauffeur/blob/umbraco-v8/src/Chauffeur/Host/ChauffeurRuntime.fs#L14-L23) which registers some of my own types and then calls the default implementationI also have some custom components (such as https://github.com/aaronpowell/Chauffeur/blob/umbraco-v8/src/Chauffeur/Components/ChauffeurComponent.fs) which registers my own types in the container.