cloudstack/engine
Nicolas Vazquez 13c81a8ee4 server: Prevent corner case for infinite PrepareForMaintenance (#3095)
A corner case was found on 4.11.2 for #2493 leading to an infinite loop in state PrepareForMaintenance

To prevent such cases, in which failed migrations are detected but still running on the host, this feature adds a new cluster setting host.maintenance.retries which is the number of retries before marking the host as ErrorInMaintenance if migration errors persist.

How Has This Been Tested?
- 2 KVM hosts, pick one which has running VMs as H
- Block migrations ports on H to simulate failures on migrations:
iptables -I OUTPUT -j REJECT -m state --state NEW -m tcp -p tcp --dport 49152:49215 -m comment --comment 'test block migrations' iptables -I OUTPUT -j REJECT -m state --state NEW -m tcp -p tcp --dport 16509 -m comment --comment 'test block migrations
- Put host H in Maintenance
- Observe that host is indefinitely in PrepareForMaintenance state (after this fix it goes into ErrorInMaintenance after retrying host.maintenance.retries times)
2018-12-28 15:14:16 +05:30
..
api Updating pom.xml version numbers for release 4.11.3.0-SNAPSHOT 2018-11-20 13:11:52 +00:00
components-api server: Prevent corner case for infinite PrepareForMaintenance (#3095) 2018-12-28 15:14:16 +05:30
network Updating pom.xml version numbers for release 4.11.3.0-SNAPSHOT 2018-11-20 13:11:52 +00:00
orchestration Updating pom.xml version numbers for release 4.11.3.0-SNAPSHOT 2018-11-20 13:11:52 +00:00
schema Updating pom.xml version numbers for release 4.11.3.0-SNAPSHOT 2018-11-20 13:11:52 +00:00
service Updating pom.xml version numbers for release 4.11.3.0-SNAPSHOT 2018-11-20 13:11:52 +00:00
storage Updating pom.xml version numbers for release 4.11.3.0-SNAPSHOT 2018-11-20 13:11:52 +00:00
pom.xml Updating pom.xml version numbers for release 4.11.3.0-SNAPSHOT 2018-11-20 13:11:52 +00:00