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
alert: Send alert for ha'ed vm's #5664
Conversation
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.
clgtm, but would the subject exactly the same as the content be helpful? can we add more info to the mail content?
@DaanHoogland if you have any content then let me know.. i can add that |
source and target host? time down? time up? down time duration? |
@blueorangutan package |
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Packaging result: ✖️ el7 ✔️ el8 ✖️ debian ✖️ suse15. SL-JID 1723 |
@blueorangutan package |
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Packaging result: ✖️ el7 ✖️ el8 ✖️ debian ✔️ suse15. SL-JID 1771 |
@blueorangutan package |
@rohityadavcloud a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Packaging result: ✖️ el7 ✖️ el8 ✖️ debian ✖️ suse15. SL-JID 2039 |
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.
Thanks for the PR @ravening.
I've proposed a few changes that, in my opinion, can make this PR even more helpful :-)
@@ -608,7 +608,9 @@ protected Long restart(final HaWorkVO work) { | |||
|
|||
VMInstanceVO started = _instanceDao.findById(vm.getId()); | |||
if (started != null && started.getState() == VirtualMachine.State.Running) { | |||
String message = String.format("HA on VM: %s", started.getHostName()); |
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 like the idea of enhancing the alerts.
What do you think of changing from Ha on VM: VM Name
to Ha Starting VM: VM Name (i-2-13477-VM)
.
Thus, making it String.format("HA on VM: %s (%s)", started.getHostName(), started.getInstanceName());
.
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.
@ravening Do you want to add instance name to the alert message (as advised)?
@@ -608,7 +608,9 @@ protected Long restart(final HaWorkVO work) { | |||
|
|||
VMInstanceVO started = _instanceDao.findById(vm.getId()); | |||
if (started != null && started.getState() == VirtualMachine.State.Running) { | |||
String message = String.format("HA on VM: %s", started.getHostName()); | |||
s_logger.info("VM is now restarted: " + vmId + " on " + started.getHostId()); |
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.
Taking the opportunity, what do you think of enhancing also the INFO log message?
As a suggestion, it could be logged something as the following:
HA is now restarting VM instance {id: "123", name: "VM Name", uuid: "1234.....abc", type="User"} on Host [{id: "1", name: "host.name", uuid: "ABC...123", type="Routing"}]
With the following code changes:
s_logger.info("VM is now restarted: " + vmId + " on " + started.getHostId()); | |
HostVO hostVmHasStarted = _hostDao.findById(started.getHostId()); | |
s_logger.info(String.format("HA is now restarting %s on %s", started, hostVmHasStarted)); |
@blueorangutan package |
@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✖️ suse15. SL-JID 2157 |
@blueorangutan test |
1 similar comment
@blueorangutan test |
@sureshanaparti a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
Trillian test result (tid-2845)
|
HI @ravening Can you address outstanding comments. Thanks. |
Ping @ravening |
When ha is performed on vm's send the alert for it so that its for admins to know which vm's got ha'ed else its time consuming to get those details from logs
@blueorangutan package |
@nvazquez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Packaging result: ✖️ el7 ✖️ el8 ✖️ debian ✔️ suse15. SL-JID 2545 |
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.
Code LGTM
@blueorangutan package |
@nvazquez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Packaging result: ✔️ el7 ✖️ el8 ✔️ debian ✔️ suse15. SL-JID 2647 |
@blueorangutan package |
@nvazquez a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result: ✖️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2895 |
@blueorangutan package |
@nvazquez a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2898 |
@blueorangutan test |
@nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
Trillian test result (tid-3628)
|
Description
When ha is performed on vm's send the alert for it so that
its for admins to know which vm's got ha'ed else its time
consuming to get those details from logs
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity