Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature #4404: Add ONE_XMLRPC attribute in the scheduler configuration file #92

Merged
merged 1 commit into from Apr 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/scheduler/etc/sched.conf
Expand Up @@ -9,7 +9,7 @@
#
# XMLRPC_TIMEOUT: Seconds to timeout XML-RPC calls to oned
#
# ONED_PORT: Port to connect to the OpenNebula daemon (oned)
# ONE_XMLRPC: URL to connect to the OpenNebula daemon (oned)
#
# SCHED_INTERVAL: Seconds between two scheduling actions
#
Expand Down Expand Up @@ -69,7 +69,7 @@
MESSAGE_SIZE = 1073741824
TIMEOUT = 60

ONED_PORT = 2633
ONE_XMLRPC = "http://localhost:2633/RPC2"

SCHED_INTERVAL = 30

Expand Down
4 changes: 2 additions & 2 deletions src/scheduler/include/Scheduler.h
Expand Up @@ -58,7 +58,7 @@ class Scheduler: public ActionListener
upool(0),
acls(0),
timer(0),
url(""),
one_xmlrpc(""),
machines_limit(0),
dispatch_limit(0),
host_dispatch_limit(0)
Expand Down Expand Up @@ -155,7 +155,7 @@ class Scheduler: public ActionListener

time_t timer;

string url;
string one_xmlrpc;

/**
* Limit of pending virtual machines to process from the pool.
Expand Down
9 changes: 2 additions & 7 deletions src/scheduler/src/sched/Scheduler.cc
Expand Up @@ -108,7 +108,6 @@ void Scheduler::start()

string etc_path;

int oned_port;
unsigned int live_rescheds;

pthread_attr_t pattr;
Expand Down Expand Up @@ -143,11 +142,7 @@ void Scheduler::start()
throw runtime_error("Error reading configuration file.");
}

conf.get("ONED_PORT", oned_port);

oss.str("");
oss << "http://localhost:" << oned_port << "/RPC2";
url = oss.str();
conf.get("ONE_XMLRPC", one_xmlrpc);

conf.get("SCHED_INTERVAL", timer);

Expand Down Expand Up @@ -232,7 +227,7 @@ void Scheduler::start()

conf.get("TIMEOUT", timeout);

Client::initialize("", url, message_size, timeout);
Client::initialize("", one_xmlrpc, message_size, timeout);

oss.str("");

Expand Down