1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-25 06:03:36 +03:00

F #678: Scheduler reads http_proxy from config (#584)

This commit is contained in:
Pavel Czerný 2021-01-04 17:23:16 +01:00 committed by Tino Vazquez
parent e02a9f9424
commit 0d71df71eb
2 changed files with 8 additions and 0 deletions

View File

@ -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
@ -95,6 +97,7 @@ MESSAGE_SIZE = 1073741824
TIMEOUT = 60
ONE_XMLRPC = "http://localhost:2633/RPC2"
#HTTP_PROXY = ""
SCHED_INTERVAL = 15

View File

@ -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("");