Skip to content

Commit e5a5251

Browse files
rebase fixes
1 parent 165bff9 commit e5a5251

File tree

2 files changed

+18
-20
lines changed

2 files changed

+18
-20
lines changed

server/src/main/java/com/cloud/network/SshKeysDistriMonitor.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,12 @@ public void processConnect(Host host, StartupCommand cmd, boolean forRebalance)
9696
String pubKey = _configDao.getValue("ssh.publickey");
9797
String prvKey = _configDao.getValue("ssh.privatekey");
9898

99-
try {
100-
ModifySshKeysCommand cmds = new ModifySshKeysCommand(pubKey, prvKey);
101-
Commands c = new Commands(cmds);
102-
_agentMgr.send(host.getId(), c, this);
103-
} catch (AgentUnavailableException e) {
104-
logger.debug("Failed to send keys to agent: {}", host);
105-
}
99+
try {
100+
ModifySshKeysCommand cmds = new ModifySshKeysCommand(pubKey, prvKey);
101+
Commands c = new Commands(cmds);
102+
_agentMgr.send(host.getId(), c, this);
103+
} catch (AgentUnavailableException e) {
104+
logger.debug("Failed to send keys to agent: {}", host);
106105
}
107106
}
108107
}

server/src/main/java/com/cloud/storage/listener/StoragePoolMonitor.java

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -127,20 +127,19 @@ public void processConnect(Host host, StartupCommand cmd, boolean forRebalance)
127127
continue;
128128
}
129129

130-
if (pool.getPoolType() == StoragePoolType.OCFS2 && !_ocfs2Mgr.prepareNodes(pool.getClusterId())) {
131-
throw new ConnectionException(true, String.format("Unable to prepare OCFS2 nodes for pool %s", pool));
132-
}
130+
if (pool.getPoolType() == StoragePoolType.OCFS2 && !_ocfs2Mgr.prepareNodes(pool.getClusterId())) {
131+
throw new ConnectionException(true, String.format("Unable to prepare OCFS2 nodes for pool %s", pool));
132+
}
133133

134-
Long hostId = host.getId();
135-
if (logger.isDebugEnabled()) {
136-
logger.debug("Host {} connected, connecting host to shared pool {} and sending storage pool information ...", host, pool);
137-
}
138-
try {
139-
_storageManager.connectHostToSharedPool(host, pool.getId());
140-
_storageManager.createCapacityEntry(pool.getId());
141-
} catch (Exception e) {
142-
throw new ConnectionException(true, String.format("Unable to connect host %s to storage pool %s due to %s", host, pool, e.toString()), e);
143-
}
134+
Long hostId = host.getId();
135+
if (logger.isDebugEnabled()) {
136+
logger.debug("Host {} connected, connecting host to shared pool {} and sending storage pool information ...", host, pool);
137+
}
138+
try {
139+
_storageManager.connectHostToSharedPool(host, pool.getId());
140+
_storageManager.createCapacityEntry(pool.getId());
141+
} catch (Exception e) {
142+
throw new ConnectionException(true, String.format("Unable to connect host %s to storage pool %s due to %s", host, pool, e.toString()), e);
144143
}
145144
}
146145
}

0 commit comments

Comments
 (0)