mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Merge release branch 4.6 to master
* 4.6: Show actual diff in commits after merge CLOUDSTACK-9113: skip vm with inconsistent state when getVmStats/getVmDiskStats
This commit is contained in:
commit
bdaa60fd6c
@ -48,12 +48,16 @@ public final class LibvirtGetVmDiskStatsCommandWrapper extends CommandWrapper<Ge
|
|||||||
final HashMap<String, List<VmDiskStatsEntry>> vmDiskStatsNameMap = new HashMap<String, List<VmDiskStatsEntry>>();
|
final HashMap<String, List<VmDiskStatsEntry>> vmDiskStatsNameMap = new HashMap<String, List<VmDiskStatsEntry>>();
|
||||||
final Connect conn = libvirtUtilitiesHelper.getConnection();
|
final Connect conn = libvirtUtilitiesHelper.getConnection();
|
||||||
for (final String vmName : vmNames) {
|
for (final String vmName : vmNames) {
|
||||||
|
try {
|
||||||
final List<VmDiskStatsEntry> statEntry = libvirtComputingResource.getVmDiskStat(conn, vmName);
|
final List<VmDiskStatsEntry> statEntry = libvirtComputingResource.getVmDiskStat(conn, vmName);
|
||||||
if (statEntry == null) {
|
if (statEntry == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
vmDiskStatsNameMap.put(vmName, statEntry);
|
vmDiskStatsNameMap.put(vmName, statEntry);
|
||||||
|
} catch (LibvirtException e) {
|
||||||
|
s_logger.warn("Can't get vm disk stats: " + e.toString() + ", continue");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return new GetVmDiskStatsAnswer(command, "", command.getHostName(), vmDiskStatsNameMap);
|
return new GetVmDiskStatsAnswer(command, "", command.getHostName(), vmDiskStatsNameMap);
|
||||||
} catch (final LibvirtException e) {
|
} catch (final LibvirtException e) {
|
||||||
|
|||||||
@ -49,12 +49,16 @@ public final class LibvirtGetVmStatsCommandWrapper extends CommandWrapper<GetVmS
|
|||||||
final LibvirtUtilitiesHelper libvirtUtilitiesHelper = libvirtComputingResource.getLibvirtUtilitiesHelper();
|
final LibvirtUtilitiesHelper libvirtUtilitiesHelper = libvirtComputingResource.getLibvirtUtilitiesHelper();
|
||||||
|
|
||||||
final Connect conn = libvirtUtilitiesHelper.getConnectionByVmName(vmName);
|
final Connect conn = libvirtUtilitiesHelper.getConnectionByVmName(vmName);
|
||||||
|
try {
|
||||||
final VmStatsEntry statEntry = libvirtComputingResource.getVmStat(conn, vmName);
|
final VmStatsEntry statEntry = libvirtComputingResource.getVmStat(conn, vmName);
|
||||||
if (statEntry == null) {
|
if (statEntry == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
vmStatsNameMap.put(vmName, statEntry);
|
vmStatsNameMap.put(vmName, statEntry);
|
||||||
|
} catch (LibvirtException e) {
|
||||||
|
s_logger.warn("Can't get vm stats: " + e.toString() + ", continue");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return new GetVmStatsAnswer(command, vmStatsNameMap);
|
return new GetVmStatsAnswer(command, vmStatsNameMap);
|
||||||
} catch (final LibvirtException e) {
|
} catch (final LibvirtException e) {
|
||||||
|
|||||||
@ -52,5 +52,10 @@ fi
|
|||||||
# Clean up
|
# Clean up
|
||||||
rm -fr ${tmpMessageFile}
|
rm -fr ${tmpMessageFile}
|
||||||
|
|
||||||
|
apache_remote=$(git remote -v | grep -E "git-wip-us\.apache\.org" | head -n 1 | cut -f1)
|
||||||
|
echo "INFO: Actual diff in commits is: (running git log --pretty=oneline --abbrev-commit ${apache_remote}/${currentBranch}..${currentBranch})"
|
||||||
|
echo
|
||||||
|
git log --pretty=oneline --abbrev-commit ${apache_remote}/${currentBranch}..${currentBranch}
|
||||||
|
|
||||||
# What's next
|
# What's next
|
||||||
echo "We're done! Please double check using 'git log -p' and 'git push' when you're sure."
|
echo "We're done! Please double check using 'git log -p' and 'git push' when you're sure."
|
||||||
|
|||||||
@ -179,6 +179,7 @@ elif [ "${prMergeableState}" != "clean" ] && [ ${force} -eq 1 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
github_remote=$(git remote -v | grep -E "apache/${repoName}(.git)?" | head -n 1 | cut -f1)
|
github_remote=$(git remote -v | grep -E "apache/${repoName}(.git)?" | head -n 1 | cut -f1)
|
||||||
|
apache_remote=$(git remote -v | grep -E "git-wip-us\.apache\.org" | head -n 1 | cut -f1)
|
||||||
if [ ${#github_remote} -eq 0 ]; then
|
if [ ${#github_remote} -eq 0 ]; then
|
||||||
echo "ERROR: We couldn't find a git remote pointing to 'apache/${repoName}.git' to merge the PR from."
|
echo "ERROR: We couldn't find a git remote pointing to 'apache/${repoName}.git' to merge the PR from."
|
||||||
echo "INFO: Currently, your configured remotes are:"
|
echo "INFO: Currently, your configured remotes are:"
|
||||||
@ -230,6 +231,8 @@ fi
|
|||||||
echo "INFO: ***********************************************************************************"
|
echo "INFO: ***********************************************************************************"
|
||||||
echo "INFO: Merged successfully! Please double check using 'git log -p' and 'git push' when you're sure."
|
echo "INFO: Merged successfully! Please double check using 'git log -p' and 'git push' when you're sure."
|
||||||
echo "INFO: About commits: there should be ${prCommits} from the PR plus 1 merge commit."
|
echo "INFO: About commits: there should be ${prCommits} from the PR plus 1 merge commit."
|
||||||
|
echo "INFO: Actual diff in commits is: (running git log --pretty=oneline --abbrev-commit ${apache_remote}/${currentBranch}..${currentBranch})"
|
||||||
echo
|
echo
|
||||||
|
git log --pretty=oneline --abbrev-commit ${apache_remote}/${currentBranch}..${currentBranch}
|
||||||
|
|
||||||
clean_up_and_exit 0
|
clean_up_and_exit 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user