Skip to content

Conversation

@DK101010
Copy link
Contributor

Description

Each VM deployed in CS get an alphanumeric value as internal CS name (cloud.vm.internal.name) . Each VM that will be ingested get no internal CS name and the internal name = VM name.

CS use for a couple of actions the internal CS name if exist and therefore CS can no longer update this properties. For an example power state.

This PR add the internalCSName to VirtualMaschineMO and UnmanagedInstanceTO inside the loadCache method to use this value as instance name during the ingest.

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)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Tested in own VMWare env.

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

makes sense, clgtm

…gerImpl.java

Co-authored-by: dahn <daan.hoogland@gmail.com>
@rohityadavcloud rohityadavcloud requested a review from shwstppr July 29, 2021 09:23
@rohityadavcloud rohityadavcloud added this to the 4.16.0.0 milestone Jul 29, 2021
@shwstppr
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

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

@shwstppr shwstppr closed this Jul 30, 2021
@shwstppr shwstppr reopened this Jul 30, 2021
@blueorangutan
Copy link

Packaging result: ✖️ el7 ✖️ el8 ✖️ debian. SL-JID 710

@shwstppr
Copy link
Contributor

@DK101010 can you please merge the latest main and fix the build issue

[ERROR] /jenkins/workspace/acs-centos7-pkg-builder/dist/rpmbuild/BUILD/cloudstack-4.16.0.0-SNAPSHOT/server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java:[961,11] error: reference to StringUtils is ambiguous
[ERROR]   both class org.apache.commons.lang3.StringUtils in org.apache.commons.lang3 and class org.apache.commons.lang.StringUtils in org.apache.commons.lang match

@shwstppr
Copy link
Contributor

shwstppr commented Aug 2, 2021

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 723

Copy link
Contributor

@shwstppr shwstppr left a comment

Choose a reason for hiding this comment

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

Works when VM has internal name set and it is of format i-[ACCOUNT_ID]-[VM_ID]-

@DaanHoogland
Copy link
Contributor

@shwstppr did you try other formats?

@DaanHoogland
Copy link
Contributor

And, @shwstppr , what do you mean "when VM has internal name"? isn't it set during ingestion?

@shwstppr
Copy link
Contributor

shwstppr commented Aug 2, 2021

@DaanHoogland

  • I've not debugged the reason but not all VMs have an internal name in vCenter in my env

  • I cloned a VM in vCenter. Cloned VM didn't have an internal name assigned though it had the property.
    Screenshot from 2021-08-02 14-47-17

  • I manually set the value there to ak-cloned
    Screenshot from 2021-08-02 14-48-45

  • Code didn't pick this value during import as the method isUserVMInternalCSName would return false. So after import instance_name in the vm_instancetable for the VM remainedcloned`
    Screenshot from 2021-08-02 13-51-36
    Screenshot from 2021-08-02 14-01-04

@shwstppr
Copy link
Contributor

shwstppr commented Aug 2, 2021

@DaanHoogland I think @DK101010 wants to fix the case where a CloudStack VM is unmanaged and then imported again it gets the correct instance name. In that case unmanaged VM will already have an internal name set. During import no change is made to cloud.vm.internal.name property

@rohityadavcloud
Copy link
Member

@blueorangutan test centos7 vmware-65u2

@blueorangutan
Copy link

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

@shwstppr
Copy link
Contributor

shwstppr commented Aug 8, 2021

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 795

@apache apache deleted a comment from blueorangutan Aug 9, 2021
@rohityadavcloud
Copy link
Member

@blueorangutan test centos7 vmware-65u2

@blueorangutan
Copy link

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

Copy link
Contributor

@nvazquez nvazquez left a comment

Choose a reason for hiding this comment

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

Code LGTM

…O.java

Co-authored-by: sureshanaparti <12028987+sureshanaparti@users.noreply.github.com>
@nvazquez
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result: ✖️ el7 ✖️ el8 ✖️ debian. SL-JID 835

@nvazquez
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result: ✖️ el7 ✖️ el8 ✖️ debian. SL-JID 836

…O.java

Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@shwstppr
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 840

@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

@blueorangutan
Copy link

Trillian test result (tid-1602)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 79572 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5242-t1602-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_diagnostics.py
Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
Intermittent failure detected: /marvin/tests/smoke/test_reset_vm_on_reboot.py
Intermittent failure detected: /marvin/tests/smoke/test_resource_accounting.py
Intermittent failure detected: /marvin/tests/smoke/test_router_dhcphosts.py
Intermittent failure detected: /marvin/tests/smoke/test_router_dns.py
Intermittent failure detected: /marvin/tests/smoke/test_router_dnsservice.py
Intermittent failure detected: /marvin/tests/smoke/test_routers_iptables_default_policy.py
Intermittent failure detected: /marvin/tests/smoke/test_routers_network_ops.py
Intermittent failure detected: /marvin/tests/smoke/test_routers.py
Intermittent failure detected: /marvin/tests/smoke/test_service_offerings.py
Intermittent failure detected: /marvin/tests/smoke/test_snapshots.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_router_nics.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_vpn.py
Smoke tests completed. 77 look OK, 12 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
ContextSuite context=TestResetVmOnReboot>:setup Error 0.00 test_reset_vm_on_reboot.py
ContextSuite context=TestRAMCPUResourceAccounting>:setup Error 0.00 test_resource_accounting.py
ContextSuite context=TestRouterDHCPHosts>:setup Error 0.00 test_router_dhcphosts.py
ContextSuite context=TestRouterDHCPOpts>:setup Error 0.00 test_router_dhcphosts.py
ContextSuite context=TestRouterDns>:setup Error 0.00 test_router_dns.py
ContextSuite context=TestRouterDnsService>:setup Error 0.00 test_router_dnsservice.py
ContextSuite context=TestRouterIpTablesPolicies>:setup Error 0.00 test_routers_iptables_default_policy.py
ContextSuite context=TestVPCIpTablesPolicies>:setup Error 0.00 test_routers_iptables_default_policy.py
ContextSuite context=TestIsolatedNetworks>:setup Error 0.00 test_routers_network_ops.py
ContextSuite context=TestRedundantIsolateNetworks>:setup Error 0.00 test_routers_network_ops.py
ContextSuite context=TestRouterServices>:setup Error 0.00 test_routers.py
ContextSuite context=TestCpuCapServiceOfferings>:setup Error 0.00 test_service_offerings.py
ContextSuite context=TestServiceOfferings>:setup Error 0.12 test_service_offerings.py
ContextSuite context=TestSnapshotRootDisk>:setup Error 0.00 test_snapshots.py
test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers Failure 420.57 test_vpc_redundant.py
test_02_VPC_default_routes Failure 975.94 test_vpc_router_nics.py

@DaanHoogland
Copy link
Contributor

@blueorangutan test keepEnv

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Trillian test result (tid-1627)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 34809 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5242-t1627-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_outofbandmanagement.py
Smoke tests completed. 89 look OK, 0 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File

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.

7 participants