Cloudstack Source code
Go to file
Wei Zhou c1691a9e2d
ipv6: set default_egress_policy for ingress rules (#6364)
The issue is found in the smoke test `test/integration/smoke/test_network_ipv6.py`.
sometimes the test failed with error below
```
FAIL: Test to verify IPv6 network
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/marvin/lib/decoratorGenerators.py", line 30, in test_wrapper
    return test(self, *args, **kwargs)
  File "/marvin/test_network_ipv6.py", line 1215, in test_01_verify_ipv6_network
    self.checkNetworkRouting()
  File "/marvin/test_network_ipv6.py", line 1060, in checkNetworkRouting
    "Ping from VM %s of network %s to VM %s of network %s is unsuccessful" % (self.routing_test_vm.id, self.routing_test_network.id, self.virtual_machine.id, self.network.id))
AssertionError: False is not true : Ping from VM 0aa36a76-09c6-476f-97c5-b9cea27a5b7c of network 27a2b244-e319-46c5-a779-d6ae73eb9ac2 to VM ae13ea17-1f35-4ca7-83c1-e13126f8df79 of network 1f38a686-69f3-41ed-a75e-cd3f822497d8 is unsuccessful
```

After investigation, we found the egress traffic is dropped by `nft`.

a correct nft chain looks like
```
root@r-282-VM:~# nft list chain ip6 ip6_firewall fw_chain_egress
table ip6 ip6_firewall {
	chain fw_chain_egress {
		counter packets 0 bytes 0 accept
	}
}
```

However, some VRs has the following nft chain
```
root@r-280-VM:~# nft list chain ip6 ip6_firewall fw_chain_egress
table ip6 ip6_firewall {
	chain fw_chain_egress {
		counter packets 0 bytes 0 drop
	}
}
```

It is because the ingress rule does not have correct `default_egress_policy`
```
root@r-280-VM:~# cat /etc/cloudstack/ipv6firewallrules.json
{
  "0": {
    "already_added": false,
    "default_egress_policy": true,
    "dest_cidr_list": [],
    "guest_ip6_cidr": "fd17:ac56:1234:1a96::/64",
    "id": 0,
    "protocol": "all",
    "purpose": "Ipv6Firewall",
    "revoked": false,
    "source_cidr_list": [],
    "src_ip": "",
    "traffic_type": "Egress"
  },
  "1263": {
    "already_added": false,
    "default_egress_policy": false,
    "dest_cidr_list": [
      "::/0"
    ],
    "guest_ip6_cidr": "fd17:ac56:1234:1a96::/64",
    "icmp_code": -1,
    "icmp_type": -1,
    "id": 1263,
    "protocol": "icmp",
    "purpose": "Ipv6Firewall",
    "revoked": false,
    "source_cidr_list": [
      "::/0"
    ],
    "traffic_type": "Ingress"
  },
  "id": "ipv6firewallrules"
}
```

in mose time, the Egress rule is processed before Ingress rule.
But when the Ingress rule is processed at first, the nft chain will be wrong.
2022-05-07 09:37:42 -03:00
.github .github: run coverage for pushes to main branch 2022-05-04 02:23:47 +05:30
agent KVM: Enable SSL if keystore exists (#6200) 2022-04-22 11:51:21 -03:00
api network: fix event, acl, firewall for ipv6 nw (#6314) 2022-04-26 23:30:44 -03:00
build CLOUDSTACK-10012: Migrate to Embedded Jetty 2017-11-03 23:57:25 +05:30
client Mshost stats (#5588) 2022-04-22 08:48:19 -03:00
cloud-cli Add Python flake8 linting for W291 trailing whitespace with Super-Linter (#4687) 2022-03-28 11:40:26 -03:00
core network: fix event, acl, firewall for ipv6 nw (#6314) 2022-04-26 23:30:44 -03:00
debian SystemVM optimizations (#5831) 2022-04-21 13:40:19 -03:00
deps deps: fix pbm url download (#4440) 2020-11-03 18:13:31 +05:30
developer Updating pom.xml version numbers for release 4.17.0.0-SNAPSHOT 2021-11-09 22:55:52 -03:00
engine Bugfix: no support for XCPng 8.2.1 (#6362) 2022-05-06 13:04:52 -03:00
framework schema,server,api: events improvement (#5997) 2022-04-25 09:05:17 -03:00
packaging SystemVM optimizations (#5831) 2022-04-21 13:40:19 -03:00
plugins maven: Move apache DS dependencies to test scope (#6347) 2022-05-04 11:49:29 +05:30
python Add Python flake8 linting for W291 trailing whitespace with Super-Linter (#4687) 2022-03-28 11:40:26 -03:00
quickcloud Updating pom.xml version numbers for release 4.17.0.0-SNAPSHOT 2021-11-09 22:55:52 -03:00
scripts Change patch path during live patching of systemVMs (#6328) 2022-04-29 00:01:11 -03:00
server ipv6: set default_egress_policy for ingress rules (#6364) 2022-05-07 09:37:42 -03:00
services SystemVM optimizations (#5831) 2022-04-21 13:40:19 -03:00
setup Fix spelling (#6185) 2022-04-16 00:55:11 +05:30
systemvm systemvm: setup radvd correctly (#6343) 2022-05-03 17:53:32 -03:00
test test_network_ipv6.py : remove wrong icmp type (#6361) 2022-05-06 22:01:34 +02:00
tools Gateways after Nic update on Shared Network tests (#6355) 2022-05-05 19:53:31 -03:00
ui ui: Fix adding tags to compute and disk offering (#6360) 2022-05-06 07:52:12 -03:00
usage Merge branch '4.16' into main 2022-01-31 00:10:03 +05:30
utils Improve log when live patching fails (#6324) 2022-04-28 13:01:15 -03:00
vmware-base Feat/add vdisk UUID to list volume (#5848) 2022-04-19 23:34:09 -03:00
.asf.yaml .github: fix workflow settings and allow branch pushes to main by committers (#6225) 2022-04-07 13:49:03 +05:30
.dockerignore CLOUDSTACK-3049: Implemented role update for account. (#3058) 2019-01-25 10:02:56 -02:00
.gitignore Remove duplicate entry from `.gitignore` (#6192) 2022-04-04 14:42:15 -03:00
.java-version cloudstack: add JDK11 support (#3601) 2020-02-12 12:58:25 +05:30
.python-version python3: Migrate Marvin and smoketests to python3 (#4727) 2021-05-04 23:19:37 +05:30
.travis.yml Fix user shared networks tests (#6319) 2022-04-27 07:30:44 -03:00
CHANGES.md dummy commit to for PR close #95 2015-03-08 11:47:29 -04:00
CONTRIBUTING.md cloudstack: make code more inclusive 2021-06-08 15:47:20 +05:30
INSTALL.md INSTALL: updated maven download link (#4709) 2021-02-19 14:13:57 +05:30
ISSUE_TEMPLATE.md cloudstack: make code more inclusive 2021-06-08 15:47:20 +05:30
LICENSE CLOUDSTACK-10105: Use maven standard project structure in all projects (#2283) 2018-01-20 03:19:27 +05:30
LICENSE.header Add license check plugin to root pom. Disabled for the entire project, except for poms that override it (opendaylight, nvp) 2014-01-22 11:22:42 +01:00
NOTICE Update NOTICE to account for updated jQuery version 2014-08-26 13:13:29 -07:00
PULL_REQUEST_TEMPLATE.md cloudstack: make code more inclusive 2021-06-08 15:47:20 +05:30
PendingReleaseNotes Add a PendingRelease notes file (#2723) 2018-07-03 21:17:41 +02:00
README.md README: update badget based on new sonarcloud.io project 2022-05-03 21:04:14 +05:30
pom.xml maven: update sonarcloud project 2022-05-03 18:55:20 +05:30
requirements.txt CLOUDSTACK-8855 Improve Error Message for Host Alert State and reconnect host API. (#2387) 2018-03-14 15:27:43 -03:00

README.md

Apache CloudStack Build Status Quality Gate Status Lines of Code GitHub language count GitHub top language

Apache CloudStack

Apache CloudStack is open source software designed to deploy and manage large networks of virtual machines, as a highly available, highly scalable Infrastructure as a Service (IaaS) cloud computing platform. CloudStack is used by a number of service providers to offer public cloud services, and by many companies to provide an on-premises (private) cloud offering, or as part of a hybrid cloud solution.

CloudStack is a turnkey solution that includes the entire "stack" of features most organizations want with an IaaS cloud: compute orchestration, Network-as-a-Service, user and account management, a full and open native API, resource accounting, and a first-class User Interface (UI).

CloudStack currently supports the most popular hypervisors: VMware vSphere, KVM, XenServer, XenProject and Hyper-V as well as OVM and LXC containers.

Users can manage their cloud with an easy to use Web interface, command line tools, and/or a full-featured query based API.

For more information on Apache CloudStack, please visit the website

Who Uses CloudStack?

  • There are more than 150 known organizations using Apache CloudStack (or a commercial distribution of CloudStack). Our users include many major service providers running CloudStack to offer public cloud services, product vendors who incorporate or integrate with CloudStack in their own products, organizations who have used CloudStack to build their own private clouds, and systems integrators that offer CloudStack related services.

  • See our case studies highlighting successful deployments of Apache CloudStack.

  • See the up-to-date list of current users.

  • If you are using CloudStack in your organization and your company is not listed above, please complete our brief adoption survey. We're happy to keep your company name anonymous if you require.

Getting Started

  • Download a released version
  • Build from source with the instructions in the INSTALL.md file.

Getting Source Repository

Apache CloudStack project uses Git. The official Git repository is at:

https://gitbox.apache.org/repos/asf/cloudstack.git

And a mirror is hosted on Github:

https://github.com/apache/cloudstack

The Github mirror is strictly read only and provides convenience to users and developers to explore the code and for the community to accept contributions via Github pull requests.

Getting Involved and Contributing

Interested in helping out with Apache CloudStack? Great! We welcome participation from anybody willing to work The Apache Way and make a contribution. Note that you do not have to be a developer in order to contribute to Apache CloudStack. We need folks to help with documentation, translation, promotion etc. See our contribution page.

If you're interested in learning more or participating in the Apache CloudStack project, the mailing lists are the best way to do that. While the project has several communications channels, the mailing lists are the most active and the official channels for making decisions about the project itself.

Mailing lists:

Report and/or check bugs on Github and check our developer page for contributing code.

News and Events

Reporting Security Vulnerabilities

If you've found an issue that you believe is a security vulnerability in a released version of CloudStack, please report it to security@cloudstack.apache.org with details about the vulnerability, how it might be exploited, and any additional information that might be useful.

For more details, please visit our security page.

License

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Please see the LICENSE file included in the root directory of the source tree for extended license details.

Notice of Cryptographic Software

This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See http://www.wassenaar.org/ for more information.

The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this Apache Software Foundation distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code.

The following provides more details on the included cryptographic software:

  • CloudStack makes use of JaSypt cryptographic libraries.
  • CloudStack has a system requirement of MySQL, and uses native database encryption functionality.
  • CloudStack makes use of the Bouncy Castle general-purpose encryption library.
  • CloudStack can optionally interact with and control OpenSwan-based VPNs.
  • CloudStack has a dependency on and makes use of JSch - a java SSH2 implementation.