Change-Id: Ib9054bacc34e923c05f0bc699afd514eaa3cad01
| ... | ... |
@@ -1757,98 +1757,98 @@ if is_service_enabled nova; then |
| 1757 | 1757 |
# Rebuild the config file from scratch |
| 1758 | 1758 |
create_nova_conf |
| 1759 | 1759 |
init_nova |
| 1760 |
-fi |
|
| 1761 |
- |
|
| 1762 |
-# Additional Nova configuration that is dependent on other services |
|
| 1763 |
-if is_service_enabled quantum; then |
|
| 1764 |
- add_nova_opt "network_api_class=nova.network.quantumv2.api.API" |
|
| 1765 |
- add_nova_opt "quantum_admin_username=$Q_ADMIN_USERNAME" |
|
| 1766 |
- add_nova_opt "quantum_admin_password=$SERVICE_PASSWORD" |
|
| 1767 |
- add_nova_opt "quantum_admin_auth_url=$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_AUTH_PORT/v2.0" |
|
| 1768 |
- add_nova_opt "quantum_auth_strategy=$Q_AUTH_STRATEGY" |
|
| 1769 |
- add_nova_opt "quantum_admin_tenant_name=$SERVICE_TENANT_NAME" |
|
| 1770 |
- add_nova_opt "quantum_url=http://$Q_HOST:$Q_PORT" |
|
| 1771 | 1760 |
|
| 1772 |
- if [[ "$Q_PLUGIN" = "openvswitch" ]]; then |
|
| 1773 |
- NOVA_VIF_DRIVER="nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver" |
|
| 1774 |
- elif [[ "$Q_PLUGIN" = "linuxbridge" ]]; then |
|
| 1775 |
- NOVA_VIF_DRIVER="nova.virt.libvirt.vif.QuantumLinuxBridgeVIFDriver" |
|
| 1776 |
- elif [[ "$Q_PLUGIN" = "ryu" ]]; then |
|
| 1777 |
- NOVA_VIF_DRIVER="quantum.plugins.ryu.nova.vif.LibvirtOpenVswitchOFPRyuDriver" |
|
| 1778 |
- add_nova_opt "libvirt_ovs_integration_bridge=$OVS_BRIDGE" |
|
| 1779 |
- add_nova_opt "linuxnet_ovs_ryu_api_host=$RYU_API_HOST:$RYU_API_PORT" |
|
| 1780 |
- add_nova_opt "libvirt_ovs_ryu_api_host=$RYU_API_HOST:$RYU_API_PORT" |
|
| 1761 |
+ # Additional Nova configuration that is dependent on other services |
|
| 1762 |
+ if is_service_enabled quantum; then |
|
| 1763 |
+ add_nova_opt "network_api_class=nova.network.quantumv2.api.API" |
|
| 1764 |
+ add_nova_opt "quantum_admin_username=$Q_ADMIN_USERNAME" |
|
| 1765 |
+ add_nova_opt "quantum_admin_password=$SERVICE_PASSWORD" |
|
| 1766 |
+ add_nova_opt "quantum_admin_auth_url=$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_AUTH_PORT/v2.0" |
|
| 1767 |
+ add_nova_opt "quantum_auth_strategy=$Q_AUTH_STRATEGY" |
|
| 1768 |
+ add_nova_opt "quantum_admin_tenant_name=$SERVICE_TENANT_NAME" |
|
| 1769 |
+ add_nova_opt "quantum_url=http://$Q_HOST:$Q_PORT" |
|
| 1770 |
+ |
|
| 1771 |
+ if [[ "$Q_PLUGIN" = "openvswitch" ]]; then |
|
| 1772 |
+ NOVA_VIF_DRIVER="nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver" |
|
| 1773 |
+ elif [[ "$Q_PLUGIN" = "linuxbridge" ]]; then |
|
| 1774 |
+ NOVA_VIF_DRIVER="nova.virt.libvirt.vif.QuantumLinuxBridgeVIFDriver" |
|
| 1775 |
+ elif [[ "$Q_PLUGIN" = "ryu" ]]; then |
|
| 1776 |
+ NOVA_VIF_DRIVER="quantum.plugins.ryu.nova.vif.LibvirtOpenVswitchOFPRyuDriver" |
|
| 1777 |
+ add_nova_opt "libvirt_ovs_integration_bridge=$OVS_BRIDGE" |
|
| 1778 |
+ add_nova_opt "linuxnet_ovs_ryu_api_host=$RYU_API_HOST:$RYU_API_PORT" |
|
| 1779 |
+ add_nova_opt "libvirt_ovs_ryu_api_host=$RYU_API_HOST:$RYU_API_PORT" |
|
| 1780 |
+ fi |
|
| 1781 |
+ add_nova_opt "libvirt_vif_driver=$NOVA_VIF_DRIVER" |
|
| 1782 |
+ add_nova_opt "linuxnet_interface_driver=$LINUXNET_VIF_DRIVER" |
|
| 1783 |
+ elif is_service_enabled n-net; then |
|
| 1784 |
+ add_nova_opt "network_manager=nova.network.manager.$NET_MAN" |
|
| 1785 |
+ add_nova_opt "public_interface=$PUBLIC_INTERFACE" |
|
| 1786 |
+ add_nova_opt "vlan_interface=$VLAN_INTERFACE" |
|
| 1787 |
+ add_nova_opt "flat_network_bridge=$FLAT_NETWORK_BRIDGE" |
|
| 1788 |
+ if [ -n "$FLAT_INTERFACE" ]; then |
|
| 1789 |
+ add_nova_opt "flat_interface=$FLAT_INTERFACE" |
|
| 1790 |
+ fi |
|
| 1781 | 1791 |
fi |
| 1782 |
- add_nova_opt "libvirt_vif_driver=$NOVA_VIF_DRIVER" |
|
| 1783 |
- add_nova_opt "linuxnet_interface_driver=$LINUXNET_VIF_DRIVER" |
|
| 1784 |
-else |
|
| 1785 |
- add_nova_opt "network_manager=nova.network.manager.$NET_MAN" |
|
| 1786 |
- add_nova_opt "public_interface=$PUBLIC_INTERFACE" |
|
| 1787 |
- add_nova_opt "vlan_interface=$VLAN_INTERFACE" |
|
| 1788 |
- add_nova_opt "flat_network_bridge=$FLAT_NETWORK_BRIDGE" |
|
| 1789 |
- if [ -n "$FLAT_INTERFACE" ]; then |
|
| 1790 |
- add_nova_opt "flat_interface=$FLAT_INTERFACE" |
|
| 1792 |
+ # All nova-compute workers need to know the vnc configuration options |
|
| 1793 |
+ # These settings don't hurt anything if n-xvnc and n-novnc are disabled |
|
| 1794 |
+ if is_service_enabled n-cpu; then |
|
| 1795 |
+ NOVNCPROXY_URL=${NOVNCPROXY_URL:-"http://$SERVICE_HOST:6080/vnc_auto.html"}
|
|
| 1796 |
+ add_nova_opt "novncproxy_base_url=$NOVNCPROXY_URL" |
|
| 1797 |
+ XVPVNCPROXY_URL=${XVPVNCPROXY_URL:-"http://$SERVICE_HOST:6081/console"}
|
|
| 1798 |
+ add_nova_opt "xvpvncproxy_base_url=$XVPVNCPROXY_URL" |
|
| 1799 |
+ fi |
|
| 1800 |
+ if [ "$VIRT_DRIVER" = 'xenserver' ]; then |
|
| 1801 |
+ VNCSERVER_PROXYCLIENT_ADDRESS=${VNCSERVER_PROXYCLIENT_ADDRESS=169.254.0.1}
|
|
| 1802 |
+ else |
|
| 1803 |
+ VNCSERVER_PROXYCLIENT_ADDRESS=${VNCSERVER_PROXYCLIENT_ADDRESS=127.0.0.1}
|
|
| 1804 |
+ fi |
|
| 1805 |
+ # Address on which instance vncservers will listen on compute hosts. |
|
| 1806 |
+ # For multi-host, this should be the management ip of the compute host. |
|
| 1807 |
+ VNCSERVER_LISTEN=${VNCSERVER_LISTEN=127.0.0.1}
|
|
| 1808 |
+ add_nova_opt "vncserver_listen=$VNCSERVER_LISTEN" |
|
| 1809 |
+ add_nova_opt "vncserver_proxyclient_address=$VNCSERVER_PROXYCLIENT_ADDRESS" |
|
| 1810 |
+ add_nova_opt "ec2_dmz_host=$EC2_DMZ_HOST" |
|
| 1811 |
+ if is_service_enabled zeromq; then |
|
| 1812 |
+ add_nova_opt "rpc_backend=nova.openstack.common.rpc.impl_zmq" |
|
| 1813 |
+ elif is_service_enabled qpid; then |
|
| 1814 |
+ add_nova_opt "rpc_backend=nova.rpc.impl_qpid" |
|
| 1815 |
+ elif [ -n "$RABBIT_HOST" ] && [ -n "$RABBIT_PASSWORD" ]; then |
|
| 1816 |
+ add_nova_opt "rabbit_host=$RABBIT_HOST" |
|
| 1817 |
+ add_nova_opt "rabbit_password=$RABBIT_PASSWORD" |
|
| 1818 |
+ fi |
|
| 1819 |
+ add_nova_opt "glance_api_servers=$GLANCE_HOSTPORT" |
|
| 1820 |
+ |
|
| 1821 |
+ |
|
| 1822 |
+ # XenServer |
|
| 1823 |
+ # --------- |
|
| 1824 |
+ |
|
| 1825 |
+ if [ "$VIRT_DRIVER" = 'xenserver' ]; then |
|
| 1826 |
+ echo_summary "Using XenServer virtualization driver" |
|
| 1827 |
+ read_password XENAPI_PASSWORD "ENTER A PASSWORD TO USE FOR XEN." |
|
| 1828 |
+ add_nova_opt "compute_driver=xenapi.XenAPIDriver" |
|
| 1829 |
+ XENAPI_CONNECTION_URL=${XENAPI_CONNECTION_URL:-"http://169.254.0.1"}
|
|
| 1830 |
+ XENAPI_USER=${XENAPI_USER:-"root"}
|
|
| 1831 |
+ add_nova_opt "xenapi_connection_url=$XENAPI_CONNECTION_URL" |
|
| 1832 |
+ add_nova_opt "xenapi_connection_username=$XENAPI_USER" |
|
| 1833 |
+ add_nova_opt "xenapi_connection_password=$XENAPI_PASSWORD" |
|
| 1834 |
+ add_nova_opt "flat_injected=False" |
|
| 1835 |
+ # Need to avoid crash due to new firewall support |
|
| 1836 |
+ XEN_FIREWALL_DRIVER=${XEN_FIREWALL_DRIVER:-"nova.virt.firewall.IptablesFirewallDriver"}
|
|
| 1837 |
+ add_nova_opt "firewall_driver=$XEN_FIREWALL_DRIVER" |
|
| 1838 |
+ elif [ "$VIRT_DRIVER" = 'openvz' ]; then |
|
| 1839 |
+ echo_summary "Using OpenVZ virtualization driver" |
|
| 1840 |
+ # TODO(deva): OpenVZ driver does not yet work if compute_driver is set here. |
|
| 1841 |
+ # Replace connection_type when this is fixed. |
|
| 1842 |
+ # add_nova_opt "compute_driver=openvz.connection.OpenVzConnection" |
|
| 1843 |
+ add_nova_opt "connection_type=openvz" |
|
| 1844 |
+ LIBVIRT_FIREWALL_DRIVER=${LIBVIRT_FIREWALL_DRIVER:-"nova.virt.libvirt.firewall.IptablesFirewallDriver"}
|
|
| 1845 |
+ add_nova_opt "firewall_driver=$LIBVIRT_FIREWALL_DRIVER" |
|
| 1846 |
+ else |
|
| 1847 |
+ echo_summary "Using libvirt virtualization driver" |
|
| 1848 |
+ add_nova_opt "compute_driver=libvirt.LibvirtDriver" |
|
| 1849 |
+ LIBVIRT_FIREWALL_DRIVER=${LIBVIRT_FIREWALL_DRIVER:-"nova.virt.libvirt.firewall.IptablesFirewallDriver"}
|
|
| 1850 |
+ add_nova_opt "firewall_driver=$LIBVIRT_FIREWALL_DRIVER" |
|
| 1791 | 1851 |
fi |
| 1792 |
-fi |
|
| 1793 |
-# All nova-compute workers need to know the vnc configuration options |
|
| 1794 |
-# These settings don't hurt anything if n-xvnc and n-novnc are disabled |
|
| 1795 |
-if is_service_enabled n-cpu; then |
|
| 1796 |
- NOVNCPROXY_URL=${NOVNCPROXY_URL:-"http://$SERVICE_HOST:6080/vnc_auto.html"}
|
|
| 1797 |
- add_nova_opt "novncproxy_base_url=$NOVNCPROXY_URL" |
|
| 1798 |
- XVPVNCPROXY_URL=${XVPVNCPROXY_URL:-"http://$SERVICE_HOST:6081/console"}
|
|
| 1799 |
- add_nova_opt "xvpvncproxy_base_url=$XVPVNCPROXY_URL" |
|
| 1800 |
-fi |
|
| 1801 |
-if [ "$VIRT_DRIVER" = 'xenserver' ]; then |
|
| 1802 |
- VNCSERVER_PROXYCLIENT_ADDRESS=${VNCSERVER_PROXYCLIENT_ADDRESS=169.254.0.1}
|
|
| 1803 |
-else |
|
| 1804 |
- VNCSERVER_PROXYCLIENT_ADDRESS=${VNCSERVER_PROXYCLIENT_ADDRESS=127.0.0.1}
|
|
| 1805 |
-fi |
|
| 1806 |
-# Address on which instance vncservers will listen on compute hosts. |
|
| 1807 |
-# For multi-host, this should be the management ip of the compute host. |
|
| 1808 |
-VNCSERVER_LISTEN=${VNCSERVER_LISTEN=127.0.0.1}
|
|
| 1809 |
-add_nova_opt "vncserver_listen=$VNCSERVER_LISTEN" |
|
| 1810 |
-add_nova_opt "vncserver_proxyclient_address=$VNCSERVER_PROXYCLIENT_ADDRESS" |
|
| 1811 |
-add_nova_opt "ec2_dmz_host=$EC2_DMZ_HOST" |
|
| 1812 |
-if is_service_enabled zeromq; then |
|
| 1813 |
- add_nova_opt "rpc_backend=nova.openstack.common.rpc.impl_zmq" |
|
| 1814 |
-elif is_service_enabled qpid; then |
|
| 1815 |
- add_nova_opt "rpc_backend=nova.rpc.impl_qpid" |
|
| 1816 |
-elif [ -n "$RABBIT_HOST" ] && [ -n "$RABBIT_PASSWORD" ]; then |
|
| 1817 |
- add_nova_opt "rabbit_host=$RABBIT_HOST" |
|
| 1818 |
- add_nova_opt "rabbit_password=$RABBIT_PASSWORD" |
|
| 1819 |
-fi |
|
| 1820 |
-add_nova_opt "glance_api_servers=$GLANCE_HOSTPORT" |
|
| 1821 |
- |
|
| 1822 |
- |
|
| 1823 |
-# XenServer |
|
| 1824 |
-# --------- |
|
| 1825 |
- |
|
| 1826 |
-if [ "$VIRT_DRIVER" = 'xenserver' ]; then |
|
| 1827 |
- echo_summary "Using XenServer virtualization driver" |
|
| 1828 |
- read_password XENAPI_PASSWORD "ENTER A PASSWORD TO USE FOR XEN." |
|
| 1829 |
- add_nova_opt "compute_driver=xenapi.XenAPIDriver" |
|
| 1830 |
- XENAPI_CONNECTION_URL=${XENAPI_CONNECTION_URL:-"http://169.254.0.1"}
|
|
| 1831 |
- XENAPI_USER=${XENAPI_USER:-"root"}
|
|
| 1832 |
- add_nova_opt "xenapi_connection_url=$XENAPI_CONNECTION_URL" |
|
| 1833 |
- add_nova_opt "xenapi_connection_username=$XENAPI_USER" |
|
| 1834 |
- add_nova_opt "xenapi_connection_password=$XENAPI_PASSWORD" |
|
| 1835 |
- add_nova_opt "flat_injected=False" |
|
| 1836 |
- # Need to avoid crash due to new firewall support |
|
| 1837 |
- XEN_FIREWALL_DRIVER=${XEN_FIREWALL_DRIVER:-"nova.virt.firewall.IptablesFirewallDriver"}
|
|
| 1838 |
- add_nova_opt "firewall_driver=$XEN_FIREWALL_DRIVER" |
|
| 1839 |
-elif [ "$VIRT_DRIVER" = 'openvz' ]; then |
|
| 1840 |
- echo_summary "Using OpenVZ virtualization driver" |
|
| 1841 |
- # TODO(deva): OpenVZ driver does not yet work if compute_driver is set here. |
|
| 1842 |
- # Replace connection_type when this is fixed. |
|
| 1843 |
- # add_nova_opt "compute_driver=openvz.connection.OpenVzConnection" |
|
| 1844 |
- add_nova_opt "connection_type=openvz" |
|
| 1845 |
- LIBVIRT_FIREWALL_DRIVER=${LIBVIRT_FIREWALL_DRIVER:-"nova.virt.libvirt.firewall.IptablesFirewallDriver"}
|
|
| 1846 |
- add_nova_opt "firewall_driver=$LIBVIRT_FIREWALL_DRIVER" |
|
| 1847 |
-else |
|
| 1848 |
- echo_summary "Using libvirt virtualization driver" |
|
| 1849 |
- add_nova_opt "compute_driver=libvirt.LibvirtDriver" |
|
| 1850 |
- LIBVIRT_FIREWALL_DRIVER=${LIBVIRT_FIREWALL_DRIVER:-"nova.virt.libvirt.firewall.IptablesFirewallDriver"}
|
|
| 1851 |
- add_nova_opt "firewall_driver=$LIBVIRT_FIREWALL_DRIVER" |
|
| 1852 | 1852 |
fi |
| 1853 | 1853 |
|
| 1854 | 1854 |
|