Small but effective points to notice during implementation in Cloud- Part 3 (Cloud drive)
This is the continuation of the thread "Small but effective points to notice during implementation in Cloud". The last entry of this thread could be found here.
As we know quite a few times application/service deployed in the cloud behave differently than while executed in dev-fabric. And accordingly we need to use azure diagnostic APIs or any user defined way of error logging to go to the root cause of any issue. Below are a few error messages which we noticed while deploying/running application/service in the cloud. These error messages are simply having the error codes and sometime it became very difficult for me to understand their meaning in the first time...
1. "Unknown Error HRESULT=D0000185"- this error pops up if one is trying to create a cloud drive giving the page blob uri and if the page blob already exists.
a. When the method "Create" is called on the CloudDrive object instance, it also tries to create the page blob to be mounted as the drive and if for the concerned container there is already a blob by the same name, this error code is thrown.
b. So before calling Create method it is always better to first check there exists any blob by same name. Unlike the Table storage service API which doesn't throw any error if one tries to create a table by the same name.
c. Deleting a existing page (if any) and then creating may not be the best approach as azure storage service takes a few seconds to synchronize and accordingly may throw some other error if we need to create a page blob by the same name.
2. "Unknown Error HRESULT=D0000033"- this is because of a bug in the InitializeCache code this comes when we call Mount() on the CloudDrive instance and this happens if the cache directory ends in a trailing slash ('\').
a. So it is recommended to remove the trailing back slash while initializing the cache may be using TrimEnd('\\') on the RootPath or add a sub-directory to the RootPath without the ending "\".
3. "Unknown Error HRESULT=80070050"- this generally comes while using the cloud drive in the dev fabric.
a. When we use dev-fabric to access cloud drive, even after configuring to use the cloud storage account for the drive creation, local file system is used. The location can be identified from the development storage utility (fileà open azure drive folder...). This happens to be sometime like à "...\wadd\<storage account name>\<drive blob container name>\<page blob name>\. So always delete the folder by the name of the storage account at the said local location.
4. "Unknown Error HRESULT=D0000708"- comes when
a. We are trying to mount a page blob which is yet not created.
b. Or we are trying to mount a page blob in read/write mode and it is already mounted by another VM role in read/write mode. In this case one may create snapshot of the already mounted page blob and then mount it if needed.



