[ 
https://issues.apache.org/jira/browse/GEODE-3567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16191848#comment-16191848
 ] 

Jinmei Liao commented on GEODE-3567:
------------------------------------

use this acceptance test to verify:

@Test
  public void name() throws Exception {
    File backup = new File(tempFoler.getRoot(), "backup");

    GfshExecution execution = GfshScript.of("start locator --name=locator",
        "start server --name=server2 --server-port=0 --group=serverGROUP2",

        "create region --name=TestRegion10 --type=REPLICATE  
--group=serverGROUP2",
        "create region --name=TestRegion2 --type=REPLICATE",
        "sleep --time=1",

        "stop server --name=server2",
        "start server --name=server2 --server-port=0 --group=serverGROUP2",
        "export cluster-configuration --zip-file-name=" + new File( backup, 
"cc.zip").getAbsolutePath(),
        "export config --dir="+backup.getAbsolutePath()
    ).withName("test").execute(gfshRule);

    File cacheXml = new File( backup, "server2-cache.xml");
    List<String> cacheServerLines = Files.lines(cacheXml.toPath())
        .filter(line -> line.contains("<cache-server"))
        .collect(toList());

    assertThat(cacheServerLines).hasSize(1);
  }

> Exporting configuration from GFSH causes multiple cacheservers to be listed
> ---------------------------------------------------------------------------
>
>                 Key: GEODE-3567
>                 URL: https://issues.apache.org/jira/browse/GEODE-3567
>             Project: Geode
>          Issue Type: Bug
>          Components: configuration, gfsh
>    Affects Versions: 1.0.0-incubating, 1.1.0, 1.2.0
>            Reporter: Udo Kohlmeyer
>            Assignee: Jinmei Liao
>
> When running the following steps, ends up causing the `export config` command 
> to list multiple `<cacheserver..../>` entries to be created in the exported 
> `cache.xml`
> {code}
> start locator --name=locator --enable-cluster-configuration=true 
> --J=-Dgemfire.hostname-for-clients=bob
> start server --name=server --use-cluster-configuration=true --server-port=0 
> --hostname-for-clients=bob3
> start server --name=server2 --use-cluster-configuration=true --server-port=0 
> --group=serverGROUP2 --hostname-for-clients=bob2
> export cluster-configuration --zip-file-name=./backup1.zip
> export config --dir=./serversBack1
> stop server --name=server2
> start server --name=server2 --use-cluster-configuration=true --server-port=0 
> --group=serverGROUP2 --hostname-for-clients=bob2
> export config --dir=./serversBack2
> create disk-store --name=diskstore1 --dir=./ds1
> create region --name=TestRegion2 --type=REPLICATE_PERSISTENT_OVERFLOW 
> --disk-store=diskstore1
> create region --name=TestRegion --type=REPLICATE_PERSISTENT_OVERFLOW 
> --disk-store=diskstore1
> create region --name=TestRegion10 --type=REPLICATE --group=serverGROUP2
> export cluster-configuration --zip-file-name=./backup2.zip
> export config --dir=./serversBack3
> stop server --name=server2
> start server --name=server2 --use-cluster-configuration=true --server-port=0 
> --group=serverGROUP2 --hostname-for-clients=bob2
> export config --dir=./serversBack4
> {code}
> Extract from serversBack4 exported cache.xml
> {code}
> <?xml version="1.0" encoding="UTF-8"?><cache 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> xmlns="http://geode.apache.org/schema/cache"; 
> xsi:schemaLocation="http://geode.apache.org/schema/cache 
> http://geode.apache.org/schema/cache/cache-1.0.xsd"; version="1.0" 
> is-server="true">
>   <cache-server port="39737"/>
>   <cache-server port="35305"/>
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to