Skip to content

Conversation

@GabrielBrascher
Copy link
Member

Description

List VMs by "security group ID" and/or "ha enabled"

Improve List VMs command allowing to list VMs filtering by security group or HA enabled.

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)

How Has This Been Tested?

List VMs via API with different combinations. All worked fine.

  • filter vms with security group ID
    list virtualmachines filter=id,name,haenable,securitygroup listall=true securitygroupid=<SG UUID>

  • list VMs according to the HA enabled
    list virtualmachines filter=id,name,haenable,securitygroup listall=true haenable=true
    list virtualmachines filter=id,name,haenable,securitygroup listall=true haenable=false

  • combione both added parameters
    list virtualmachines filter=id,name,haenable,securitygroup listall=true haenable=false securitygroupid=<SG UUID>
    list virtualmachines filter=id,name,haenable,securitygroup listall=true haenable=true securitygroupid=<SG UUID>
    list virtualmachines filter=id,name,haenable,securitygroup listall=true haenable=false securitygroupid=<SG UUID2>
    list virtualmachines filter=id,name,haenable,securitygroup listall=true haenable=true securitygroupid=<SG UUID2>

@GabrielBrascher GabrielBrascher added this to the 4.15.0.0 milestone Oct 12, 2020
@GabrielBrascher GabrielBrascher self-assigned this Oct 12, 2020
@GabrielBrascher
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2163

@GabrielBrascher
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2166

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

@wido
Copy link
Contributor

wido commented Oct 13, 2020

LGTM based on code

@blueorangutan
Copy link

Trillian test result (tid-2932)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 37369 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4397-t2932-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Intermittent failure detected: /marvin/tests/smoke/test_hostha_kvm.py
Smoke tests completed. 83 look OK, 2 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers Failure 295.16 test_vpc_redundant.py
test_hostha_kvm_host_fencing Error 98.88 test_hostha_kvm.py

Copy link
Contributor

@sureshanaparti sureshanaparti left a comment

Choose a reason for hiding this comment

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

Code changes LGTM

Copy link
Contributor

@Pearl1594 Pearl1594 left a comment

Choose a reason for hiding this comment

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

Tested, LGTM - however, is removal of querying based on affinity group id intentional?

@DaanHoogland DaanHoogland merged commit 2e32a3a into apache:master Oct 14, 2020
@wido
Copy link
Contributor

wido commented Oct 14, 2020

Very valid comment from @sureshanaparti ! @GabrielBrascher Can you elaborate on that?

@DaanHoogland
Copy link
Contributor

Are you talking about @Pearl1594 's comment @wido ? (affinity group affinity ;)

@wido
Copy link
Contributor

wido commented Oct 14, 2020

Indeed @DaanHoogland, I quoted the wrong person. I meant @Pearl1594 his comment indeed.

@DaanHoogland
Copy link
Contributor

@GabrielBrascher indeed please advice. As per enough 👍 and test effort I merged but overlooked @Pearl1594 's question. Should we revert or fix forward or is there a legitimate explanation to the answer the query? (cc @wido , @sureshanaparti )

@sureshanaparti
Copy link
Contributor

sureshanaparti commented Oct 14, 2020

@DaanHoogland seems affinityGroupId code is accidentally removed. As this PR changes impacting existing func, better revert and fix that, and merge it again. Otherway should be also ok, if immediate fix.

@GabrielBrascher
Copy link
Member Author

My mistake @DaanHoogland @Pearl1594 @sureshanaparti. Should we revert this commit?

@DaanHoogland
Copy link
Contributor

revert or fix forward @GabrielBrascher your choice for my part,, but with priority please.

GabrielBrascher added a commit to CLDIN/cloudstack that referenced this pull request Oct 14, 2020
Fix mistake from PR apache#4397 List VMs by Security Group & HA
@GabrielBrascher GabrielBrascher mentioned this pull request Oct 14, 2020
5 tasks
@GabrielBrascher
Copy link
Member Author

@DaanHoogland @sureshanaparti @Pearl1594 @wido I have created PR #4405 addressing the removed affinity group ID.

I am sorry for all the trouble, guys. This was the first time that I messed this big with a PR.
I really appreciate all the reviews and heads up!

@DaanHoogland
Copy link
Contributor

np @GabrielBrascher thanks for the quick response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants