From 40b8e3407e9650ba8f7d265109dfdd040cb5242b Mon Sep 17 00:00:00 2001 From: Jamo Luhrsen Date: Mon, 8 Jun 2020 16:33:47 -0700 Subject: [PATCH] Use wildcard *journal In Aluminium the journal/ folder is now named segmented-journal/ Using a wildcard in the tests should let it work for all branches this was partially done already with: https://git.opendaylight.org/gerrit/c/integration/test/+/88658 Signed-off-by: Jamo Luhrsen Change-Id: I4cf26da11e388c986ab5343ca1ad93d0beb352f7 --- csit/libraries/ClusterManagement.robot | 4 ++-- csit/libraries/UtilLibrary.py | 2 +- tools/clustering/cluster-deployer/restart.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/csit/libraries/ClusterManagement.robot b/csit/libraries/ClusterManagement.robot index 1c84caa9ad..ecf2810668 100644 --- a/csit/libraries/ClusterManagement.robot +++ b/csit/libraries/ClusterManagement.robot @@ -48,7 +48,7 @@ ${JOLOKIA_CONFIG_LOCAL_SHARDS_URI} jolokia/read/org.opendaylight.controller:t ${JOLOKIA_OPER_LOCAL_SHARDS_URI} jolokia/read/org.opendaylight.controller:type=DistributedOperationalDatastore,Category=ShardManager,name=shard-manager-operational/LocalShards ${JOLOKIA_READ_URI} jolokia/read/org.opendaylight.controller # Bug 9044 workaround: delete etc/host.key before restart. -@{ODL_DEFAULT_DATA_PATHS} tmp/ data/ cache/ snapshots/ journal/ etc/opendaylight/current/ etc/host.key +@{ODL_DEFAULT_DATA_PATHS} tmp/ data/ cache/ snapshots/ journal/ segmented-journal/ etc/opendaylight/current/ etc/host.key ${RESTCONF_MODULES_DIR} ${CURDIR}/../variables/restconf/modules ${SINGLETON_NETCONF_DEVICE_ID_PREFIX_OLD} /odl-general-entity:entity[odl-general-entity:name='KeyedInstanceIdentifier{targetType=interface org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node, path=[org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology[key=TopologyKey [_topologyId=Uri [_value=topology-netconf]]], org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node[key=NodeKey [_nodeId=Uri [_value= ${SINGLETON_NETCONF_DEVICE_ID_SUFFIX_OLD} ]]]]}'] @@ -536,7 +536,7 @@ Clean_Journals_Data_And_Snapshots_On_List_Or_All ... BEWARE: If only a subset of members is cleaned, this causes RetiredGenerationException in Carbon after the affected node re-start. ... See https://bugs.opendaylight.org/show_bug.cgi?id=8138 ${index_list} = List_Indices_Or_All given_list=${member_index_list} - ${command} = Set Variable rm -rf "${karaf_home}/journal" "${karaf_home}/snapshots" "${karaf_home}/data" + ${command} = Set Variable rm -rf "${karaf_home}/"*journal "${karaf_home}/snapshots" "${karaf_home}/data" FOR ${index} IN @{index_list} # usually: 1, 2, 3. Run_Bash_Command_On_Member command=${command} member_index=${index} END diff --git a/csit/libraries/UtilLibrary.py b/csit/libraries/UtilLibrary.py index 5e0ec10941..c342386f0a 100644 --- a/csit/libraries/UtilLibrary.py +++ b/csit/libraries/UtilLibrary.py @@ -207,7 +207,7 @@ def wait_for_controller_stopped(ip, username, password, karafHome): def clean_journal(ip, username, password, karafHome): - execute_ssh_command(ip, username, password, "rm -rf " + karafHome + "/journal") + execute_ssh_command(ip, username, password, "rm -rf " + karafHome + "/*journal") def kill_controller(ip, username, password, karafHome): diff --git a/tools/clustering/cluster-deployer/restart.py b/tools/clustering/cluster-deployer/restart.py index 48bfa903e6..044e03ee8b 100755 --- a/tools/clustering/cluster-deployer/restart.py +++ b/tools/clustering/cluster-deployer/restart.py @@ -30,7 +30,7 @@ def main(): remote = RemoteHost(hosts[x], args.user, args.password, args.rootdir) remote.kill_controller() if(args.clean): - remote.exec_cmd("rm -rf " + args.rootdir + "/deploy/current/odl/journal") + remote.exec_cmd("rm -rf " + args.rootdir + "/deploy/current/odl/*journal") remote.exec_cmd("rm -rf " + args.rootdir + "/deploy/current/odl/snapshots") remote.start_controller(args.rootdir + "/deploy/current") -- 2.36.6