Skip to content
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

Unable to deploy VMs via UI in advanced networks with SG and IPv6 cidr #3571

Merged

Conversation

GabrielBrascher
Copy link
Member

Description

When deploying a VM via UI, networks that have all the following characteristics are not listed on the wizard:

  • advanced networking with security groups
  • traffic type of "Guest"
  • guest type of "Shared"
  • IPv6 CIDR not null

This PR fixes it by removing the verification that counts the IPs from UserIpv6AddressVO in order to check if it can use the network for deploying new VMs in UI [1]. Table "user_ipv6_address" (UserIpv6AddressVO) is empty and will always be as it is a legacy code/table, not used in any IP
allocation flow. Therefore, the removed verification should be removed.

[1] com.cloud.network.NetworkModelImpl.canUseForDeploy(Network)

This PR fixes #3570

Why it happens

The Javascript code adds the parameter canusefordeploy=true on the API call when the network is an advanced network with security groups. With that, the endpoint (management server) expects "canUseForDeploy" to be true; however, the returned value is false due to not finding IPv6 addresses available in the network, which makes the UI to not list those networks.

#3569 IPv6 code cleanup: several PRs will be created in the near future aiming a complete cleanup on IPv6 code in order to avoid such mistakes to repeat

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

is not used; probably it is a legacy code/table.

Therefore, remove the verification that counts the IPs from
UserIpv6AddressVO in order to check if it can use the network for
deploying new VMs in UI [1].

[1] com.cloud.network.NetworkModelImpl.canUseForDeploy(Network).
Copy link
Contributor

@wido wido left a comment

Choose a reason for hiding this comment

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

LGTM

With IPv6 we do not need to track free IPs. Everything is calculated based on MAC and CIDR.

@PaulAngus
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

@PaulAngus 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-266

@rohityadavcloud
Copy link
Member

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

Test Result Time (s) Test File

@PaulAngus
Copy link
Member

Merging based on 2x LGTM and 0 errors in regression smoke tests

@PaulAngus PaulAngus merged commit 87c4350 into apache:master Aug 28, 2019
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.

Cannot choose network during VM deployment on UI
5 participants