mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Merge remote-tracking branch 'origin/4.15'
This commit is contained in:
commit
f58b72f6f7
@ -253,6 +253,8 @@ public class VMEntityManagerImpl implements VMEntityManager {
|
||||
}
|
||||
|
||||
_itMgr.start(vm.getUuid(), params, plan, null);
|
||||
} else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -64,10 +64,6 @@ public class CephSnapshotStrategy extends StorageSystemSnapshotStrategy {
|
||||
return StrategyPriority.HIGHEST;
|
||||
}
|
||||
|
||||
if (SnapshotOperation.DELETE.equals(op)) {
|
||||
return StrategyPriority.HIGHEST;
|
||||
}
|
||||
|
||||
return StrategyPriority.CANT_HANDLE;
|
||||
}
|
||||
|
||||
|
||||
@ -87,8 +87,6 @@ public class CephSnapshotStrategyTest {
|
||||
StrategyPriority strategyPriority = cephSnapshotStrategy.canHandle(snapshot, snapshotOps[i]);
|
||||
if (snapshotOps[i] == SnapshotOperation.REVERT && isSnapshotStoredOnRbdStoragePool) {
|
||||
Assert.assertEquals(StrategyPriority.HIGHEST, strategyPriority);
|
||||
} else if (snapshotOps[i] == SnapshotOperation.DELETE && isSnapshotStoredOnRbdStoragePool) {
|
||||
Assert.assertEquals(StrategyPriority.HIGHEST, strategyPriority);
|
||||
} else {
|
||||
Assert.assertEquals(StrategyPriority.CANT_HANDLE, strategyPriority);
|
||||
}
|
||||
|
||||
@ -398,7 +398,7 @@ install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-inte
|
||||
/usr/bin/systemctl off cloudstack-management || true
|
||||
|
||||
%pre management
|
||||
id cloud > /dev/null 2>&1 || /usr/sbin/useradd -M -c "CloudStack unprivileged user" \
|
||||
id cloud > /dev/null 2>&1 || /usr/sbin/useradd -M -U -c "CloudStack unprivileged user" \
|
||||
-r -s /bin/sh -d %{_localstatedir}/cloudstack/management cloud|| true
|
||||
|
||||
rm -rf %{_localstatedir}/cache/cloudstack
|
||||
@ -484,7 +484,7 @@ fi
|
||||
systemctl daemon-reload
|
||||
|
||||
%pre usage
|
||||
id cloud > /dev/null 2>&1 || /usr/sbin/useradd -M -c "CloudStack unprivileged user" \
|
||||
id cloud > /dev/null 2>&1 || /usr/sbin/useradd -M -U -c "CloudStack unprivileged user" \
|
||||
-r -s /bin/sh -d %{_localstatedir}/cloudstack/management cloud|| true
|
||||
|
||||
%preun usage
|
||||
|
||||
@ -391,7 +391,7 @@ install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-inte
|
||||
/usr/bin/systemctl off cloudstack-management || true
|
||||
|
||||
%pre management
|
||||
id cloud > /dev/null 2>&1 || /usr/sbin/useradd -M -c "CloudStack unprivileged user" \
|
||||
id cloud > /dev/null 2>&1 || /usr/sbin/useradd -M -U -c "CloudStack unprivileged user" \
|
||||
-r -s /bin/sh -d %{_localstatedir}/cloudstack/management cloud|| true
|
||||
|
||||
rm -rf %{_localstatedir}/cache/cloudstack
|
||||
@ -475,7 +475,7 @@ fi
|
||||
systemctl daemon-reload
|
||||
|
||||
%pre usage
|
||||
id cloud > /dev/null 2>&1 || /usr/sbin/useradd -M -c "CloudStack unprivileged user" \
|
||||
id cloud > /dev/null 2>&1 || /usr/sbin/useradd -M -U -c "CloudStack unprivileged user" \
|
||||
-r -s /bin/sh -d %{_localstatedir}/cloudstack/management cloud|| true
|
||||
|
||||
%preun usage
|
||||
|
||||
@ -261,7 +261,7 @@ public class SecondaryStorageManagerImpl extends ManagerBase implements Secondar
|
||||
private final GlobalLock _allocLock = GlobalLock.getInternLock(getAllocLockName());
|
||||
|
||||
static final ConfigKey<String> NTPServerConfig = new ConfigKey<String>(String.class, "ntp.server.list", "Advanced", null,
|
||||
"Comma separated list of NTP servers to configure in Secondary storage VM", false, ConfigKey.Scope.Global, null);
|
||||
"Comma separated list of NTP servers to configure in Secondary storage VM", true, ConfigKey.Scope.Global, null);
|
||||
|
||||
static final ConfigKey<Integer> MaxNumberOfSsvmsForMigration = new ConfigKey<Integer>("Advanced", Integer.class, "max.ssvm.count", "5",
|
||||
"Number of additional SSVMs to handle migration of data objects concurrently", true, ConfigKey.Scope.Global);
|
||||
|
||||
@ -111,7 +111,7 @@ class CsAcl(CsDataBag):
|
||||
self.rule['allowed'] = True
|
||||
self.rule['action'] = "ACCEPT"
|
||||
|
||||
if self.rule['type'] == 'all' and obj['source_cidr_list']:
|
||||
if self.rule['type'] == 'all' and not obj['source_cidr_list']:
|
||||
self.rule['cidr'] = []
|
||||
else:
|
||||
self.rule['cidr'] = obj['source_cidr_list']
|
||||
|
||||
@ -567,14 +567,12 @@ setup_ntp() {
|
||||
if [ -f $NTP_CONF_FILE ]
|
||||
then
|
||||
IFS=',' read -a server_list <<< "$NTP_SERVER_LIST"
|
||||
sed -i "/^server /d" $NTP_CONF_FILE
|
||||
for (( iterator=${#server_list[@]}-1 ; iterator>=0 ; iterator-- ))
|
||||
do
|
||||
server=$(echo ${server_list[iterator]} | tr -d '\r')
|
||||
PATTERN="server $server"
|
||||
if grep -q "^$PATTERN$" $NTP_CONF_FILE ; then
|
||||
sed -i "/^$PATTERN$/d" $NTP_CONF_FILE
|
||||
fi
|
||||
sed -i "0,/^server/s//$PATTERN\nserver/" $NTP_CONF_FILE
|
||||
sed -i "0,/^#server/s//$PATTERN\n#server/" $NTP_CONF_FILE
|
||||
done
|
||||
systemctl enable ntp
|
||||
else
|
||||
|
||||
@ -100,6 +100,13 @@ setup_router() {
|
||||
mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1
|
||||
fi
|
||||
|
||||
# Setup hourly lograte in systemd timer
|
||||
sed -i 's/OnCalendar=daily/OnCalendar=hourly/g' /usr/lib/systemd/system/logrotate.timer
|
||||
sed -i 's/AccuracySec=12h/AccuracySec=5m/g' /usr/lib/systemd/system/logrotate.timer
|
||||
|
||||
# reload daemon
|
||||
/usr/bin/systemctl daemon-reload
|
||||
|
||||
# Load modules to support NAT traversal in VR
|
||||
modprobe nf_nat_pptp
|
||||
}
|
||||
|
||||
@ -113,6 +113,13 @@ EOF
|
||||
mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1
|
||||
fi
|
||||
|
||||
# Setup hourly lograte in systemd timer
|
||||
sed -i 's/OnCalendar=daily/OnCalendar=hourly/g' /usr/lib/systemd/system/logrotate.timer
|
||||
sed -i 's/AccuracySec=12h/AccuracySec=5m/g' /usr/lib/systemd/system/logrotate.timer
|
||||
|
||||
# reload daemon
|
||||
/usr/bin/systemctl daemon-reload
|
||||
|
||||
# Load modules to support NAT traversal in VR
|
||||
modprobe nf_nat_pptp
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
actions (item) {
|
||||
resource () {
|
||||
this.actionsExist = this.doActionsExist()
|
||||
}
|
||||
},
|
||||
|
||||
@ -76,7 +76,7 @@
|
||||
<a-input ref="input" :value="inputKey" @change="e => inputKey = e.target.value" style="width: 50px; text-align: center" :placeholder="$t('label.key')" />
|
||||
<a-input style=" width: 20px; border-left: 0; pointer-events: none; backgroundColor: #fff" placeholder="=" disabled />
|
||||
<a-input :value="inputValue" @change="handleValueChange" style="width: 50px; text-align: center; border-left: 0" :placeholder="$t('label.value')" />
|
||||
<tooltip-button icon="close" size="small" @click="inputKey = inputValue = ''" />
|
||||
<tooltip-button :tooltip="$t('label.clear')" icon="close" size="small" @click="inputKey = inputValue = ''" />
|
||||
</a-input-group>
|
||||
</div>
|
||||
</div>
|
||||
@ -112,9 +112,13 @@
|
||||
|
||||
<script>
|
||||
import { api } from '@/api'
|
||||
import TooltipButton from '@/components/view/TooltipButton'
|
||||
|
||||
export default {
|
||||
name: 'SearchView',
|
||||
components: {
|
||||
TooltipButton
|
||||
},
|
||||
props: {
|
||||
searchFilters: {
|
||||
type: Array,
|
||||
|
||||
@ -145,6 +145,17 @@ export default {
|
||||
virtualmachineid: {
|
||||
value: (record) => { return record.id }
|
||||
}
|
||||
},
|
||||
successMethod: (obj, result) => {
|
||||
const vm = result.jobresult.virtualmachine || {}
|
||||
if (result.jobstatus === 1 && vm.password) {
|
||||
const name = vm.displayname || vm.name || vm.id
|
||||
obj.$notification.success({
|
||||
message: `${obj.$t('label.reinstall.vm')}: ` + name,
|
||||
description: `${obj.$t('label.password.reset.confirm')}: ` + vm.password,
|
||||
duration: 0
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -339,6 +350,17 @@ export default {
|
||||
domainid: {
|
||||
value: (record) => { return record.domainid }
|
||||
}
|
||||
},
|
||||
successMethod: (obj, result) => {
|
||||
const vm = result.jobresult.virtualmachine || {}
|
||||
if (result.jobstatus === 1 && vm.password) {
|
||||
const name = vm.displayname || vm.name || vm.id
|
||||
obj.$notification.success({
|
||||
message: `${obj.$t('label.reset.ssh.key.pair.on.vm')}: ` + name,
|
||||
description: `${obj.$t('label.password.reset.confirm')}: ` + vm.password,
|
||||
duration: 0
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@ -871,6 +871,9 @@ export default {
|
||||
})
|
||||
}
|
||||
}
|
||||
if ('successMethod' in action) {
|
||||
action.successMethod(this, result)
|
||||
}
|
||||
},
|
||||
errorMethod: () => this.fetchData(),
|
||||
loadingMessage: `${this.$t(action.label)} - ${resourceName}`,
|
||||
|
||||
@ -2012,7 +2012,7 @@ export default {
|
||||
}
|
||||
}
|
||||
if (offering && offering.rootdisksize > 0) {
|
||||
this.rootDiskSizeFixed = offering.rootdisksize / (1024 * 1024 * 1024.0).toFixed(2)
|
||||
this.rootDiskSizeFixed = offering.rootdisksize
|
||||
this.showRootDiskSizeChanger = false
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user