The following forum(s) are migrating to a new home on Microsoft Q&A (Preview): Azure Service Fabric!

Ask new questions on Microsoft Q&A (Preview).
Interact with existing posts until December 13, 2019, after which content will be closed to all new and existing posts.

Learn More

 none
ApplicationManifest.xml doesn't work RRS feed

  • Question

  • I have modified the ApplicationManifest.xml file to increase the count of stateful partition and instance of stateless, but after I published the application, the count is still the same, here is the content of xml:

    <?xml version="1.0" encoding="utf-8"?>
    <ApplicationManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ApplicationTypeName="Application1Type" ApplicationTypeVersion="1.0.41" xmlns="http://schemas.microsoft.com/2011/01/fabric">
      <Parameters>
        <Parameter Name="Stateful2_MinReplicaSetSize" DefaultValue="2" />
        <Parameter Name="Stateful2_PartitionCount" DefaultValue="4" />
        <Parameter Name="Stateful2_TargetReplicaSetSize" DefaultValue="3" />
        <Parameter Name="Web2_InstanceCount" DefaultValue="-1" />
        <Parameter Name="WebApi1_InstanceCount" DefaultValue="-1" />
        <Parameter Name="Stateless2_InstanceCount" DefaultValue="3" />
      </Parameters>
      <ServiceManifestImport>
        <ServiceManifestRef ServiceManifestName="Stateful2Pkg" ServiceManifestVersion="1.0.13" />
        <ConfigOverrides />
      </ServiceManifestImport>
      <ServiceManifestImport>
        <ServiceManifestRef ServiceManifestName="Web2Pkg" ServiceManifestVersion="1.0.19" />
        <ConfigOverrides />
      </ServiceManifestImport>
      <ServiceManifestImport>
        <ServiceManifestRef ServiceManifestName="WebApi1Pkg" ServiceManifestVersion="1.0.25" />
        <ConfigOverrides />
      </ServiceManifestImport>
      <ServiceManifestImport>
        <ServiceManifestRef ServiceManifestName="Stateless2Pkg" ServiceManifestVersion="1.0.16" />
        <ConfigOverrides />
      </ServiceManifestImport>
      <DefaultServices>
        <Service Name="Stateful2">
          <StatefulService ServiceTypeName="Stateful2Type" TargetReplicaSetSize="[Stateful2_TargetReplicaSetSize]" MinReplicaSetSize="[Stateful2_MinReplicaSetSize]">
            <UniformInt64Partition PartitionCount="[Stateful2_PartitionCount]" LowKey="0" HighKey="3" />
          </StatefulService>
        </Service>
        <Service Name="Web2">
          <StatelessService ServiceTypeName="Web2Type" InstanceCount="[Web2_InstanceCount]">
            <SingletonPartition />
          </StatelessService>
        </Service>
        <Service Name="WebApi1">
          <StatelessService ServiceTypeName="WebApi1Type" InstanceCount="[WebApi1_InstanceCount]">
            <SingletonPartition />
          </StatelessService>
        </Service>
        <Service Name="Stateless2">
          <StatelessService ServiceTypeName="Stateless2Type" InstanceCount="[Stateless2_InstanceCount]">
            <SingletonPartition />
          </StatelessService>
        </Service>
      </DefaultServices>
    </ApplicationManifest>

    and here is the screenshot of local fabric explorer:

    Friday, March 24, 2017 9:17 AM

Answers

  • You have modified the default values which are almost certainly being overwritten with deployment specific values. In your deployment project, there is a ApplicationParameters folder. Inside that folder will be deployment specific files which contain values that override the default values specified in ApplicationManifest.xml.
    Friday, March 24, 2017 4:57 PM