Skip to content

Conversation

@dhlaluku
Copy link
Contributor

@dhlaluku dhlaluku commented Jul 19, 2018

Description

This PR fixes NPE with the provisionCertificateCmd when reconnect is set to True.

Also fixes the following Marvin test failures:

  • test_certauthority_root.py

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

GitHub Issue/PRs

Fixes: #2753

Screenshots (if appropriate):

image

How Has This Been Tested?

With cloudmonkey, see screenshot

Dev environment components:

  • Platform: ACS-4.12
  • Management OS: Ubuntu 18.04 LTS
  • Hypervisor: 1 Host running KVM with CentOS 7

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
    Testing
  • I have added tests to cover my changes.
  • All relevant new and existing integration tests have passed.
  • A full integration testsuite with all test that can run on my environment has passed.

@borisstoyanov
Copy link
Contributor

Great @dhlaluku
@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

@dhlaluku
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

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

Boolean result = propagateAgentEvent(hostId, Event.ShutdownRequested);
if (result == null) {
super.reconnect(hostId);

Copy link
Member

Choose a reason for hiding this comment

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

Instead of adding an else block and then an if nested, what about simply using a return; statement here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, that is actually quite good since simplifies things and removes redundant code.

Copy link
Member

@rafaelweingartner rafaelweingartner left a comment

Choose a reason for hiding this comment

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

Thanks!

@blueorangutan
Copy link

Trillian test result (tid-2866)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 35720 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2756-t2866-kvm-centos7.zip
Intermitten failure detected: /marvin/tests/smoke/test_deploy_virtio_scsi_vm.py
Intermitten failure detected: /marvin/tests/smoke/test_privategw_acl.py
Intermitten failure detected: /marvin/tests/smoke/test_public_ip_range.py
Intermitten failure detected: /marvin/tests/smoke/test_templates.py
Intermitten failure detected: /marvin/tests/smoke/test_usage.py
Intermitten failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
Intermitten failure detected: /marvin/tests/smoke/test_volumes.py
Intermitten failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Intermitten failure detected: /marvin/tests/smoke/test_hostha_kvm.py
Smoke tests completed. 61 look OK, 7 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
ContextSuite context=TestDeployVirtioSCSIVM>:setup Error 0.00 test_deploy_virtio_scsi_vm.py
test_03_vpc_privategw_restart_vpc_cleanup Failure 1146.06 test_privategw_acl.py
test_04_extract_template Failure 128.31 test_templates.py
ContextSuite context=TestISOUsage>:setup Error 0.00 test_usage.py
test_01_secure_vm_migration Error 133.94 test_vm_life_cycle.py
test_02_unsecure_vm_migration Error 133.94 test_vm_life_cycle.py
test_03_secured_to_nonsecured_vm_migration Error 133.96 test_vm_life_cycle.py
test_04_nonsecured_to_secured_vm_migration Error 132.91 test_vm_life_cycle.py
test_06_download_detached_volume Failure 137.58 test_volumes.py
test_11_migrate_volume_and_change_offering Error 129.13 test_volumes.py
test_hostha_enable_ha_when_host_in_maintenance Error 3.58 test_hostha_kvm.py

@dhlaluku
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result: ✔centos6 ✖centos7 ✔debian. JID-2191

@dhlaluku
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

@dhlaluku
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

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

Copy link
Contributor

@borisstoyanov borisstoyanov left a comment

Choose a reason for hiding this comment

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

The Certificate error is gone now, LGTM!
Once we get this merged we can test #2753

@DaanHoogland DaanHoogland merged commit a6e0204 into apache:master Jul 20, 2018
@blueorangutan
Copy link

Trillian test result (tid-2869)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 27201 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2756-t2869-kvm-centos7.zip
Intermitten failure detected: /marvin/tests/smoke/test_deploy_virtio_scsi_vm.py
Intermitten failure detected: /marvin/tests/smoke/test_primary_storage.py
Intermitten failure detected: /marvin/tests/smoke/test_privategw_acl.py
Intermitten failure detected: /marvin/tests/smoke/test_snapshots.py
Intermitten failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
Intermitten failure detected: /marvin/tests/smoke/test_host_maintenance.py
Intermitten failure detected: /marvin/tests/smoke/test_hostha_kvm.py
Smoke tests completed. 61 look OK, 7 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
ContextSuite context=TestDeployVirtioSCSIVM>:setup Error 0.00 test_deploy_virtio_scsi_vm.py
test_01_add_primary_storage_disabled_host Error 0.60 test_primary_storage.py
test_01_primary_storage_nfs Error 0.12 test_primary_storage.py
ContextSuite context=TestStorageTags>:setup Error 0.22 test_primary_storage.py
test_03_vpc_privategw_restart_vpc_cleanup Failure 1126.37 test_privategw_acl.py
test_02_list_snapshots_with_removed_data_store Error 1.15 test_snapshots.py
test_01_secure_vm_migration Error 132.90 test_vm_life_cycle.py
test_02_unsecure_vm_migration Error 132.90 test_vm_life_cycle.py
test_03_secured_to_nonsecured_vm_migration Error 132.93 test_vm_life_cycle.py
test_04_nonsecured_to_secured_vm_migration Error 132.91 test_vm_life_cycle.py
test_08_migrate_vm Error 14.79 test_vm_life_cycle.py
test_01_cancel_host_maintenace_with_no_migration_jobs Failure 0.11 test_host_maintenance.py
test_02_cancel_host_maintenace_with_migration_jobs Error 2.37 test_host_maintenance.py
test_hostha_enable_ha_when_host_in_maintenance Error 4.58 test_hostha_kvm.py
test_hostha_kvm_host_fencing Failure 645.66 test_hostha_kvm.py
test_hostha_kvm_host_recovering Failure 619.79 test_hostha_kvm.py

@dhlaluku dhlaluku deleted the bugfix-provision-certificate-api-npe branch July 20, 2018 13:19
borisstoyanov pushed a commit to shapeblue/cloudstack that referenced this pull request Jul 23, 2018
…s true (apache#2756)

This PR fixes NPE with the provisionCertificateCmd when reconnect is set to True.

Also fixes the following Marvin test failures:
- test_certauthority_root.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

provisionCertificate api returns NPE when 'reconnect' parameter is used.

5 participants