Skip to content

Commit 634cd78

Browse files
author
Alena Prokharchyk
committed
Merge branch 'master' into vpc
Conflicts: api/src/com/cloud/api/ApiConstants.java api/src/com/cloud/api/BaseCmd.java api/src/com/cloud/api/ResponseGenerator.java api/src/com/cloud/api/commands/ListNetworksCmd.java api/src/com/cloud/api/response/NetworkResponse.java api/src/com/cloud/event/EventTypes.java api/src/com/cloud/network/NetworkService.java client/tomcatconf/commands.properties.in scripts/network/domr/getDomRVersion.sh scripts/network/domr/ipassoc.sh scripts/network/domr/l2tp_vpn.sh scripts/network/domr/networkUsage.sh scripts/network/domr/router_proxy.sh server/src/com/cloud/api/ApiDBUtils.java server/src/com/cloud/api/ApiResponseHelper.java server/src/com/cloud/configuration/DefaultComponentLibrary.java server/src/com/cloud/network/NetworkManagerImpl.java server/src/com/cloud/network/dao/IPAddressDao.java server/src/com/cloud/network/dao/IPAddressDaoImpl.java setup/apidoc/gen_toc.py setup/db/create-schema.sql wscript
2 parents 377b03a + 66e14e2 commit 634cd78

425 files changed

Lines changed: 12302 additions & 24256 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

agent/distro/ubuntu/SYSCONFDIR/init.d/cloud-agent.in

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ wait_for_network() {
5050
i=1
5151
while [ $i -lt 10 ]
5252
do
53-
if ip addr show cloudbr0 |grep -w inet > /dev/null 2>&1; then
53+
# Under Ubuntu and Debian libvirt by default creates a bridge called virbr0.
54+
# That's why we want more then 3 lines back from brctl, so that there is a manually created bridge
55+
if [ "$(brctl show|wc -l)" -gt 2 ]; then
5456
break
5557
else
5658
sleep 1
@@ -74,9 +76,8 @@ start() {
7476
log_end_msg 1
7577
exit 1
7678
fi
77-
78-
#FIXME: wait for network
79-
wait_for_network
79+
80+
wait_for_network
8081

8182
if start-stop-daemon --start --quiet \
8283
--pidfile "$PIDFILE" \

agent/src/com/cloud/agent/Agent.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,9 @@ public void start() {
245245

246246
_connection.start();
247247
while (!_connection.isStartup()) {
248-
_shell.getBackoffAlgorithm().waitBeforeRetry();
249-
_connection = new NioClient("Agent", _shell.getHost(), _shell.getPort(), _shell.getWorkers(), this);
250-
_connection.start();
248+
_shell.getBackoffAlgorithm().waitBeforeRetry();
249+
_connection = new NioClient("Agent", _shell.getHost(), _shell.getPort(), _shell.getWorkers(), this);
250+
_connection.start();
251251
}
252252
}
253253

@@ -495,7 +495,7 @@ protected void processRequest(final Request request, final Link link) {
495495
_reconnectAllowed = false;
496496
answer = new Answer(cmd, true, null);
497497
} else if (cmd instanceof MaintainCommand) {
498-
s_logger.debug("Received maintainCommand" );
498+
s_logger.debug("Received maintainCommand" );
499499
cancelTasks();
500500
_reconnectAllowed = false;
501501
answer = new MaintainAnswer((MaintainCommand)cmd);
@@ -820,17 +820,17 @@ public synchronized void run() {
820820
}
821821

822822
public class AgentRequestHandler extends Task {
823-
public AgentRequestHandler(Task.Type type, Link link, Request req) {
823+
public AgentRequestHandler(Task.Type type, Link link, Request req) {
824824
super(type, link, req);
825825
}
826826

827-
@Override
828-
protected void doTask(Task task) throws Exception {
829-
Request req = (Request)this.get();
830-
if (!(req instanceof Response)) {
831-
processRequest(req, task.getLink());
832-
}
833-
}
827+
@Override
828+
protected void doTask(Task task) throws Exception {
829+
Request req = (Request)this.get();
830+
if (!(req instanceof Response)) {
831+
processRequest(req, task.getLink());
832+
}
833+
}
834834
}
835835

836836
public class ServerHandler extends Task {
@@ -853,12 +853,12 @@ public void doTask(final Task task) {
853853
try {
854854
request = Request.parse(task.getData());
855855
if (request instanceof Response) {
856-
//It's for pinganswer etc, should be processed immediately.
856+
//It's for pinganswer etc, should be processed immediately.
857857
processResponse((Response) request, task.getLink());
858858
} else {
859-
//put the requests from mgt server into another thread pool, as the request may take a longer time to finish. Don't block the NIO main thread pool
859+
//put the requests from mgt server into another thread pool, as the request may take a longer time to finish. Don't block the NIO main thread pool
860860
//processRequest(request, task.getLink());
861-
_executor.execute(new AgentRequestHandler(this.getType(), this.getLink(), request));
861+
_executor.execute(new AgentRequestHandler(this.getType(), this.getLink(), request));
862862
}
863863
} catch (final ClassNotFoundException e) {
864864
s_logger.error("Unable to find this request ");

0 commit comments

Comments
 (0)