Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fogbow
fogbow-green-sitter
Commits
593b6158
Commit
593b6158
authored
Apr 01, 2015
by
aninhacostaribeiro
Browse files
RAM and CPU were switched over in Host constructor
parent
52b6164c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/fogbowcloud/green/server/core/greenStrategy/DefaultGreenStrategy.java
View file @
593b6158
...
...
@@ -182,6 +182,10 @@ public class DefaultGreenStrategy implements GreenStrategy {
public
void
wakeUpSleepingHost
(
int
minCPU
,
int
minRAM
)
{
Host
host
=
this
.
sleepingHosts
.
peek
();
if
(
host
==
null
)
{
LOGGER
.
info
(
"There is no host sleeping at the moment."
);
return
;
}
try
{
if
(
host
.
getAvailableCPU
()
<
minCPU
)
{
LOGGER
.
info
(
"Tried to wake hosts but no hosts were found"
);
...
...
src/main/java/org/fogbowcloud/green/server/core/plugins/openstack/OpenStackInfoPlugin.java
View file @
593b6158
...
...
@@ -141,8 +141,8 @@ public class OpenStackInfoPlugin implements CloudInfoPlugin {
int
availableRamInTheHost
=
availableRam
.
get
(
hostName
);
int
availableCPUInTheHost
=
availableCPU
.
get
(
hostName
);
Host
host
=
new
Host
(
name
,
runningVMInTheHost
,
novaEnable
,
novaRunning
,
updateTime
,
available
Ram
InTheHost
,
available
CPU
InTheHost
);
novaRunning
,
updateTime
,
available
CPU
InTheHost
,
available
Ram
InTheHost
);
hosts
.
add
(
host
);
}
catch
(
Exception
e
)
{
// Ignoring exceptions for hosts in unavailable zones
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment