Skip to content

Commit 462ff4f

Browse files
Merge pull request #915 from Telecominfraproject/release-4.1
Release 4.1
2 parents 4ad04c7 + 71b738f commit 462ff4f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

feeds/tip/cloud_discovery/files/usr/bin/cloud_discovery

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ let timeouts = {
3333
'orphan': 2 * 60 * 60,
3434
interval: 10000,
3535
expiry_interval: 60 * 60 * 1000,
36-
expiry_threshold: 3 * 24 * 60 * 60,
36+
expiry_threshold: 1 * 365 * 24 * 60 * 60,
3737
};
3838

3939
ulog_open(ULOG_SYSLOG | ULOG_STDIO, LOG_DAEMON, "cloud_discover");
@@ -44,14 +44,15 @@ uloop.init();
4444

4545
let cds_server = 'discovery.open-lan.org';
4646

47-
function set_cds_server() {
47+
function detect_certificate_type() {
4848
let pipe = fs.popen(`openssl x509 -in /etc/ucentral/cert.pem -noout -issuer`);
4949
let issuer = pipe.read("all");
5050
pipe.close();
5151

5252
if (!match(issuer, /Telecom Infra Project Issuing CA/)) {
5353
ulog(LOG_INFO, 'Certificate type is "Demo" \n');
54-
cds_server = 'openlan.keys.tip.build';
54+
cds_server = 'discovery-qa.open-lan.org';
55+
timeouts.expiry_threshold = 3 * 24 * 60 * 60;
5556
} else {
5657
ulog(LOG_INFO, 'Certificate type is "TIP"\n');
5758
}
@@ -401,7 +402,7 @@ let ubus_methods = {
401402
},
402403
};
403404

404-
set_cds_server();
405+
detect_certificate_type();
405406

406407
if (gateway_available()) {
407408
let status = ubus.call('ucentral', 'status');

0 commit comments

Comments
 (0)