Skip to content

Commit

Permalink
F #678: Scheduler reads http_proxy from config (#584)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Czern媒 authored and rsmontero committed Jan 5, 2021
1 parent e8ad586 commit 58d4a9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/scheduler/etc/sched.conf
Expand Up @@ -11,6 +11,8 @@
#
# ONE_XMLRPC: URL to connect to the OpenNebula daemon (oned)
#
# HTTP_PROXY: Proxy for ONE_XMLRPC
#
# SCHED_INTERVAL: Seconds between two scheduling actions
#
# MAX_VM: Maximum number of Virtual Machines scheduled in each scheduling
Expand Down Expand Up @@ -95,6 +97,7 @@ MESSAGE_SIZE = 1073741824
TIMEOUT = 60

ONE_XMLRPC = "http://localhost:2633/RPC2"
#HTTP_PROXY = ""

SCHED_INTERVAL = 15

Expand Down
5 changes: 5 additions & 0 deletions src/scheduler/src/sched/Scheduler.cc
Expand Up @@ -203,11 +203,16 @@ void Scheduler::start()
{
long long message_size;
unsigned int timeout;
string proxy;

conf.get("MESSAGE_SIZE", message_size);

conf.get("TIMEOUT", timeout);

conf.get("HTTP_PROXY", proxy);

setenv("http_proxy", proxy.c_str(), 1);

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

oss.str("");
Expand Down

0 comments on commit 58d4a9e

Please sign in to comment.