From fe8d651eaf43bd6cd09512c18fd0f66077ee8a39 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Tue, 13 Apr 2021 19:48:40 +0300 Subject: [PATCH] Remove nova console variables Bunch of variables that were related to nova consoles were missused or unneded at all. Here we deprecate and remove them, along with fixing behaviour to disable spice agent functionality. Change-Id: I28f6d733db689eab879ae5939d1236e7c0d5f521 Closes-Bug: #1923184 --- defaults/main.yml | 7 ++----- .../notes/nova_console_agent-399170af9ccfa258.yaml | 12 ++++++++++++ templates/nova.conf.j2 | 12 ++++++++---- 3 files changed, 22 insertions(+), 9 deletions(-) create mode 100644 releasenotes/notes/nova_console_agent-399170af9ccfa258.yaml diff --git a/defaults/main.yml b/defaults/main.yml index 1a57b9f4..0304a7e5 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -209,7 +209,7 @@ nova_spice_html5proxy_base_proto: "{{ openstack_service_publicuri_proto | defaul nova_spice_html5proxy_base_port: 6082 nova_spice_html5proxy_base_uri: "{{ nova_spice_html5proxy_base_proto }}://{{ external_lb_vip_address }}:{{ nova_spice_html5proxy_base_port }}" nova_spice_html5proxy_base_url: "{{ nova_spice_html5proxy_base_uri }}/spice_auto.html" -nova_spice_console_agent_enabled: "{{ ansible_facts['architecture'] != 'aarch64' }}" +nova_spice_console_agent_enabled: True nova_spicehtml5_git_repo: https://gitlab.freedesktop.org/spice/spice-html5.git nova_spicehtml5_git_install_branch: master @@ -221,7 +221,6 @@ nova_novncproxy_base_uri: "{{ nova_novncproxy_proto }}://{{ external_lb_vip_addr nova_novncproxy_base_url: "{{ nova_novncproxy_base_uri }}/vnc_lite.html" nova_novncproxy_vncserver_proxyclient_address: "{{ (nova_management_address == 'localhost') | ternary('127.0.0.1', nova_management_address) }}" nova_novncproxy_vncserver_listen: "{{ (nova_management_address == 'localhost') | ternary('127.0.0.1', nova_management_address) }}" -nova_novncproxy_agent_enabled: True nova_novncproxy_git_repo: "{{ novncproxy_git_repo | default('https://github.com/novnc/noVNC') }}" nova_novncproxy_git_install_branch: "{{ novncproxy_git_install_branch | default('master') }}" @@ -232,7 +231,6 @@ nova_serialconsoleproxy_port_range: 10000:20000 nova_serialconsoleproxy_base_uri: "{{ nova_serialconsoleproxy_proto }}://{{ external_lb_vip_address }}:{{ nova_serialconsoleproxy_port }}" nova_serialconsoleproxy_base_url: "{{ nova_serialconsoleproxy_base_uri }}" nova_serialconsoleproxy_serialconsole_proxyserver_proxyclient_address: "{{ ansible_host }}" -nova_serialconsoleproxy_enabled: True ## Nova metadata nova_metadata_proxy_enabled: "{{ nova_network_services[nova_network_type]['metadata_proxy_enabled'] | bool }}" @@ -261,8 +259,7 @@ nova_libvirt_hw_disk_discard: '{{ (nova_libvirt_images_rbd_pool | length > 0) | nova_libvirt_live_migration_inbound_addr: '{{ (nova_management_address == "localhost") | ternary("127.0.0.1", nova_management_address) }}' ## Nova console -nova_console_agent_enabled: "{{ ansible_facts['architecture'] != 'aarch64' }}" -# Set the console type. Presently the only options are ["spice", "novnc", "serialconsole"]. +# Set the console type. Presently the only options are ["spice", "novnc", "serialconsole", "disabled"]. nova_console_type: "{{ (ansible_facts['architecture'] == 'aarch64') | ternary('serialconsole', 'novnc') }}" # Nova console ssl info, presently only used by novnc console type diff --git a/releasenotes/notes/nova_console_agent-399170af9ccfa258.yaml b/releasenotes/notes/nova_console_agent-399170af9ccfa258.yaml new file mode 100644 index 00000000..899fff73 --- /dev/null +++ b/releasenotes/notes/nova_console_agent-399170af9ccfa258.yaml @@ -0,0 +1,12 @@ +--- +deprecations: + - | + Variables ``nova_novncproxy_agent_enabled``, + ``nova_serialconsoleproxy_enabled`` and ``nova_console_agent_enabled`` + are removed and won't have any effect in the future. If you want to + disable console functionality, set ``nova_console_type: disabled`` + in your user_variables.yml +fixes: + - | + Fixed behaviour of variable ``nova_spice_console_agent_enabled``. It can + be safely used now to disable spice agent when needed. diff --git a/templates/nova.conf.j2 b/templates/nova.conf.j2 index f3813e20..1e518307 100644 --- a/templates/nova.conf.j2 +++ b/templates/nova.conf.j2 @@ -76,8 +76,8 @@ os_region_name = {{ nova_service_region }} {% if nova_console_type == 'spice' %} [spice] -agent_enabled = {{ nova_console_agent_enabled }} -enabled = {{ nova_console_agent_enabled }} +agent_enabled = {{ nova_spice_console_agent_enabled }} +enabled = True # Console Url and binds html5proxy_base_url = {{ nova_spice_html5proxy_base_url }} html5proxy_host = {% if nova_management_address == 'localhost' %}127.0.0.1{% else %}{{ nova_management_address }}{% endif %} @@ -92,7 +92,7 @@ enabled = False {% elif nova_console_type == 'novnc' %} [vnc] -enabled = {{ nova_novncproxy_agent_enabled }} +enabled = True novncproxy_base_url = {{ nova_novncproxy_base_url }} novncproxy_host = {{ nova_novncproxy_host }} novncproxy_port = {{ nova_novncproxy_port }} @@ -101,7 +101,7 @@ server_proxyclient_address = {{ nova_novncproxy_vncserver_proxyclient_address }} {% elif nova_console_type == 'serialconsole' %} [serial_console] -enabled = {{ nova_serialconsoleproxy_enabled }} +enabled = True # Console Url and binds base_url= {{ nova_serialconsoleproxy_base_url }} proxyclient_address = {% if nova_management_address == 'localhost' %}127.0.0.1{% else %}{{ nova_management_address }}{% endif %} @@ -114,6 +114,10 @@ serialproxy_port= {{ nova_serialconsoleproxy_port }} [vnc] enabled = False +{% elif nova_console_type == 'disabled' %} +[vnc] +enabled = False + {% endif %} # Glance