From 78602ff77d5ea0a43d35fb55c7a4913fa559779c Mon Sep 17 00:00:00 2001 From: Thomas Goirand Date: Wed, 20 Jan 2016 10:45:54 +0000 Subject: [PATCH] * Using oslo-config-generator to generate config files, as upstream moved to use that as well. --- debian/changelog | 2 + debian/neutron-common.install | 1 - debian/neutron-dhcp-agent.install | 1 - debian/neutron-l3-agent.install | 1 - debian/neutron-metadata-agent.install | 1 - debian/neutron-metering-agent.install | 1 - debian/patches/better-config-defaults.patch | 389 -------------------- debian/patches/series | 1 - debian/rules | 85 +++-- 9 files changed, 63 insertions(+), 419 deletions(-) delete mode 100644 debian/neutron-metadata-agent.install delete mode 100644 debian/neutron-metering-agent.install delete mode 100644 debian/patches/better-config-defaults.patch delete mode 100644 debian/patches/series diff --git a/debian/changelog b/debian/changelog index fe44a8c91..12f94b7ac 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ neutron (1:8.0.0~b2-1) experimental; urgency=medium * Rebased better-config-defaults.patch. * Added extend-diff-ignore = "^[^/]*[.]egg-info/" in d/source/options. * Did some cleanups in debian/rules. + * Using oslo-config-generator to generate config files, as upstream moved to + use that as well. -- Thomas Goirand Fri, 04 Dec 2015 09:03:42 +0100 diff --git a/debian/neutron-common.install b/debian/neutron-common.install index bf9ca9e4c..e4c3949c3 100644 --- a/debian/neutron-common.install +++ b/debian/neutron-common.install @@ -2,7 +2,6 @@ debian/dnsmasq-neutron.conf /etc/neutron debian/neutron_sudoers /etc/sudoers.d debian/plugin_guess_func /usr/share/neutron-common etc/api-paste.ini /usr/share/neutron-common -etc/neutron.conf /usr/share/neutron-common etc/neutron/plugins /etc/neutron etc/neutron/rootwrap.d/* /etc/neutron/rootwrap.d etc/policy.json /etc/neutron diff --git a/debian/neutron-dhcp-agent.install b/debian/neutron-dhcp-agent.install index 131644060..568ca1f03 100644 --- a/debian/neutron-dhcp-agent.install +++ b/debian/neutron-dhcp-agent.install @@ -1,2 +1 @@ debian/cron.d/neutron-dhcp-agent-netns-cleanup etc/cron.d -etc/dhcp_agent.ini etc/neutron diff --git a/debian/neutron-l3-agent.install b/debian/neutron-l3-agent.install index 5134363b1..913f215ee 100644 --- a/debian/neutron-l3-agent.install +++ b/debian/neutron-l3-agent.install @@ -1,2 +1 @@ debian/cron.d/neutron-l3-agent-netns-cleanup etc/cron.d -etc/l3_agent.ini etc/neutron diff --git a/debian/neutron-metadata-agent.install b/debian/neutron-metadata-agent.install deleted file mode 100644 index 32d783fec..000000000 --- a/debian/neutron-metadata-agent.install +++ /dev/null @@ -1 +0,0 @@ -etc/metadata_agent.ini /usr/share/neutron-metadata-agent diff --git a/debian/neutron-metering-agent.install b/debian/neutron-metering-agent.install deleted file mode 100644 index da7be40f4..000000000 --- a/debian/neutron-metering-agent.install +++ /dev/null @@ -1 +0,0 @@ -etc/metering_agent.ini etc/neutron diff --git a/debian/patches/better-config-defaults.patch b/debian/patches/better-config-defaults.patch deleted file mode 100644 index 43d19b49c..000000000 --- a/debian/patches/better-config-defaults.patch +++ /dev/null @@ -1,389 +0,0 @@ -Description: Better config defaults - This patch makes the default config closer to the install-guide, in order to - minimize the efforts needed to be done by newbies. -Author: Thomas Goirand -Forwarded: not-needed -Last-Update: 2015-12-04 - ---- neutron-8.0.0~b1.orig/etc/dhcp_agent.ini -+++ neutron-8.0.0~b1/etc/dhcp_agent.ini -@@ -9,14 +9,13 @@ - - # The DHCP agent requires an interface driver be set. Choose the one that best - # matches your plugin. --# interface_driver = -+interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver - - # Example of interface_driver option for OVS based plugins(OVS, Ryu, NEC, NVP, - # BigSwitch/Floodlight) --# interface_driver = openvswitch - - # Name of Open vSwitch bridge to use --# ovs_integration_bridge = br-int -+ovs_integration_bridge = br-int - - # Use veth for an OVS interface or not. - # Support kernels with limited namespace support -@@ -28,7 +27,7 @@ - - # The agent can use other DHCP drivers. Dnsmasq is the simplest and requires - # no additional setup of the DHCP server. --# dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq -+dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq - - # In some cases the neutron router is not present to provide the metadata - # IP but the DHCP server can be used to provide this info. Setting this -@@ -43,7 +42,7 @@ - # be activated when the subnet does not contain any router port. The guest - # instance must be configured to request host routes via DHCP (Option 121). - # This option doesn't have any effect when force_metadata is set to True. --# enable_isolated_metadata = False -+enable_isolated_metadata = False - - # Allows for serving metadata requests coming from a dedicated metadata - # access network whose cidr is 169.254.169.254/16 (or larger prefix), and -@@ -65,7 +64,7 @@ - # dhcp_domain = openstacklocal - - # Override the default dnsmasq settings with this file --# dnsmasq_config_file = -+dnsmasq_config_file = /etc/neutron/dnsmasq-neutron.conf - - # Comma-separated list of DNS servers which will be used by dnsmasq - # as forwarders. ---- neutron-8.0.0~b1.orig/etc/l3_agent.ini -+++ neutron-8.0.0~b1/etc/l3_agent.ini -@@ -4,11 +4,10 @@ - - # L3 requires that an interface driver be set. Choose the one that best - # matches your plugin. --# interface_driver = - - # Example of interface_driver option for OVS based plugins (OVS, Ryu, NEC) - # that supports L3 agent --# interface_driver = openvswitch -+interface_driver = openvswitch - - # Use veth for an OVS interface or not. - # Support kernels with limited namespace support -@@ -53,13 +52,13 @@ - # an external network gateway configured. This option should be True only - # for a single agent in a Neutron deployment, and may be False for all agents - # if all routers must have an external network gateway --# handle_internal_only_routers = True -+handle_internal_only_routers = True - - # Name of bridge used for external network traffic. This should be set to - # empty value for the linux bridge. when this parameter is set, each L3 agent - # can be associated with no more than one external network. - # This option is deprecated and will be removed in the M release. --# external_network_bridge = br-ex -+external_network_bridge = br-ex - - # TCP Port used by Neutron metadata server - # metadata_port = 9697 -@@ -77,7 +76,7 @@ - - # enable_metadata_proxy, which is true by default, can be set to False - # if the Nova metadata server is not available --# enable_metadata_proxy = True -+enable_metadata_proxy = True - - # Iptables mangle mark used to mark metadata valid requests - # metadata_access_mark = 0x1 -@@ -98,7 +97,7 @@ - # - dvr_snat: this enables centralized SNAT support in conjunction with - # DVR. This mode must be used for an L3 agent running on a centralized - # node (or in single-host deployments, e.g. devstack). --# agent_mode = legacy -+agent_mode = legacy - - # Location to store keepalived and all HA configurations - # ha_confs_path = $state_path/ha_confs -@@ -112,6 +111,8 @@ - # The advertisement interval in seconds - # ha_vrrp_advert_int = 2 - -+allow_automatic_l3agent_failover = False -+ - [AGENT] - # Log agent heartbeats from this L3 agent - # log_agent_heartbeats = False ---- neutron-8.0.0~b1.orig/etc/metadata_agent.ini -+++ neutron-8.0.0~b1/etc/metadata_agent.ini -@@ -9,7 +9,7 @@ - # nova_metadata_port = 8775 - - # Which protocol to use for requests to Nova metadata server, http or https --# nova_metadata_protocol = http -+nova_metadata_protocol = http - - # Whether insecure SSL connection should be accepted for Nova metadata server - # requests ---- neutron-8.0.0~b1.orig/etc/neutron.conf -+++ neutron-8.0.0~b1/etc/neutron.conf -@@ -58,7 +58,7 @@ - # entrypoint name. - # - # core_plugin = --# Example: core_plugin = ml2 -+core_plugin = ml2 - - # (StrOpt) Neutron IPAM (IP address management) driver to be loaded from the - # neutron.ipam_drivers namespace. See setup.cfg for the entry point names. -@@ -74,7 +74,7 @@ - # with previous versions, the class name of a plugin can be specified instead - # of its entrypoint name. - # --# service_plugins = -+service_plugins = router,metering - # Example: service_plugins = router,firewall,lbaas,vpnaas,metering,qos - - # Paste configuration file -@@ -89,7 +89,7 @@ - - # The strategy to be used for auth. - # Supported values are 'keystone'(default), 'noauth'. --# auth_strategy = keystone -+auth_strategy = keystone - - # Base MAC address. The first 3 octets will remain unchanged. If the - # 4h octet is not 00, it will also be used. The others will be -@@ -129,7 +129,7 @@ - # Enable or disable overlapping IPs for subnets - # Attention: the following parameter MUST be set to False if Neutron is - # being used in conjunction with nova security groups --# allow_overlapping_ips = False -+allow_overlapping_ips = True - # Ensure that configured gateway is on subnet. For IPv6, validate only if - # gateway is not a link local address. Deprecated, to be removed during the - # K release, at which point the check will be mandatory. -@@ -394,11 +394,11 @@ - - # ======== neutron nova interactions ========== - # Send notification to nova when port status is active. --# notify_nova_on_port_status_changes = True -+notify_nova_on_port_status_changes = True - - # Send notifications to nova when port data (fixed_ips/floatingips) change - # so nova can update it's cache. --# notify_nova_on_port_data_changes = True -+notify_nova_on_port_data_changes = True - - # Number of seconds between sending events to nova if there are any events to send - # send_events_interval = 2 -@@ -584,7 +584,7 @@ - - # The messaging driver to use, defaults to rabbit. Other - # drivers include qpid and zmq. (string value) --# rpc_backend=rabbit -+rpc_backend=rabbit - - # The default exchange under which topics are scoped. May be - # overridden by an exchange name specified in the -@@ -702,7 +702,7 @@ - # Use "sudo neutron-rootwrap /etc/neutron/rootwrap.conf" to use the real - # root filter facility. - # Change to "sudo" to skip the filtering and just run the command directly --# root_helper = sudo -+root_helper = sudo neutron-rootwrap /etc/neutron/rootwrap.conf - - # Set to true to add comments to generated iptables rules that describe - # each rule's purpose. (System must support the iptables comments module.) -@@ -744,11 +744,10 @@ admin_password = %SERVICE_PASSWORD% - - [database] - # This line MUST be changed to actually run the plugin. --# Example: --# connection = mysql+pymysql://root:pass@127.0.0.1:3306/neutron -+# Example: connection = mysql+pymysql://root:pass@127.0.0.1:3306/neutron - # Replace 127.0.0.1 above with the IP address of the database used by the - # main neutron server. (Leave it as is if the database runs on this host.) --# connection = sqlite:// -+connection = sqlite:///var/lib/neutron/neutrondb - # NOTE: In deployment the [database] section and its connection attribute may - # be set in the corresponding core plugin '.ini' file. However, it is suggested - # to put the [database] section and its connection attribute in this -@@ -810,7 +809,7 @@ admin_password = %SERVICE_PASSWORD% - # keyfile = - - # Name of nova region to use. Useful if keystone manages more than one region. --# region_name = -+region_name = regionOne - - # Timeout value for http requests - # timeout = -@@ -1001,7 +1000,7 @@ lock_path = $state_path/lock - - # The RabbitMQ broker address where a single node is used. (string value) - # Deprecated group/name - [DEFAULT]/rabbit_host --# rabbit_host = localhost -+rabbit_host = localhost - - # The RabbitMQ broker port where a single node is used. (integer value) - # Deprecated group/name - [DEFAULT]/rabbit_port -@@ -1017,11 +1016,11 @@ lock_path = $state_path/lock - - # The RabbitMQ userid. (string value) - # Deprecated group/name - [DEFAULT]/rabbit_userid --# rabbit_userid = guest -+rabbit_userid = guest - - # The RabbitMQ password. (string value) - # Deprecated group/name - [DEFAULT]/rabbit_password --# rabbit_password = guest -+rabbit_password = guest - - # The RabbitMQ login method. (string value) - # Deprecated group/name - [DEFAULT]/rabbit_login_method ---- neutron-8.0.0~b1.orig/etc/neutron/plugins/ml2/ml2_conf.ini -+++ neutron-8.0.0~b1/etc/neutron/plugins/ml2/ml2_conf.ini -@@ -2,20 +2,20 @@ - # (ListOpt) List of network type driver entrypoints to be loaded from - # the neutron.ml2.type_drivers namespace. - # --# type_drivers = local,flat,vlan,gre,vxlan,geneve -+type_drivers = flat,gre - # Example: type_drivers = flat,vlan,gre,vxlan,geneve - - # (ListOpt) Ordered list of network_types to allocate as tenant - # networks. The default value 'local' is useful for single-box testing - # but provides no connectivity between hosts. - # --# tenant_network_types = local -+tenant_network_types = gre - # Example: tenant_network_types = vlan,gre,vxlan,geneve - - - # (ListOpt) Ordered list of networking mechanism driver entrypoints - # to be loaded from the neutron.ml2.mechanism_drivers namespace. --# mechanism_drivers = -+mechanism_drivers = openvswitch,l2population - # Example: mechanism_drivers = openvswitch,mlnx - # Example: mechanism_drivers = arista - # Example: mechanism_drivers = openvswitch,cisco_nexus,logger -@@ -64,7 +64,7 @@ - # can be created. Use default '*' to allow flat networks with arbitrary - # physical_network names. Use an empty list to disable flat networks. - # --# flat_networks = * -+flat_networks = external - # Example:flat_networks = physnet1,physnet2 - # Example:flat_networks = - -@@ -80,7 +80,7 @@ - [ml2_type_gre] - # (ListOpt) Comma-separated list of : tuples enumerating - # ranges of GRE tunnel IDs that are available for tenant network allocation. --# tunnel_id_ranges = -+tunnel_id_ranges = 1:1000 - - [ml2_type_vxlan] - # (ListOpt) Comma-separated list of : tuples enumerating -@@ -114,8 +114,8 @@ - [securitygroup] - # Controls if neutron security group is enabled or not. - # It should be false when you use nova security group. --# enable_security_group = True -+enable_security_group = True - - # Use ipset to speed-up the iptables security groups. Enabling ipset support - # requires that ipset is installed on L2 agent node. --# enable_ipset = True -+enable_ipset = True ---- neutron-8.0.0~b1.orig/etc/neutron/plugins/ml2/openvswitch_agent.ini -+++ neutron-8.0.0~b1/etc/neutron/plugins/ml2/openvswitch_agent.ini -@@ -5,7 +5,7 @@ - # attached to this bridge and then "patched" according to their network - # connectivity. - # --# integration_bridge = br-int -+integration_bridge = br-int - - # Only used for the agent if tunnel_id_ranges is not empty for - # the server. In most cases, the default value should be fine. -@@ -35,7 +35,7 @@ - # Note: If you remove a bridge from this mapping, make sure to disconnect it - # from the integration bridge as it won't be managed by the agent anymore. - # --# bridge_mappings = -+bridge_mappings = external:br-ex - # Example: bridge_mappings = physnet1:br-eth1 - - # (BoolOpt) Use veths instead of patch ports to interconnect the integration -@@ -91,7 +91,7 @@ - # log_agent_heartbeats = False - - # Agent's polling interval in seconds --# polling_interval = 2 -+polling_interval = 15 - - # Minimize polling by monitoring ovsdb for interface changes - # minimize_polling = True -@@ -106,7 +106,7 @@ - # disable tunneling support in the agent. - # You can specify as many values here as your compute hosts supports. - # --# tunnel_types = -+tunnel_types = gre - # Example: tunnel_types = gre - # Example: tunnel_types = vxlan - # Example: tunnel_types = vxlan, gre -@@ -131,12 +131,12 @@ - # RPC calbbacks instead of tunnel_sync/update) on OVS agents in order to - # optimize tunnel management. - # --# l2_population = False -+l2_population = True - - # Enable local ARP responder. Requires OVS 2.1. This is only used by the l2 - # population ML2 MechanismDriver. - # --# arp_responder = False -+arp_responder = False - - # Enable suppression of ARP responses that don't match an IP address that - # belongs to the port from which they originate. -@@ -155,7 +155,7 @@ - # (BoolOpt) Set to True on L2 agents to enable support - # for distributed virtual routing. - # --# enable_distributed_routing = False -+enable_distributed_routing = False - - # (IntOpt) Set new timeout in seconds for new rpc calls after agent receives - # SIGTERM. If value is set to 0, rpc timeout won't be changed" -@@ -182,32 +182,8 @@ - - [securitygroup] - # Firewall driver for realizing neutron security group function. --# firewall_driver = neutron.agent.firewall.NoopFirewallDriver -+firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver - # Example: firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver -- - # Controls if neutron security group is enabled or not. - # It should be false when you use nova security group. - # enable_security_group = True -- --#----------------------------------------------------------------------------- --# Sample Configurations. --#----------------------------------------------------------------------------- --# --# 1. With VLANs on eth1. --# [ovs] --# integration_bridge = br-int --# bridge_mappings = default:br-eth1 --# --# 2. With GRE tunneling. --# [ovs] --# integration_bridge = br-int --# tunnel_bridge = br-tun --# local_ip = 10.0.0.3 --# --# 3. With VXLAN tunneling. --# [ovs] --# integration_bridge = br-int --# tunnel_bridge = br-tun --# local_ip = 10.0.0.3 --# [agent] --# tunnel_types = vxlan diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index d45a00c11..000000000 --- a/debian/patches/series +++ /dev/null @@ -1 +0,0 @@ -better-config-defaults.patch diff --git a/debian/rules b/debian/rules index b21531892..88692d4a6 100755 --- a/debian/rules +++ b/debian/rules @@ -9,34 +9,71 @@ PYTHONS:=$(shell pyversions -vr) dh $@ --buildsystem=python_distutils --with python2,systemd override_dh_auto_install: - echo "Nothing to do!" -# dh_auto_install -# find . -type d -name tests | xargs rm -fr -# for i in neutron/db/migration/alembic_migrations/versions/*.py ; do \ -# install -D -m 0664 $$i debian/tmp/usr/lib/python2.6/dist-packages/$$i ; \ -# install -D -m 0664 $$i debian/tmp/usr/lib/python2.7/dist-packages/$$i ; \ -# done + python2.7 setup.py install --install-layout=deb --root=$(CURDIR)/debian/tmp + cp -auxf neutron $(CURDIR)/debian/tmp/usr/lib/python2.7/dist-packages + rm -rf $(CURDIR)/debian/tmp/usr/lib + rm -rf $(CURDIR)/debian/tmp/usr/etc override_dh_install: - set -e ; for pyvers in $(PYTHONS) ; do \ - python$$pyvers setup.py install --install-layout=deb --root=$(CURDIR)/debian/neutron-common ; \ - python$$pyvers setup.py install --install-layout=deb --root=$(CURDIR)/debian/tmp ; \ - mkdir -p $(CURDIR)/debian/python-neutron/usr/lib/python$$pyvers/dist-packages ; \ - cp -auxf neutron $(CURDIR)/debian/python-neutron/usr/lib/python$$pyvers/dist-packages ; \ - done - dh_install -O--buildsystem=python_distutils --fail-missing -X/usr/etc -X/usr/bin - rm -rf $(CURDIR)/debian/neutron-common/usr/lib - rm -rf $(CURDIR)/debian/neutron-common/usr/etc + dh_install --fail-missing -X/usr/etc -X/usr/bin - install -D -m 0640 etc/neutron/plugins/ml2/openvswitch_agent.ini $(CURDIR)/debian/neutron-common/usr/share/neutron-common/openvswitch_agent.ini - - install -D -m 0640 etc/metadata_agent.ini $(CURDIR)/debian/neutron-metadata-agent/usr/share/neutron-metadata-agent/metadata_agent.ini + oslo-config-generator --output-file $(CURDIR)/debian/neutron-dhcp-agent/etc/neutron/dhcp_agent.ini \ + --wrap_width 140 \ + --namespace neutron.base.agent \ + --namespace neutron.dhcp.agent \ + --namespace oslo.log + oslo-config-generator --output-file $(CURDIR)/debian/neutron-l3-agent/etc/l3_agent.ini \ + --wrap-width 140 \ + --namespace neutron.base.agent \ + --namespace neutron.l3.agent \ + --namespace oslo.log + oslo-config-generator --output-file $(CURDIR)/debian/neutron-linuxbridge-agent/etc/neutron/plugins/ml2/linuxbridge_agent.ini \ + --wrap-width 140 \ + --namespace neutron.ml2.linuxbridge.agent \ + --namespace oslo.log + oslo-config-generator --output-file $(CURDIR)/debian/neutron-metadata-agent/usr/share/neutron-metadata-agent/metadata_agent.ini \ + --wrap-width 140 \ + --namespace neutron.metadata.agent \ + --namespace oslo.log sed -i -e 's|^# nova_metadata_ip = 127.0.0.1|nova_metadata_ip = 127.0.0.1|' $(CURDIR)/debian/neutron-metadata-agent/usr/share/neutron-metadata-agent/metadata_agent.ini - - # Move the OVS config file, since we use debconf for it - rm $(CURDIR)/debian/neutron-common/etc/neutron/plugins/ml2/openvswitch_agent.ini - install -D -m 0640 etc/neutron/plugins/ml2/openvswitch_agent.ini $(CURDIR)/debian/neutron-common/usr/share/neutron-common/openvswitch_agent.ini - + oslo-config-generator --output-file $(CURDIR)/debian/neutron-metering-agent/etc/neutron/metering_agent.ini \ + --wrap-width 140 \ + --namespace neutron.metering.agent \ + --namespace oslo.log + oslo-config-generator --output-file $(CURDIR)/debian/neutron-common/etc/neutron/plugins/ml2/ml2_conf.ini \ + --wrap-width 140 \ + --namespace neutron.ml2 \ + --namespace oslo.log + oslo-config-generator --output-file $(CURDIR)/debian/neutron-common/etc/neutron/plugins/ml2/ml2_conf_sriov.ini \ + --wrap-width 140 \ + --namespace neutron.ml2.sriov \ + --namespace oslo.log + oslo-config-generator --output-file $(CURDIR)/debian/neutron-common/etc/neutron/neutron.conf \ + --wrap-width 140 \ + --namespace neutron \ + --namespace neutron.agent \ + --namespace neutron.db \ + --namespace neutron.extensions \ + --namespace neutron.qos \ + --namespace nova.auth \ + --namespace oslo.log \ + --namespace oslo.db \ + --namespace oslo.policy \ + --namespace oslo.concurrency \ + --namespace oslo.messaging \ + --namespace oslo.middleware.cors \ + --namespace oslo.service.sslutils \ + --namespace oslo.service.wsgi \ + --namespace keystonemiddleware.auth_token + oslo-config-generator --output-file $(CURDIR)/debian/neutron-common/usr/share/neutron-common/openvswitch_agent.ini \ + --wrap_width 140 \ + --namespace neutron.ml2.ovs.agent \ + --namespace oslo.log + oslo-config-generator --output-file $(CURDIR)/debian/neutron-common/etc/neutron/plugins/ml2/sriov_agent.ini \ + --wrap_width 140 \ + --namespace neutron.ml2.sriov.agent \ + --namespace oslo.log + override_dh_auto_clean: dh_auto_clean find . -type f -name "*.pyc" | xargs rm -fr -- 2.45.2