Skip to content

Commit 9cc3ae8

Browse files
committed
Merge release branch 4.9 to master
* 4.9: CLOUDSTACK-9857: With this change if agent dies the systemd will catch it properly and show process as exited CLOUDSTACK-9805: Display VR list in network details CLOUDSTACK-9356: FIX Cannot add users in VPC VPN
2 parents 53b1c5b + 5fcf648 commit 9cc3ae8

8 files changed

Lines changed: 41 additions & 7 deletions

File tree

packaging/centos63/cloud-agent.rc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# chkconfig: 35 99 10
44
# description: Cloud Agent
5+
# pidfile: /var/run/cloudstack-agent.pid
56

67
# Licensed to the Apache Software Foundation (ASF) under one
78
# or more contributor license agreements. See the NOTICE file

packaging/centos7/cloud-agent.rc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# chkconfig: 35 99 10
44
# description: Cloud Agent
5+
# pidfile: /var/run/cloudstack-agent.pid
56

67
# Licensed to the Apache Software Foundation (ASF) under one
78
# or more contributor license agreements. See the NOTICE file

packaging/fedora20/cloud-agent.rc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# chkconfig: 35 99 10
44
# description: Cloud Agent
5+
# pidfile: /var/run/cloudstack-agent.pid
56

67
# Licensed to the Apache Software Foundation (ASF) under one
78
# or more contributor license agreements. See the NOTICE file

packaging/fedora21/cloud-agent.rc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# chkconfig: 35 99 10
44
# description: Cloud Agent
5+
# pidfile: /var/run/cloudstack-agent.pid
56

67
# Licensed to the Apache Software Foundation (ASF) under one
78
# or more contributor license agreements. See the NOTICE file

server/src/com/cloud/network/vpn/RemoteAccessVpnManagerImpl.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -522,21 +522,26 @@ public boolean applyVpnUsers(long vpnOwnerId, String userName) throws ResourceU
522522

523523
boolean success = true;
524524

525-
boolean[] finals = new boolean[users.size()];
525+
Boolean[] finals = new Boolean[users.size()];
526526
for (RemoteAccessVPNServiceProvider element : _vpnServiceProviders) {
527527
s_logger.debug("Applying vpn access to " + element.getName());
528528
for (RemoteAccessVpnVO vpn : vpns) {
529529
try {
530530
String[] results = element.applyVpnUsers(vpn, users);
531531
if (results != null) {
532+
int indexUser = -1;
532533
for (int i = 0; i < results.length; i++) {
533-
s_logger.debug("VPN User " + users.get(i) + (results[i] == null ? " is set on " : (" couldn't be set due to " + results[i]) + " on ") + vpn);
534+
indexUser ++;
535+
if (indexUser == users.size()) {
536+
indexUser = 0; // results on multiple VPC routers are combined in commit 13eb789, reset user index if one VR is done.
537+
}
538+
s_logger.debug("VPN User " + users.get(indexUser) + (results[i] == null ? " is set on " : (" couldn't be set due to " + results[i]) + " on ") + vpn.getUuid());
534539
if (results[i] == null) {
535-
if (!finals[i]) {
536-
finals[i] = true;
540+
if (finals[indexUser] == null) {
541+
finals[indexUser] = true;
537542
}
538543
} else {
539-
finals[i] = false;
544+
finals[indexUser] = false;
540545
success = false;
541546
vpnTemp = vpn;
542547
}

ui/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1862,7 +1862,6 @@ <h3><translate key="label.set.up.zone.type"/></h3>
18621862
<script type="text/javascript" src="scripts/ui-custom/securityRules.js"></script>
18631863
<script type="text/javascript" src="scripts/ui-custom/vpc.js"></script>
18641864
<script type="text/javascript" src="scripts/vpc.js"></script>
1865-
<script type="text/javascript" src="scripts/network.js"></script>
18661865
<script type="text/javascript" src="scripts/ui-custom/recurringSnapshots.js"></script>
18671866
<script type="text/javascript" src="scripts/ui-custom/uploadVolume.js"></script>
18681867
<script type="text/javascript" src="scripts/storage.js"></script>
@@ -1877,6 +1876,7 @@ <h3><translate key="label.set.up.zone.type"/></h3>
18771876
<script type="text/javascript" src="scripts/ui-custom/physicalResources.js"></script>
18781877
<script type="text/javascript" src="scripts/ui-custom/zoneWizard.js"></script>
18791878
<script type="text/javascript" src="scripts/system.js"></script>
1879+
<script type="text/javascript" src="scripts/network.js"></script>
18801880
<script type="text/javascript" src="scripts/domains.js"></script>
18811881
<script type="text/javascript" src="scripts/docs.js"></script>
18821882
<script type="text/javascript" src="scripts/vm_snapshots.js"></script>

ui/scripts/network.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1152,6 +1152,10 @@
11521152
hiddenTabs.push('egressRules');
11531153
}
11541154

1155+
if (!isAdmin()) {
1156+
hiddenTabs.push("virtualRouters");
1157+
}
1158+
11551159
return hiddenTabs;
11561160
},
11571161

@@ -1615,6 +1619,11 @@
16151619
}
16161620
});
16171621
}
1622+
},
1623+
1624+
virtualRouters: {
1625+
title: "label.virtual.appliances",
1626+
listView: cloudStack.sections.system.subsections.virtualRouters.sections.routerNoGroup.listView
16181627
}
16191628
}
16201629
}
@@ -5444,8 +5453,10 @@
54445453
tabFilter: function(args) {
54455454
var hiddenTabs = [];
54465455
var isRouterOwner = isAdmin();
5447-
if (!isRouterOwner)
5456+
if (!isRouterOwner) {
54485457
hiddenTabs.push("router");
5458+
hiddenTabs.push("virtualRouters");
5459+
}
54495460
return hiddenTabs;
54505461
},
54515462

@@ -5611,6 +5622,10 @@
56115622
}
56125623
});
56135624
}
5625+
},
5626+
virtualRouters: {
5627+
title: "label.virtual.routers",
5628+
listView: cloudStack.sections.system.subsections.virtualRouters.sections.routerNoGroup.listView
56145629
}
56155630
}
56165631
}

ui/scripts/system.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9573,6 +9573,16 @@
95739573
domainid: args.context.routerGroupByAccount[0].domainid
95749574
})
95759575
}
9576+
if ("networks" in args.context) {
9577+
$.extend(data2, {
9578+
networkid: args.context.networks[0].id
9579+
})
9580+
}
9581+
if ("vpc" in args.context) {
9582+
$.extend(data2, {
9583+
vpcid: args.context.vpc[0].id
9584+
})
9585+
}
95769586
}
95779587

95789588
var routers =[];

0 commit comments

Comments
 (0)