mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Merge release branch 4.19 to main
* 4.19: linstor: disconnect-disk also search for resource name in Linstor (#9035) ui: add support to change Account role for admins (#9012) Use parameter dcId as wrapper to prevent NPE (#8986)
This commit is contained in:
commit
0d8f7d4003
@ -47,5 +47,5 @@ public interface EndPointSelector {
|
|||||||
|
|
||||||
EndPoint select(DataStore store, String downloadUrl);
|
EndPoint select(DataStore store, String downloadUrl);
|
||||||
|
|
||||||
EndPoint findSsvm(long dcId);
|
EndPoint findSsvm(Long dcId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -339,7 +339,8 @@ public class DefaultEndPointSelector implements EndPointSelector {
|
|||||||
* Finds an SSVM that can be used to execute a command.
|
* Finds an SSVM that can be used to execute a command.
|
||||||
* For zone-wide image store, use SSVM for that zone. For region-wide store, we can arbitrarily pick one SSVM to do the task.
|
* For zone-wide image store, use SSVM for that zone. For region-wide store, we can arbitrarily pick one SSVM to do the task.
|
||||||
* */
|
* */
|
||||||
public EndPoint findSsvm(long dcId) {
|
@Override
|
||||||
|
public EndPoint findSsvm(Long dcId) {
|
||||||
List<HostVO> ssAHosts = listUpAndConnectingSecondaryStorageVmHost(dcId);
|
List<HostVO> ssAHosts = listUpAndConnectingSecondaryStorageVmHost(dcId);
|
||||||
if (ssAHosts == null || ssAHosts.isEmpty()) {
|
if (ssAHosts == null || ssAHosts.isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -321,7 +321,7 @@ public class LinstorStorageAdaptor implements StorageAdaptor {
|
|||||||
null,
|
null,
|
||||||
null);
|
null);
|
||||||
|
|
||||||
optRsc = getResourceByPath(resources, volumePath);
|
optRsc = getResourceByPathOrName(resources, volumePath);
|
||||||
} catch (ApiException apiEx) {
|
} catch (ApiException apiEx) {
|
||||||
// couldn't query linstor controller
|
// couldn't query linstor controller
|
||||||
logger.error(apiEx.getBestMessage());
|
logger.error(apiEx.getBestMessage());
|
||||||
@ -381,9 +381,10 @@ public class LinstorStorageAdaptor implements StorageAdaptor {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Optional<ResourceWithVolumes> getResourceByPath(final List<ResourceWithVolumes> resources, String path) {
|
private Optional<ResourceWithVolumes> getResourceByPathOrName(
|
||||||
|
final List<ResourceWithVolumes> resources, String path) {
|
||||||
return resources.stream()
|
return resources.stream()
|
||||||
.filter(rsc -> rsc.getVolumes().stream()
|
.filter(rsc -> getLinstorRscName(path).equalsIgnoreCase(rsc.getName()) || rsc.getVolumes().stream()
|
||||||
.anyMatch(v -> path.equals(v.getDevicePath())))
|
.anyMatch(v -> path.equals(v.getDevicePath())))
|
||||||
.findFirst();
|
.findFirst();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1786,6 +1786,7 @@
|
|||||||
"label.restore.volume.attach": "Restore volume and attach",
|
"label.restore.volume.attach": "Restore volume and attach",
|
||||||
"label.review": "Review",
|
"label.review": "Review",
|
||||||
"label.role": "Role",
|
"label.role": "Role",
|
||||||
|
"label.roleid": "Role",
|
||||||
"label.rolename": "Role",
|
"label.rolename": "Role",
|
||||||
"label.roles": "Roles",
|
"label.roles": "Roles",
|
||||||
"label.roletype": "Role Type",
|
"label.roletype": "Role Type",
|
||||||
|
|||||||
@ -91,7 +91,7 @@ export default {
|
|||||||
icon: 'edit-outlined',
|
icon: 'edit-outlined',
|
||||||
label: 'label.action.edit.account',
|
label: 'label.action.edit.account',
|
||||||
dataView: true,
|
dataView: true,
|
||||||
args: ['newname', 'account', 'domainid', 'networkdomain'],
|
args: ['newname', 'account', 'domainid', 'networkdomain', 'roleid'],
|
||||||
mapping: {
|
mapping: {
|
||||||
account: {
|
account: {
|
||||||
value: (record) => { return record.name }
|
value: (record) => { return record.name }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user