File tree 2 files changed +20
-13
lines changed
server/src/main/java/com/cloud/storage/snapshot
systemvm/debian/opt/cloud/bin/setup
2 files changed +20
-13
lines changed Original file line number Diff line number Diff line change @@ -415,6 +415,13 @@ public Date scheduleNextSnapshotJob(final SnapshotPolicyVO policy) {
415
415
if (policyId == Snapshot .MANUAL_POLICY_ID ) {
416
416
return null ;
417
417
}
418
+
419
+ if (_volsDao .findById (policy .getVolumeId ()) == null ) {
420
+ s_logger .warn ("Found snapshot policy ID: " + policyId + " for volume ID: " + policy .getVolumeId () + " that does not exist or has been removed" );
421
+ removeSchedule (policy .getVolumeId (), policy .getId ());
422
+ return null ;
423
+ }
424
+
418
425
final Date nextSnapshotTimestamp = getNextScheduledTime (policyId , _currentTimestamp );
419
426
SnapshotScheduleVO spstSchedVO = _snapshotScheduleDao .findOneByVolumePolicy (policy .getVolumeId (), policy .getId ());
420
427
if (spstSchedVO == null ) {
Original file line number Diff line number Diff line change @@ -26,6 +26,19 @@ log_it() {
26
26
# Restart journald for setting changes to apply
27
27
systemctl restart systemd-journald
28
28
29
+ # Restore the persistent iptables nat, rules and filters for IPv4 and IPv6 if they exist
30
+ ipv4=" /etc/iptables/rules.v4"
31
+ if [ -e $ipv4 ]
32
+ then
33
+ iptables-restore < $ipv4
34
+ fi
35
+
36
+ ipv6=" /etc/iptables/rules.v6"
37
+ if [ -e $ipv6 ]
38
+ then
39
+ ip6tables-restore < $ipv6
40
+ fi
41
+
29
42
CMDLINE=/var/cache/cloud/cmdline
30
43
TYPE=$( grep -Po ' type=\K[a-zA-Z]*' $CMDLINE )
31
44
if [ " $TYPE " == " router" ] || [ " $TYPE " == " vpcrouter" ] || [ " $TYPE " == " dhcpsrvr" ]
52
65
systemctl disable --now --no-block $svc
53
66
done
54
67
55
- # Restore the persistent iptables nat, rules and filters for IPv4 and IPv6 if they exist
56
- ipv4=" /etc/iptables/rules.v4"
57
- if [ -e $ipv4 ]
58
- then
59
- iptables-restore < $ipv4
60
- fi
61
-
62
- ipv6=" /etc/iptables/rules.v6"
63
- if [ -e $ipv6 ]
64
- then
65
- ip6tables-restore < $ipv6
66
- fi
67
-
68
68
date > /var/cache/cloud/boot_up_done
You can’t perform that action at this time.
0 commit comments