You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ra...@apache.org on 2015/10/06 13:57:42 UTC
[1/2] stratos git commit: Fixing STRATOS-1582: Re-initialize Git repo
credentials on ArtifactUpdatedEvent
Repository: stratos
Updated Branches:
refs/heads/stratos-4.1.x 4fad87cd9 -> 11e618c3b
Fixing STRATOS-1582: Re-initialize Git repo credentials on ArtifactUpdatedEvent
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/5dbabb36
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/5dbabb36
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/5dbabb36
Branch: refs/heads/stratos-4.1.x
Commit: 5dbabb36e45d87d0691f432321d7e42257765af2
Parents: 4fad87c
Author: Akila Perera <ra...@gmail.com>
Authored: Tue Oct 6 15:19:15 2015 +0530
Committer: Akila Perera <ra...@gmail.com>
Committed: Tue Oct 6 15:19:15 2015 +0530
----------------------------------------------------------------------
.../modules/artifactmgt/git/agentgithandler.py | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/5dbabb36/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/artifactmgt/git/agentgithandler.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/artifactmgt/git/agentgithandler.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/artifactmgt/git/agentgithandler.py
index b7ac62f..008c8d7 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/artifactmgt/git/agentgithandler.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/artifactmgt/git/agentgithandler.py
@@ -59,11 +59,12 @@ class AgentGitHandler:
subsequent calls or not
:rtype: tuple(bool, bool)
"""
- git_repo = AgentGitHandler.get_repo(repo_info.tenant_id)
+ git_repo = AgentGitHandler.create_git_repo(repo_info)
updated = False
- if git_repo is not None:
+ if AgentGitHandler.get_repo(repo_info.tenant_id) is not None:
# has been previously cloned, this is not the subscription run
subscribe_run = False
+
if AgentGitHandler.is_valid_git_repository(git_repo):
AgentGitHandler.log.debug("Executing git pull: [tenant-id] %s [repo-url] %s",
git_repo.tenant_id, git_repo.repo_url)
@@ -86,7 +87,6 @@ class AgentGitHandler:
git_repo.tenant_id, git_repo.repo_url)
else:
# subscribing run.. need to clone
- git_repo = AgentGitHandler.create_git_repo(repo_info)
AgentGitHandler.log.debug("Cloning artifacts from %s for the first time to %s",
git_repo.repo_url, git_repo.local_repo_path)
subscribe_run = True
@@ -101,7 +101,7 @@ class AgentGitHandler:
# If first git clone is failed, execute retry_clone operation
AgentGitHandler.log.info("Retrying Git clone operation...")
AgentGitHandler.retry_clone(git_repo)
-
+ AgentGitHandler.add_repo(git_repo)
return subscribe_run, updated
@staticmethod
@@ -145,9 +145,6 @@ class AgentGitHandler:
@staticmethod
def is_valid_git_repository(git_repo):
- if git_repo.cloned:
- return True
-
output, errors = AgentGitHandler.execute_git_command(["show-ref"], git_repo.local_repo_path)
if len(output) > 0:
refs = output.split("\n")
@@ -213,8 +210,6 @@ class AgentGitHandler:
# move the cloned dir to application path
copy_tree(temp_repo_path, git_repo.local_repo_path)
-
- AgentGitHandler.add_repo(git_repo)
AgentGitHandler.log.info("Git clone operation for tenant %s successful" % git_repo.tenant_id)
return git_repo
except GitCommandError as e:
[2/2] stratos git commit: Increasing timeout for integration test
assertions
Posted by ra...@apache.org.
Increasing timeout for integration test assertions
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/11e618c3
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/11e618c3
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/11e618c3
Branch: refs/heads/stratos-4.1.x
Commit: 11e618c3b4b653e2cbb0b6e895cdf466d6053c0c
Parents: 5dbabb3
Author: Akila Perera <ra...@gmail.com>
Authored: Tue Oct 6 17:27:13 2015 +0530
Committer: Akila Perera <ra...@gmail.com>
Committed: Tue Oct 6 17:27:13 2015 +0530
----------------------------------------------------------------------
.../stratos/integration/common/TopologyHandler.java | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/11e618c3/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/TopologyHandler.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/TopologyHandler.java b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/TopologyHandler.java
index 9c7579f..2144b12 100644
--- a/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/TopologyHandler.java
+++ b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/TopologyHandler.java
@@ -55,10 +55,10 @@ import static org.testng.AssertJUnit.*;
public class TopologyHandler {
private static final Log log = LogFactory.getLog(TopologyHandler.class);
- public static final int APPLICATION_ACTIVATION_TIMEOUT = 360000;
- public static final int APPLICATION_UNDEPLOYMENT_TIMEOUT = 120000;
- public static final int MEMBER_TERMINATION_TIMEOUT = 120000;
- public static final int APPLICATION_TOPOLOGY_TIMEOUT = 90000;
+ public static final int APPLICATION_ACTIVATION_TIMEOUT = 500000;
+ public static final int APPLICATION_UNDEPLOYMENT_TIMEOUT = 500000;
+ public static final int MEMBER_TERMINATION_TIMEOUT = 500000;
+ public static final int APPLICATION_TOPOLOGY_TIMEOUT = 120000;
public static final String APPLICATION_STATUS_CREATED = "Created";
public static final String APPLICATION_STATUS_UNDEPLOYING = "Undeploying";
private ApplicationsEventReceiver applicationsEventReceiver;
@@ -172,6 +172,7 @@ public class TopologyHandler {
}
application = ApplicationManager.getApplications().getApplication(applicationName);
if ((System.currentTimeMillis() - startTime) > APPLICATION_ACTIVATION_TIMEOUT) {
+ log.error("Application did not activate within timeout period");
break;
}
}
@@ -302,6 +303,7 @@ public class TopologyHandler {
hasMemberRemoved = true;
} else {
if (getTerminatedMembers().get(memberId) - startTime > MEMBER_TERMINATION_TIMEOUT) {
+ log.error("Member did not get removed from the topology within timeout period");
break;
}
}
@@ -372,6 +374,7 @@ public class TopologyHandler {
applicationName, serviceName, clusterId), cluster);
if ((System.currentTimeMillis() - startTime) > APPLICATION_ACTIVATION_TIMEOUT) {
+ log.error("Cluster did not activate within timeout period");
break;
}
}
@@ -413,6 +416,7 @@ public class TopologyHandler {
log.error("Error while getting the application context for [application] " + applicationName);
}
if ((System.currentTimeMillis() - startTime) > APPLICATION_UNDEPLOYMENT_TIMEOUT) {
+ log.error("Application did not undeploy within timeout period");
break;
}
}
@@ -450,6 +454,7 @@ public class TopologyHandler {
catch (InterruptedException ignore) {
}
if ((System.currentTimeMillis() - startTime) > APPLICATION_ACTIVATION_TIMEOUT) {
+ log.error("Group instance min count check failed within timeout period");
break;
}
}
@@ -461,6 +466,7 @@ public class TopologyHandler {
catch (InterruptedException ignore) {
}
if ((System.currentTimeMillis() - startTime) > APPLICATION_ACTIVATION_TIMEOUT) {
+ log.error("Application did not activate within timeout period");
break;
}
}