Skip to content

Fix snmptrap alert bug - #2045

Merged
yadvr merged 3 commits into
apache:masterfrom
WingkaiHo:fix-snmptrap-bug
Dec 27, 2017
Merged

Fix snmptrap alert bug#2045
yadvr merged 3 commits into
apache:masterfrom
WingkaiHo:fix-snmptrap-bug

Conversation

@WingkaiHo

Copy link
Copy Markdown
Contributor

Fix snmptrap alerts info omit to send the field of SnmpConstants.sysUpTime.

So when standard snmptrapd receive alerts package the field OID will dislocation

@wido wido added the type:bug label Apr 14, 2017

int alertType = snmpTrapInfo.getAlertType() + 1;
if (alertType > 0) {
trap.add(new VariableBinding(SnmpConstants.sysUpTime, new OctetString(new Date().toString())));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem what we want. The sysUpTime shouldn't be set to 'now', should it? Without to much diving in I'd say it should be added and retrieved from the SnmpTrapInfo. If I am wrong, please add a comment explaining why 'now' is alright.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with @DaanHoogland here. sysuptime isn't indeed now(), but for how long the system has been up.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DaanHoogland Ok

I will use this expression to replace now
sysUpTimeTicks = ManagementFactory.getRuntimeMXBean().getUptime() / 10;
trap.add(new VariableBinding(SnmpConstants.sysUpTime, new TimeTicks(sysUpTimeTicks)))

@DaanHoogland

Copy link
Copy Markdown
Contributor

@WingkaiHo if the trap is always coming from the management server this makes sense. I am not familiar enough with this functionality.
code LGTM

@WingkaiHo

WingkaiHo commented Apr 19, 2017

Copy link
Copy Markdown
Contributor Author

@DaanHoogland cloudstack all alert message use the snmptrap send to third party system, if you set at log4j. And you can use snmptrapd and snmptt to dispose alert. If you not add this field, the snmptrapd and snmptt receive trap no normal.

@cloudmonger

Copy link
Copy Markdown

ACS CI BVT Run

Sumarry:
Build Number 799
Hypervisor xenserver
NetworkType Advanced
Passed=110
Failed=2
Skipped=12

Link to logs Folder (search by build_no): https://www.dropbox.com/sh/r2si930m8xxzavs/AAAzNrnoF1fC3auFrvsKo_8-a?dl=0

Failed tests:

  • test_volumes.py

  • test_06_download_detached_volume Failing since 2 runs

  • test_routers_network_ops.py

  • test_01_RVR_Network_FW_PF_SSH_default_routes_egress_true Failing since 3 runs

Skipped tests:
test_vm_nic_adapter_vmxnet3
test_01_verify_libvirt
test_02_verify_libvirt_after_restart
test_03_verify_libvirt_attach_disk
test_04_verify_guest_lspci
test_05_change_vm_ostype_restart
test_06_verify_guest_lspci_again
test_static_role_account_acls
test_11_ss_nfs_version_on_ssvm
test_nested_virtualization_vmware
test_3d_gpu_support
test_deploy_vgpu_enabled_vm

Passed test suits:
test_deploy_vm_with_userdata.py
test_affinity_groups_projects.py
test_portable_publicip.py
test_vm_snapshots.py
test_over_provisioning.py
test_global_settings.py
test_scale_vm.py
test_service_offerings.py
test_routers_iptables_default_policy.py
test_loadbalance.py
test_routers.py
test_reset_vm_on_reboot.py
test_deploy_vms_with_varied_deploymentplanners.py
test_network.py
test_router_dns.py
test_non_contigiousvlan.py
test_login.py
test_deploy_vm_iso.py
test_list_ids_parameter.py
test_public_ip_range.py
test_multipleips_per_nic.py
test_metrics_api.py
test_regions.py
test_affinity_groups.py
test_network_acl.py
test_pvlan.py
test_nic.py
test_deploy_vm_root_resize.py
test_resource_detail.py
test_secondary_storage.py
test_vm_life_cycle.py
test_disk_offerings.py

@yadvr yadvr added this to the 4.11 milestone Dec 10, 2017
@yadvr

yadvr commented Dec 11, 2017

Copy link
Copy Markdown
Member

LGTM. @WingkaiHo can you add a JIRA ID for this?

@WingkaiHo

Copy link
Copy Markdown
Contributor Author

how to add patch to jira

@yadvr

yadvr commented Dec 14, 2017

Copy link
Copy Markdown
Member

@WingkaiHo go to https://issues.apache.org/jira/secure/CreateIssue!default.jspa, create an account if necessary and submit a ticket under CLOUDSTACK project. And share here the JIRA-ID (or ticket ID, something like CLOUDSTACK-xxxxx)

@yadvr

yadvr commented Dec 17, 2017

Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1399

@yadvr

yadvr commented Dec 18, 2017

Copy link
Copy Markdown
Member

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-1804)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 28851 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2045-t1804-kvm-centos7.zip
Test completed. Failed tests results shown below:

Test Result Time (s) Test File
test_01_vpc_privategw_acl Failure 46.68 test_privategw_acl.py
test_02_vpc_privategw_static_routes Failure 168.18 test_privategw_acl.py
test_03_vpc_privategw_restart_vpc_cleanup Failure 148.11 test_privategw_acl.py
test_04_rvpc_privategw_static_routes Failure 228.49 test_privategw_acl.py
test_02_create_template_with_checksum_sha1 Error 5.23 test_templates.py
test_03_create_template_with_checksum_sha256 Error 5.22 test_templates.py
test_04_create_template_with_checksum_md5 Error 5.23 test_templates.py
test_01_vpc_remote_access_vpn Failure 71.02 test_vpc_vpn.py
test_02_cancel_host_maintenace_with_migration_jobs Failure 222.97 test_host_maintenance.py
test_hostha_kvm_host_fencing Failure 757.11 test_hostha_kvm.py
test_hostha_kvm_host_recovering Failure 646.32 test_hostha_kvm.py

@yadvr

yadvr commented Dec 26, 2017

Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1499

@borisstoyanov borisstoyanov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yadvr

yadvr commented Dec 27, 2017

Copy link
Copy Markdown
Member

Previous test LGTM, the failing tests are unrelated and were known issues.
Merging this based on two lgtms and travis/trillian test results.

@yadvr
yadvr merged commit d95ba43 into apache:master Dec 27, 2017
julien-vaz pushed a commit to scclouds/cloudstack that referenced this pull request Feb 18, 2025
Atualização do arquivo `templateConfig.sh`

Closes apache#2045

See merge request scclouds/scclouds!944
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants