I am trying to install a diagnostic extension through the API in an existing Azure cloud service. The cloud service has a reserved IP address. Im get "The reserved IP address cannot be added, deleted or changed during upgrade or upgrade deployment ." use ChangeConfigurationBySlot. Does anyone know a trick to make this work? Is this a pass in the API or am I doing something wrong?
Here is the relevant code snippet:
var dep = client.Deployments.GetBySlot(resource.ServiceName, DeploymentSlot.Production); var serviceConfig = XElement.Parse(dep.Configuration, LoadOptions.SetBaseUri); var config = new DeploymentChangeConfigurationParameters(serviceConfig.ToString()) { ExtendedProperties = dep.ExtendedProperties, Mode = DeploymentChangeConfigurationMode.Auto, TreatWarningsAsError = false, Configuration = serviceConfig.ToString(), ExtensionConfiguration = new ExtensionConfiguration { AllRoles = new List<ExtensionConfiguration.Extension>(), NamedRoles = extensionConfig } }; var result = client.Deployments.ChangeConfigurationBySlot(resource.ServiceName, DeploymentSlot.Production, config);
Here is the relevant section from the cloud service configuration
<ServiceConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" serviceName="IS.Admin.Azure" osFamily="4" osVersion="*" schemaVersion="2014-06.2.4" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration"> <Role name="IS.Admin"> β¦ </Role> <NetworkConfiguration> <VirtualNetworkSite name="is-prod" /> <AddressAssignments> <InstanceAddress roleName="IS.Admin"> <Subnets> <Subnet name="Subnet-1" /> </Subnets> </InstanceAddress> <ReservedIPs> <ReservedIP name="is-admin-rip" /> </ReservedIPs> </AddressAssignments> </NetworkConfiguration> </ServiceConfiguration>
My update has nothing to do with changing / deleting / adding reserved IP addresses. Any ideas on how to update the service configuration?
source share