-
Notifications
You must be signed in to change notification settings - Fork 1.2k
kvm: Handle storage issue on NFS/KVM in multiple ways #4708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 91 |
|
@ustcweizhou thanks for the PR. From what I understood (really quick glance of eyes) this avoid also situations of HA monitor a removed NFS storage. Am I right? I have seen some weird issues where a Cluster that had NFS and removes it (standard storage removal process |
|
Hi @ustcweizhou can you please resolve the conflicts? |
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder about the use of Thread directly, @weizhouapache. Any particular reason?
| Set<String> removedPools = new HashSet<String>(); | ||
| for (String uuid : _storagePool.keySet()) { | ||
| NfsStoragePool primaryStoragePool = _storagePool.get(uuid); | ||
| protected class CheckPoolThread extends Thread { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not make this a ManagemedContextRunnable as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ManagedContextRunnable and Thread are both implemetation of Runnable interface.
Thread works in testing.
ManagedContextRunnable should also be ok. The following might work as well
protected class CheckPoolThread implements Runnable {
|
Ping @weizhouapache can you fix the conflicts, is this essential for 4.16? |
| _monitorExecutor = new ScheduledThreadPoolExecutor(1, new NamedThreadFactory("AgentMonitor")); | ||
|
|
||
| _scanHostsExecutor = new ScheduledThreadPoolExecutor(1, new NamedThreadFactory("HostsScanner")); | ||
| _investigatorExecutor = new ScheduledThreadPoolExecutor(InvestigateDisconnectedHostsPoolSize.value(), new NamedThreadFactory("DisconnectHostsInvestigator")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| _investigatorExecutor = new ScheduledThreadPoolExecutor(InvestigateDisconnectedHostsPoolSize.value(), new NamedThreadFactory("DisconnectHostsInvestigator")); | |
| _investigatorExecutor = new ScheduledThreadPoolExecutor(InvestigateDisconnectedHostsPoolSize.value(), new NamedThreadFactory("DisconnectedHostsInvestigator")); |
| _connectExecutor.shutdownNow(); | ||
| _monitorExecutor.shutdownNow(); | ||
| _investigatorExecutor.shutdownNow(); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_scanHostsExecutor.shutdownNow() missing
| protected final ConfigKey<Integer> InvestigateDisconnectedHostsInterval = new ConfigKey<>("Advanced", Integer.class, "investigate.disconnected.hosts.interval", | ||
| "300", "The time (in seconds) between VM investigation on disconnected hosts.", false); | ||
| protected final ConfigKey<Integer> InvestigateDisconnectedHostsPoolSize = new ConfigKey<Integer>("Advanced", Integer.class, "investigate.disconnected.hosts.pool.size", "10", | ||
| "Default pool size to investigate disconnected hosts", false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "Default pool size to investigate disconnected hosts", false); | |
| "The thread pool size to investigate disconnected hosts", false); |
|
@weizhouapache can you address outstanding remarks, and fix the conflicts. |
|
@rhtyd @sureshanaparti |
|
@weizhouapache I'm agree 👍 |
|
@weizhouapache I hope you are doing well :) |
@soreana |
Some test cases to see if it works or not would be enough. |
@soreana |
|
@weizhouapache I created a new pr for this in #5783 |
@weizhouapache @ravening is this PR no longer relevant (as the changes are ported to #5783)? |
@sureshanaparti yes. this has conflicts.. i have resolved the conflicts and created new pr |
Description
This PR provides multiple options to handle storage issue on kvm.
FS: to be added
Two main parts
(1) kvm: Handle storage issue on NFS/KVM in multiple ways : hardreset (default), noaction, destroyvms, stopagent
(2) kvm: kvm: Schedule investigate tasks for disconnected hosts
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?