weizhouapache commented on code in PR #14841: URL: https://github.com/apache/cloudstack/pull/14841#discussion_r4679406006
########## systemvm/test/frr-bgppeers-ipv4-ipv6.conf: ########## @@ -14,9 +14,12 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. +frr version 8.4.4 Review Comment: remove this ########## server/src/main/java/org/apache/cloudstack/network/bgp/TenantBgpConfig.java: ########## @@ -0,0 +1,36 @@ +// 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. +package org.apache.cloudstack.network.bgp; + +import org.apache.cloudstack.framework.config.ConfigKey; + +/** + * Settings for BGP sessions on virtual routers. + */ +public final class TenantBgpConfig { Review Comment: just use `BGPService` ########## server/src/main/java/org/apache/cloudstack/network/bgp/TenantBgpConfig.java: ########## @@ -0,0 +1,36 @@ +// 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. +package org.apache.cloudstack.network.bgp; + +import org.apache.cloudstack.framework.config.ConfigKey; + +/** + * Settings for BGP sessions on virtual routers. + */ +public final class TenantBgpConfig { + + public static final ConfigKey<Integer> MinHoldtime = new ConfigKey<>(ConfigKey.CATEGORY_NETWORK, Integer.class, Review Comment: this could also become a BgpPeer setting, similar to EBGP_MultiHop it might be more simple ########## server/src/main/java/org/apache/cloudstack/diagnostics/fileprocessor/DiagnosticsFilesList.java: ########## @@ -40,7 +40,7 @@ public interface DiagnosticsFilesList { "diagnostics.data.router.defaults", "Advanced", "iptables,ipaddr,iprule,iproute,/etc/cloudstack-release," + "/etc/dnsmasq.conf,/etc/dhcphosts.txt,/etc/dhcpopts.txt,/etc/dnsmasq.d/cloud.conf,/etc/dnsmasq-resolv.conf,/var/lib/misc/dnsmasq.leases,/var/log/dnsmasq.log," + "/etc/hosts,/etc/resolv.conf,/etc/haproxy/haproxy.cfg,/var/log/haproxy.log,/etc/ipsec.d/l2tp.conf,/var/log/cloud.log," + - "/var/log/routerServiceMonitor.log,/var/log/daemon.log", + "/var/log/routerServiceMonitor.log,/var/log/daemon.log,/var/log/frr/frr.log,/var/cache/cloud/frr.conf.masked", Review Comment: frr.conf contains some sensitive info, not sure if good to add here by default ########## systemvm/test/frr-bgppeers-ipv4-ipv6.conf: ########## @@ -14,9 +14,12 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. +frr version 8.4.4 frr defaults traditional hostname r-1001-VM service integrated-vtysh-config +ip forwarding +ipv6 forwarding Review Comment: are these needed ? ########## server/src/main/java/org/apache/cloudstack/network/bgp/TenantBgpConfig.java: ########## @@ -0,0 +1,36 @@ +// 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. +package org.apache.cloudstack.network.bgp; + +import org.apache.cloudstack.framework.config.ConfigKey; + +/** + * Settings for BGP sessions on virtual routers. + */ +public final class TenantBgpConfig { + + public static final ConfigKey<Integer> MinHoldtime = new ConfigKey<>(ConfigKey.CATEGORY_NETWORK, Integer.class, Review Comment: would it be good to add it as an account setting or network (if possible) ? ########## tools/appliance/systemvmtemplate/scripts/install_systemvm_packages.sh: ########## @@ -73,7 +73,7 @@ function install_packages() { haproxy \ haveged \ radvd \ - frr \ + frr frr-pythontools \ Review Comment: just note, this requires the rebuild of systemvm template ########## systemvm/test/frr-bgppeers-ipv4-ipv6.conf: ########## @@ -27,6 +30,9 @@ ip prefix-list local-v4 seq 1 permit 10.1.1.0/24 ipv6 prefix-list local-v6 seq 1 permit 2001:db8:100::/64 router bgp 64512 bgp router-id 100.64.0.10 + bgp ebgp-requires-policy + bgp network import-check Review Comment: these 2 are enabled by default, no harmless to explicitly set both ########## server/src/main/java/org/apache/cloudstack/network/bgp/TenantBgpConfig.java: ########## @@ -0,0 +1,36 @@ +// 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. +package org.apache.cloudstack.network.bgp; + +import org.apache.cloudstack.framework.config.ConfigKey; + +/** + * Settings for BGP sessions on virtual routers. + */ +public final class TenantBgpConfig { + + public static final ConfigKey<Integer> MinHoldtime = new ConfigKey<>(ConfigKey.CATEGORY_NETWORK, Integer.class, + "vpc.gateway.bgp.min.holdtime", + "3", + "The lowest BGP hold time, in seconds, that a virtual router accepts. " + + "It applies to every BGP peer on the router. " + + "A session that negotiates a lower hold time, including 0, is refused.", + true); Review Comment: why use `vpc.gateway` ? will it affect routed networks other than routed vpcs ? ########## server/src/main/java/org/apache/cloudstack/network/bgp/TenantBgpConfig.java: ########## @@ -0,0 +1,36 @@ +// 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. +package org.apache.cloudstack.network.bgp; + +import org.apache.cloudstack.framework.config.ConfigKey; + +/** + * Settings for BGP sessions on virtual routers. + */ +public final class TenantBgpConfig { + + public static final ConfigKey<Integer> MinHoldtime = new ConfigKey<>(ConfigKey.CATEGORY_NETWORK, Integer.class, + "vpc.gateway.bgp.min.holdtime", + "3", Review Comment: is 3 too small ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
