-
Notifications
You must be signed in to change notification settings - Fork 149
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
WebApplication: Physical path overwritten after desired state applied #587
Comments
You should not have the PhysicalPath as part of the configuration if you do not want to enforce that property. |
Thanks for your reply. I have tried that option and it seems that physical path for xWebApplication is a required property. |
If its a good idea to make physical path optional, I could spend some time on it and try to create a pull request. |
Is there any news here? |
The parameter Community need to update logic in resource, update unit test and creat necessary integration tests. 🙂 Happy to review a PR. |
Thanks for answering. I could get some pointers before actually building this. When creating a website/app, its required. When updating for example the app pool it is not. Alternative: A property could be added to the Website/WebApplication to set the behavior. For example: SetPhysicalPath = $false. My current solution is to retrieve all the physical paths first from a target node and write them in the DSC file before executing: Are there preferences how to do this? |
The normal behaviour for a DSC resource is only to enforce the properties that are part of the configuration. Due to that the property PhysicalPath is mandatory all configurations must set it regardless if it should be enforced or not. Since your configuration must set the property, even thought you do not want to enforce it, you get the issue that PhysicalPath is overwritten with the wrong value. By removing that the parameter is mandatory, since there are scenarios where a configuration does not ant to enforce it, we solve that problem. This assumes that your configuration never create the actual object that depends on PysicalPath. Because if a configuration should create the object then we want to enforce the property, because then you say that there should always be a object with the pysical path 'X', and no other pysical path.
You mean we could add the boolean parameter |
Hello,
I am setting up a webserver with some applications using dsc and the first run works. All apps and settings are correct setup. The physical path is pointing to a default directory.
The physical path is pointing to a default directory, because an automated deployment process runs after the initial dsc run and sets the correct physical path.
The automated deployment process will set the physical path to a new folder after each deployment. Deployments are organised by another team.
The problem for me starts when I want to run the dsc script again to update something on the node. All the physical paths are set back to default directory which breaks the application.
How can this behavior be prevented? Could you give me some advice?
The text was updated successfully, but these errors were encountered: