FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

kvm: fix issue that network rules for secondary IPs are not applied by ustcweizhou · Pull Request #3636 · apache/cloudstack · GitHub

Repository navigation

kvm: fix issue that network rules for secondary IPs are not applied - #3636

Merged
yadvr merged 1 commit into
apache:4.13from
ustcweizhou:kvm-fix-rules-secondary-ips
Nov 21, 2019
Merged

yadvr merged 1 commit into
apache:4.13from
ustcweizhou:kvm-fix-rules-secondary-ips

Conversation

Copy link
Copy Markdown
Contributor

Description

When I add a secondary IP to a nic on shared network in advanced zone with security groups, the network rules for new IP are not applied on KVM hypervisors.
It is because "--action -A" cannot be recognized in security_group.py after commit ac73e7e. changing to "--action=-A" will fix it.

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)

Screenshots (if appropriate):

How Has This Been Tested?

When add a ip (ip must to be specified see #3635) to a nic, in advanced zone with security groups, the network rules for the ip should be added on hypervisor. However it does not work in 4.13/master.

in agent.log it gives the following error

root@node32:~# /usr/share/cloudstack-common/scripts/vm/network/security_group.py network_rules_vmSecondaryIp --vmname i-14-54-VM --nicsecips 192.168.116.246 --action -A
usage: security_group.py [-h] [--vmname VMNAME] [--vmip VMIP] [--vmip6 VMIP6]
                         [--vmid VMID] [--vmmac VMMAC] [--vif VIF] [--sig SIG]
                         [--seq SEQ] [--rules RULES] [--brname BRNAME]
                         [--localbrname LOCALBRNAME] [--dhcpSvr DHCPSVR]
                         [--hostIp HOSTIP] [--hostMacAddr HOSTMACADDR]
                         [--nicsecips NICSECIPS] [--action ACTION]
                         [--privnic PRIVNIC] [--isFirstNic] [--check]
                         command
security_group.py: error: argument --action: expected one argument

The rules (ipset, iptables, ebtables) are added after this fix.

When I add a secondary IP to a nic on shared network in advanced zone with security groups, the network rules for new IP are not applied on KVM hypervisors.
It is because "--action -A" cannot be recognized in security_group.py after commit ac73e7e. changing to "--action=-A" will fix it.

Copy link
Copy Markdown
Contributor Author

@wido @GabrielBrascher could you please review and test it ?

yadvr commented Nov 11, 2019

Copy link
Copy Markdown
Member

@blueorangutan package

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

GabrielBrascher left a comment •
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Code LGTM. Tested and it works.

yadvr commented Nov 21, 2019

Copy link
Copy Markdown
Member

Requires SG env that BO cannot kick by default, since manually tested, not kicking explicit test.

yadvr merged commit 23ca806 into apache:4.13 Nov 21, 2019
ustcweizhou added a commit to ustcweizhou/cloudstack that referenced this pull request Feb 28, 2020
…pache#3636)

When I add a secondary IP to a nic on shared network in advanced zone with security groups, the network rules for new IP are not applied on KVM hypervisors.
It is because "--action -A" cannot be recognized in security_group.py after commit ac73e7e. changing to "--action=-A" will fix it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

5 participants


Back | FazBrowse Home | New Git URL