-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[VNC]Cleanup configuration #525
[VNC]Cleanup configuration #525
Conversation
After #522 lands the core of this PR will not be needed as #522 already removes the internal endpoint. But there are cleanups in the PR that still needed. Also there is extra cleanup discovered that can be done here:
|
5bde428
to
aa83737
Compare
We know that tempest will only be green again after openstack-k8s-operators/openstack-operator#457 is landed. |
/test nova-operator-build-deploy-tempest |
templates/nova.conf
Outdated
{{ if eq .service_name "nova-compute"}} | ||
{{ if (index . "novncproxy_base_url") }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be even more simplified to :
{{if eq .service_name "nova-novncproxy"}}
[vnc]
enabled = True
novncproxy_host = "::0"
novncproxy_port = 6080
{{else if (index . "novncproxy_base_url") }}
[vnc]
enabled = True
novncproxy_base_url = {{ .novncproxy_base_url }}
server_listen = "::0"
{{/* https://docs.openstack.org/oslo.config/latest/configuration/format.html#substitution */}}
# note we may want to use console_host instead of my_ip however it wont be resolved via
# dns currently so we need to use my_ip for now.
# https://docs.openstack.org/nova/latest/configuration/config.html#DEFAULT.console_host
server_proxyclient_address = "$my_ip"
{{else}}
[vnc]
enabled = False
{{end}}
or
{{if eq .service_name "nova-novncproxy"}}
[vnc]
enabled = True
novncproxy_host = "::0"
novncproxy_port = 6080
{{else if (index . "novncproxy_base_url") }}
[vnc]
enabled = True
novncproxy_base_url = {{ .novncproxy_base_url }}
server_listen = "::0"
{{/* https://docs.openstack.org/oslo.config/latest/configuration/format.html#substitution */}}
# note we may want to use console_host instead of my_ip however it wont be resolved via
# dns currently so we need to use my_ip for now.
# https://docs.openstack.org/nova/latest/configuration/config.html#DEFAULT.console_host
server_proxyclient_address = "$my_ip"
{{else if eq .service_name "nova-compute"}}
[vnc]
enabled = False
{{end}}
In both cases we have one logic block with fewer {{end}}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While it is less nesting it does not really express the same thing. We need [vnc] section for two types of services novnc and compute. And in case of a compute we either need to enable the vnc support (if we have the novncproxy_base_url) or disable it. We should not generate a [vnc] section for other services ever, not even if for some broken reason they get novncproxy_base_url template parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think log term we would be better to have a split configuration template but I need to discuss at with @SeanMooney
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is further complicated now that the ironic virt driver support landed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I managed to flatten it during the rebase
While reviewing other PRs we noticed that there is some unused template parameters for the vnc configurations. So I started cleaning up it. Then I noticed that never filled template parameters in our nova.conf related to vnc. So this PR cleans up the [vnc] section and the related config generation code. To be able to follow our template I split the template to compute and vncproxy parts and made sure that only the relevant configs are applied for each service. Also fixed a small bug that ignored config generation errors.
aa83737
to
863615c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gibizer, mrKisaoLamb The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/717ac83266f44020a431248f8fa43e55 ❌ nova-operator-content-provider FAILURE in 12m 12s |
I think the dataplane-operator version in openstack-operator is so old that we lost the bundle image for that commit from quay.io. :/ |
/retest |
recheck |
8734257
into
openstack-k8s-operators:main
@gibizer: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
While reviewing other PRs we noticed that there is some unused template
parameters for the vnc configurations. So I started cleaning up it. Then
I noticed that never filled template parameters in our nova.conf related
to vnc. So this PR cleans up the [vnc] section and the related config
generation code. To be able to follow our template I split the template
to compute and vncproxy parts and made sure that only the relevant
configs are applied for each service. Also fixed a small bug that
ignored config generation errors.