Sitecore-Instance-Manager
Sitecore-Instance-Manager copied to clipboard
[SIMCMD] Unable to install an instance if it wasn't properly deleted
Importance:
Critical (I need this issue to be fixed)
I'm using SIMCMD to deploy Sitecore instances on CI. I do like that the simplest command sim.exe install -n mysite
gives me a ready to use instance. But, it appeared that quite often an old instance cannot be properly deleted leaving some garbage website files. Those files prevent further instances installations and make it fail with the following error:
{
"Success": false,
"Message": "Folder already exists: C:\\inetpub\\wwwroot\\mysite",
"Elapsed": "00:00:07.8373647"
}
I'd like to extend the CLI install command to ask a user if the old files need to be deleted first before the installation. That is what happening when one uses the WinApp:
It should be also possible to specify -y
(always Yes) key so that the tool does not wait for the user input and just go ahead with deleting the garbage files.
What do you think about that?
That was left as is intentionally as you first need to delete existing instance using sim delete, and then install. Deleting is quite complicated process so it is better to have it separate.
Yes, it is a complicated process. I often see the following 'deadlock' in my logs where I can neither delete nor install an instance:
[11:20:54][Step 7/11] {
[11:20:54][Step 7/11] "Success": false,
[11:20:54][Step 7/11] "Elapsed": "00:00:00.1951802",
[11:20:54][Step 7/11] "Error": {
[11:20:54][Step 7/11] "ClassName": "System.InvalidOperationException",
[11:20:54][Step 7/11] "Message": "Cannot find instances by name: mysite",
[11:20:54][Step 7/11] "Data": {
[11:20:54][Step 7/11] "names": [
[11:20:54][Step 7/11] "mysite"
[11:20:54][Step 7/11] ]
[11:20:54][Step 7/11] },
[11:20:54][Step 7/11] "StackTrace": [
[11:20:54][Step 7/11] "at SIM.Core.Common.AbstractMultiInstanceActionCommand.GetInstances(String listString)",
[11:20:54][Step 7/11] "at SIM.Core.Common.AbstractMultiInstanceActionCommand.DoExecute(CommandResult result)",
[11:20:54][Step 7/11] "at SIM.Core.Common.AbstractCommand.Execute()"
[11:20:54][Step 7/11] ]
[11:20:54][Step 7/11] }
[11:20:55][Step 7/11] }{
[11:20:55][Step 7/11] "Success": false,
[11:20:55][Step 7/11] "Message": "Folder already exists: D:\\Websites\\mysite",
[11:20:55][Step 7/11] "Elapsed": "00:00:00.0396520"
[11:20:55][Step 7/11] }
I'm trying to delete an instance first, but it fails since there is no IIS host found. Then I'm trying to install an instace, but if fails because there are some garbage website files exist. It happens pretty often and only manual clean up helps in this case. That's annoying.
Any ideas how to deal with that? Thanks.
This is not supported now.