Skip to content

Commit caf945b

Browse files
author
frank
committed
Don't allow Agent send out StartupCommand if it can not get its local IP address,
otherwise mgmt server will get an incomplete StartupCommand
1 parent 7adedca commit caf945b

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,7 @@ protected void setupStartupCommand(StartupCommand startup) {
329329
addr = InetAddress.getLocalHost();
330330
} catch (final UnknownHostException e) {
331331
s_logger.warn("unknow host? ", e);
332-
// ignore
333-
return;
332+
throw new CloudRuntimeException("Cannot get local IP address");
334333
}
335334

336335
final Script command = new Script("hostname", 500, s_logger);

0 commit comments

Comments
 (0)