1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +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 GitHub
parent 1c3bda1d49
commit f558646e7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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("");