Skip to content

Commit fcb7d86

Browse files
author
Dingane Hlaluku
committed
Fix marvin test failure
1 parent cbe0d71 commit fcb7d86

File tree

2 files changed

+196
-210
lines changed

2 files changed

+196
-210
lines changed

server/src/main/java/com/cloud/vm/UserVmManagerImpl.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4973,7 +4973,7 @@ protected void persistExtraConfigXenServer(String decodedUrl, UserVm vm) {
49734973
userVmDetailsDao.addDetail(vm.getId(), extraConfigKey + String.valueOf(i), cfg, true);
49744974
i++;
49754975
} else {
4976-
throw new CloudRuntimeException("Configuration " + cfg + " contains a blacklisted key by Root admin");
4976+
throw new CloudRuntimeException("Extra config " + cfg + " is not on the list of allowed keys for XenServer hypervisor hosts.");
49774977
}
49784978
}
49794979
} else {
@@ -5067,7 +5067,6 @@ protected void persistExtraConfigKvm(String decodedUrl, UserVm vm) {
50675067
*/
50685068
protected void validateKvmExtraConfig(String decodedUrl) {
50695069
String[] allowedConfigOptionList = KvmAdditionalConfigAllowList.value().split(",");
5070-
String msg = "An invalid extra configuration option has been supplied: ";
50715070
// Skip allowed keys validation validation for DPDK
50725071
if (!decodedUrl.contains(":")) {
50735072
try {
@@ -5080,7 +5079,7 @@ protected void validateKvmExtraConfig(String decodedUrl) {
50805079
NodeList nodeList = doc.getElementsByTagName(tag.trim());
50815080
// Node list should not be empty to show that allowed command is contained in passed XML
50825081
if (nodeList.getLength() == 0) {
5083-
throw new CloudRuntimeException(msg + tag);
5082+
throw new CloudRuntimeException(String.format("Extra config %s is not on the list of allowed keys for KVM hypervisor hosts", tag));
50845083
}
50855084
}
50865085
} catch (ParserConfigurationException | IOException | SAXException e) {

0 commit comments

Comments
 (0)