def test_rack(): sdk_install.install( config.PACKAGE_NAME, config.get_foldered_service_name(), 3, additional_options={ "service": { "name": config.get_foldered_service_name() }, "nodes": { "placement_constraint": '[["@zone", "GROUP_BY", "1"]]' }, }, ) raw_status = nodetool.cmd(config.get_foldered_service_name(), "node-0-server", "status") log.info("raw_status: {}".format(raw_status)) stdout = raw_status[1] log.info("stdout: {}".format(stdout)) node = nodetool.parse_status(stdout)[0] log.info("node: {}".format(node)) assert node.get_rack() != "rack1" assert sdk_utils.get_cluster_zones()[node.get_address()] == node.get_rack()
def test_rack(): sdk_install.install(config.PACKAGE_NAME, config.get_foldered_service_name(), 3, additional_options={ "service": { "name": config.get_foldered_service_name() }, "nodes": { "placement_constraint": "[[\"@zone\", \"GROUP_BY\", \"1\"]]" } }) raw_status = nodetool.cmd(config.get_foldered_service_name(), 'node-0-server', 'status') log.info("raw_status: {}".format(raw_status)) stdout = raw_status[1] log.info("stdout: {}".format(stdout)) node = nodetool.parse_status(stdout)[0] log.info("node: {}".format(node)) assert node.get_rack() != 'rack1' assert 'us-west' in node.get_rack()
def test_rack(): ''' sdk_install.install( config.PACKAGE_NAME, config.get_foldered_service_name(), 3, additional_options={ "service": { "name": config.get_foldered_service_name() }, "nodes": { "placement_constraint": "[[\"@zone\", \"GROUP_BY\", \"1\"]]" } }) ''' # dcos task exec node-0-server bash -c 'JAVA_HOME=jre1.8.0_144 apache-cassandra-3.0.14/bin/nodetool status' raw_status = nodetool.cmd('node-0', 'status') log.info("raw_status: {}".format(raw_status)) stdout = raw_status[1] log.info("stdout: {}".format(stdout)) node = nodetool.parse_status(stdout)[0] log.info("node: {}".format(node)) assert (node.get_rack() != 'a') or (node.get_rack() != 'b') or (node.get_rack() != 'c')
def test_rack(): sdk_install.install( config.PACKAGE_NAME, config.get_foldered_service_name(), 3, additional_options={"service": {"name": config.get_foldered_service_name(), "detect_zones": True}}) # dcos task exec node-0-server bash -c 'JAVA_HOME=jre1.8.0_144 apache-cassandra-3.0.14/bin/nodetool status' raw_status = nodetool.cmd('node-0', 'status') log.info("raw_status: {}".format(raw_status)) stdout = raw_status[1] log.info("stdout: {}".format(stdout)) node = nodetool.parse_status(stdout)[0] log.info("node: {}".format(node)) assert node.get_rack() != 'rack1' assert 'us-west' in node.get_rack()
def test_rack() -> None: sdk_install.install( config.PACKAGE_NAME, config.get_foldered_service_name(), 3, additional_options={ "service": {"name": config.get_foldered_service_name()}, "nodes": {"placement_constraint": '[["@zone", "GROUP_BY", "1"]]'}, }, ) raw_status = nodetool.cmd(config.get_foldered_service_name(), "node-0-server", "status") log.info("raw_status: {}".format(raw_status)) stdout = raw_status[1] log.info("stdout: {}".format(stdout)) node = nodetool.parse_status(stdout)[0] log.info("node: {}".format(node)) assert node.get_rack() != "rack1" assert sdk_utils.get_cluster_zones()[node.get_address()] == node.get_rack()
def test_rack(): sdk_install.install( config.PACKAGE_NAME, config.get_foldered_service_name(), 3, additional_options={ "service": { "name": config.get_foldered_service_name() }, "nodes": { "placement_constraint": "[[\"@zone\", \"GROUP_BY\", \"1\"]]" } }) raw_status = nodetool.cmd(config.get_foldered_service_name(), 'node-0-server', 'status') log.info("raw_status: {}".format(raw_status)) stdout = raw_status[1] log.info("stdout: {}".format(stdout)) node = nodetool.parse_status(stdout)[0] log.info("node: {}".format(node)) assert node.get_rack() != 'rack1' assert 'us-west' in node.get_rack()