From eaaa2392409f8cab9e5d095147a408d8704fa7fd Mon Sep 17 00:00:00 2001 From: zhangxuanyuan Date: Wed, 22 Nov 2017 15:17:45 +0800 Subject: [PATCH] Remove use_neutron from config Nova network has been fully removed, remove use_neutron config and related codes. Change-Id: Ib9d87dd339d637b69fb27315d92228cbc523c8eb Closes-Bug: #1693891 Implements: bp sahara-remove-nova-network --- devstack/plugin.sh | 3 -- .../admin/advanced-configuration-guide.rst | 23 ++++++----- doc/source/admin/configuration-guide.rst | 23 +---------- .../dashboard-dev-environment-guide.rst | 4 +- doc/source/install/dashboard-guide.rst | 9 ++--- doc/source/reference/plugin-spi.rst | 3 +- doc/source/user/features.rst | 7 +--- etc/sahara/sahara.conf.sample-basic | 14 ++----- .../remove-use-neutron-2499b661dce041d4.yaml | 6 +++ sahara/config.py | 30 +++----------- sahara/service/heat/templates.py | 39 +++++++------------ sahara/service/quotas.py | 23 ++--------- sahara/service/validations/base.py | 10 +---- sahara/service/validations/clusters.py | 9 +---- .../tests/unit/service/heat/test_templates.py | 35 ++--------------- sahara/tests/unit/service/test_networks.py | 2 - sahara/tests/unit/service/test_quotas.py | 17 -------- .../test_cluster_create_validation.py | 24 ------------ sahara/utils/network.py | 2 +- sahara/utils/ssh_remote.py | 9 +---- 20 files changed, 62 insertions(+), 230 deletions(-) create mode 100644 releasenotes/notes/remove-use-neutron-2499b661dce041d4.yaml diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 3b9bff8d35..98030ef802 100755 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -119,14 +119,11 @@ function configure_sahara { database connection `database_connection_url sahara` if is_service_enabled neutron; then - iniset $SAHARA_CONF_FILE DEFAULT use_neutron true iniset $SAHARA_CONF_FILE neutron endpoint_type $SAHARA_ENDPOINT_TYPE if is_ssl_enabled_service "neutron" \ || is_service_enabled tls-proxy; then iniset $SAHARA_CONF_FILE neutron ca_file $SSL_BUNDLE_FILE fi - else - iniset $SAHARA_CONF_FILE DEFAULT use_neutron false fi if is_ssl_enabled_service "heat" || is_service_enabled tls-proxy; then diff --git a/doc/source/admin/advanced-configuration-guide.rst b/doc/source/admin/advanced-configuration-guide.rst index b631b00f9b..1d742976b3 100644 --- a/doc/source/admin/advanced-configuration-guide.rst +++ b/doc/source/admin/advanced-configuration-guide.rst @@ -11,11 +11,10 @@ Custom network topologies ------------------------- Sahara accesses instances at several stages of cluster spawning through -SSH and HTTP. Floating IPs and network namespaces -(see :ref:`neutron-nova-network`) will be automatically used for -access when present. When floating IPs are not assigned to instances and -namespaces are not being used, sahara will need an alternative method to -reach them. +SSH and HTTP. Floating IPs and network namespaces will be automatically +used for access when present. When floating IPs are not assigned to +instances and namespaces are not being used, sahara will need an +alternative method to reach them. The ``proxy_command`` parameter of the configuration file can be used to give sahara a command to access instances. This command is run on the @@ -363,13 +362,13 @@ Indirect instance access through proxy nodes Sahara needs to access instances through SSH during cluster setup. This access can be obtained a number of different ways (see -:ref:`neutron-nova-network`, :ref:`floating_ip_management`, -:ref:`custom_network_topologies`). Sometimes it is impossible to provide -access to all nodes (because of limited numbers of floating IPs or security -policies). In these cases access can be gained using other nodes of the -cluster as proxy gateways. To enable this set ``is_proxy_gateway=true`` -for the node group you want to use as proxy. Sahara will communicate with -all other cluster instances through the instances of this node group. +:ref:`floating_ip_management`,:ref:`custom_network_topologies`).Sometimes +it is impossible to provide access to all nodes (because of limited +numbers of floating IPs or security policies). In these cases access can +be gained using other nodes of the cluster as proxy gateways. To enable +this set ``is_proxy_gateway=true`` for the node group you want to use as +proxy. Sahara will communicate with all other cluster instances through +the instances of this node group. Note, if ``use_floating_ips=true`` and the cluster contains a node group with ``is_proxy_gateway=true``, the requirement to have ``floating_ip_pool`` diff --git a/doc/source/admin/configuration-guide.rst b/doc/source/admin/configuration-guide.rst index 920dd8b2d0..7c38618837 100644 --- a/doc/source/admin/configuration-guide.rst +++ b/doc/source/admin/configuration-guide.rst @@ -52,21 +52,12 @@ Next you will configure the default Networking service. If using neutron for networking the following parameter should be set in the ``[DEFAULT]`` section: -.. sourcecode:: cfg - - use_neutron=true - -If you are using nova-network for networking then this parameter should -be set to ``false``. - With these parameters set, sahara is ready to run. By default the sahara's log level is set to INFO. If you wish to increase the logging levels for troubleshooting, set ``debug`` to ``true`` in the ``[DEFAULT]`` section of the configuration file. -.. _neutron-nova-network: - Networking configuration ------------------------ @@ -77,7 +68,6 @@ be used to enable their usage. .. sourcecode:: cfg [DEFAULT] - use_neutron=True use_namespaces=True .. note:: @@ -85,10 +75,6 @@ be used to enable their usage. instance and namespaces are used, some additional configuration is required, please see :ref:`non-root-users` for more information. -If an OpenStack cluster uses the deprecated nova-network, -then the ``use_neutron`` parameter should be set to ``False`` in the -sahara configuration file. - .. _floating_ip_management: Floating IP management @@ -102,11 +88,6 @@ to use floating IP addresses for access. This is controlled by the has two options for ensuring that the instances in the node groups templates that requires floating IPs gain a floating IP address: -* If using the nova-network, it may be configured to assign floating - IP addresses automatically by setting the ``auto_assign_floating_ip`` - parameter to ``True`` in the nova configuration file - (usually ``nova.conf``). - * The user may specify a floating IP address pool for each node group that requires floating IPs directly. @@ -122,9 +103,7 @@ use both. If not using floating IP addresses (``use_floating_ips=False``) sahara will use fixed IP addresses for instance management. When using neutron for the Networking service the user will be able to choose the -fixed IP network for all instances in a cluster. Whether using nova-network -or neutron it is important to ensure that all instances running sahara -have access to the fixed IP networks. +fixed IP network for all instances in a cluster. .. _notification-configuration: diff --git a/doc/source/contributor/dashboard-dev-environment-guide.rst b/doc/source/contributor/dashboard-dev-environment-guide.rst index 12d5b1807a..5923d88ba9 100644 --- a/doc/source/contributor/dashboard-dev-environment-guide.rst +++ b/doc/source/contributor/dashboard-dev-environment-guide.rst @@ -93,8 +93,8 @@ Set the proper values for host and url variables: OPENSTACK_HOST = "ip of your controller" .. -If you are using Nova-Network with ``auto_assign_floating_ip=True`` add the -following parameter: +If you wish to disable floating IP options during node group template +creation, add the following parameter: .. sourcecode:: python diff --git a/doc/source/install/dashboard-guide.rst b/doc/source/install/dashboard-guide.rst index 73a52deb9c..af5aaf2bc9 100644 --- a/doc/source/install/dashboard-guide.rst +++ b/doc/source/install/dashboard-guide.rst @@ -10,14 +10,12 @@ The sample configuration file is available `from the Horizon repository.