Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correction of File Access Issues #2768

Merged
merged 1 commit into from
May 8, 2019
Merged

Correction of File Access Issues #2768

merged 1 commit into from
May 8, 2019

Conversation

mitchelsellers
Copy link
Contributor

Adjustments to the installer process to resolve issues with Resource File Installation impacting users on Azure (Fixes #2766).

A few highlights on the changes included

  • Cleanup of resource management when writing files inside of the zip loop
  • Adjustment of retry logic, making two changes
    • Adjustment of the retry to attempt for 3.5 seconds, rather than only 1 second for a better opportunity to process the file
    • Changing the file share process to allow others to read/write the file. Rather than just write

This should allow real-time items to read the file, even if we are writing to it. Which should resolve the lock issues.

@mitchelsellers mitchelsellers added this to the 9.4.0 milestone May 8, 2019
Copy link
Contributor

@mtrutledge mtrutledge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Was the timeout that was added the sole fix for Azure or was it in conjunction with the added Using statements?

@mitchelsellers
Copy link
Contributor Author

The azure specific items were two fold.

  1. Bump from 1 -> 3.5 seconds for slower file system
  2. Change file share mode, to allow readers while we write

Really #2 appeared to fix it, but other areas of the installer do 30 second retries, so bumping to 3.5 seconds isn't a huge deal.

The other changes were for readability and standards

Copy link
Contributor

@ohine ohine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome changes @mitchelsellers! Thanks for taking the time to contribute this!

@ohine ohine merged commit db68120 into dnnsoftware:development May 8, 2019
@meetmandeep
Copy link
Contributor

Still getting the error. Tested w/9.4.0.137

Info::Creating backup of previous version - Frameworks\Ckeditor\skins\moono-lisa\editor_iequirks.css
Info::Installation Failed - ResourceFile

2019-05-09 08:31:07.146+00:00 [RD0003FF958210][D:20][T:45][ERROR] DotNetNuke.Services.Installer.Installers.ResourceFileInstaller - System.UnauthorizedAccessException: Access to the path 'D:\home\site\wwwroot\DesktopModules\Mandeeps\Libraries\Common\Frameworks\Ckeditor\skins\moono-lisa\editor_iequirks.css' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at DotNetNuke.Services.Installer.Util.TryToCreateAndExecute(String path, Action`1 action, Int32 milliSecondMax)
at DotNetNuke.Services.Installer.Installers.ResourceFileInstaller.InstallFile(InstallFile insFile)
2019-05-09 08:31:07.208+00:00 [RD0003FF958210][D:20][T:45][ERROR] DotNetNuke.Services.Installer.Log.Logger - Installation Failed - ResourceFile

@mitchelsellers It's also happening with core modules. The following error was logged when upgrading to the 9.4.0.137 build

[RD0003FF958210][D:16][T:132][ERROR] DotNetNuke.Services.Installer.Installers.ResourceFileInstaller - System.UnauthorizedAccessException: Access to the path 'D:\home\site\wwwroot\DesktopModules\Connectors\Azure\connector.htm' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at DotNetNuke.Services.Installer.Util.TryToCreateAndExecute(String path, Action`1 action, Int32 milliSecondMax)
at DotNetNuke.Services.Installer.Installers.ResourceFileInstaller.InstallFile(InstallFile insFile)
2019-05-09 08:19:00.607+00:00 [RD0003FF958210][D:16][T:132][ERROR] DotNetNuke.Services.Installer.Log.Logger - Installation Failed - ResourceFile

@mitchelsellers
Copy link
Contributor Author

mitchelsellers commented May 9, 2019 via email

@meetmandeep
Copy link
Contributor

App Service Plan: P1v2
Configuration: https://snag.gy/zwoTpf.jpg

@mitchelsellers
Copy link
Contributor Author

mitchelsellers commented May 9, 2019 via email

@mtrutledge
Copy link
Contributor

mtrutledge commented May 9, 2019 via email

@meetmandeep
Copy link
Contributor

Same error with Always On off. Database is Standard S0: 10 DTUs

Is there a preferred config for azure. I'm going to provision another app to continue testing.

@mtrutledge This is through DNN > Extensions > Install Extension. Not via Azure Deployment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extension Installation Fails on Azure
4 participants