Set MAAS internal proxy to 31800
Looks like new version of MAAS has fixed long standing bug https://bugs.launchpad.net/maas/+bug/1779712 This will match internal MAAS ports to NodePort. Change-Id: I639a4c492eb80545c69fd132d3b2dc4cca524933
This commit is contained in:
parent
cdfb1737da
commit
e53cb2d237
|
@ -118,6 +118,7 @@ function configure_proxy {
|
||||||
check_then_set enable_http_proxy ${MAAS_PROXY_ENABLED}
|
check_then_set enable_http_proxy ${MAAS_PROXY_ENABLED}
|
||||||
check_then_set use_peer_proxy ${MAAS_PEER_PROXY_ENABLED}
|
check_then_set use_peer_proxy ${MAAS_PEER_PROXY_ENABLED}
|
||||||
check_then_set http_proxy ${MAAS_PROXY_SERVER}
|
check_then_set http_proxy ${MAAS_PROXY_SERVER}
|
||||||
|
check_then_set maas_proxy_port ${MAAS_INTERNAL_PROXY_PORT}
|
||||||
}
|
}
|
||||||
|
|
||||||
function configure_ntp {
|
function configure_ntp {
|
||||||
|
|
|
@ -63,6 +63,8 @@ spec:
|
||||||
value: {{ .Values.conf.maas.proxy.peer_proxy_enabled | quote }}
|
value: {{ .Values.conf.maas.proxy.peer_proxy_enabled | quote }}
|
||||||
- name: MAAS_PROXY_SERVER
|
- name: MAAS_PROXY_SERVER
|
||||||
value: {{ .Values.conf.maas.proxy.proxy_server }}
|
value: {{ .Values.conf.maas.proxy.proxy_server }}
|
||||||
|
- name: MAAS_INTERNAL_PROXY_PORT
|
||||||
|
value: {{ .Values.network.port.service_proxy }}
|
||||||
- name: MAAS_HTTP_BOOT
|
- name: MAAS_HTTP_BOOT
|
||||||
value: {{ .Values.conf.maas.http_boot | quote }}
|
value: {{ .Values.conf.maas.http_boot | quote }}
|
||||||
- name: MAAS_NTP_SERVERS
|
- name: MAAS_NTP_SERVERS
|
||||||
|
|
|
@ -30,9 +30,9 @@ spec:
|
||||||
nodePort: {{ .Values.network.gui.node_port.port }}
|
nodePort: {{ .Values.network.gui.node_port.port }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
- port: {{ .Values.network.port.service_proxy }}
|
- port: {{ .Values.network.port.service_proxy }}
|
||||||
targetPort: {{ .Values.network.port.service_proxy_target }}
|
targetPort: {{ .Values.network.port.service_proxy }}
|
||||||
{{ if .Values.network.proxy.node_port.enabled }}
|
{{ if .Values.network.proxy.node_port.enabled }}
|
||||||
nodePort: {{ .Values.network.proxy.node_port.port }}
|
nodePort: {{ .Values.network.port.service_proxy }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
name: proxy
|
name: proxy
|
||||||
selector:
|
selector:
|
||||||
|
|
|
@ -105,8 +105,6 @@ network:
|
||||||
proxy:
|
proxy:
|
||||||
node_port:
|
node_port:
|
||||||
enabled: true
|
enabled: true
|
||||||
# Do not change the port, hardcoded in MAAS source
|
|
||||||
port: 31800
|
|
||||||
gui:
|
gui:
|
||||||
node_port:
|
node_port:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
@ -115,8 +113,7 @@ network:
|
||||||
region_container: 80
|
region_container: 80
|
||||||
service_gui: 80
|
service_gui: 80
|
||||||
service_gui_target: 80
|
service_gui_target: 80
|
||||||
service_proxy: 8000
|
service_proxy: 31800
|
||||||
service_proxy_target: 8000
|
|
||||||
db_service: 5432
|
db_service: 5432
|
||||||
db_service_target: 5432
|
db_service_target: 5432
|
||||||
|
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
diff --git a/src/maasserver/compose_preseed.py b/src/maasserver/compose_preseed.py
|
|
||||||
index f24b10f..f030469 100644
|
|
||||||
--- a/src/maasserver/compose_preseed.py
|
|
||||||
+++ b/src/maasserver/compose_preseed.py
|
|
||||||
@@ -8,7 +8,7 @@ __all__ = [
|
|
||||||
]
|
|
||||||
|
|
||||||
from datetime import timedelta
|
|
||||||
-from urllib.parse import urlencode
|
|
||||||
+from urllib.parse import urlencode, urlparse
|
|
||||||
|
|
||||||
from maasserver.clusterrpc.osystems import get_preseed_data
|
|
||||||
from maasserver.enum import (
|
|
||||||
@@ -17,6 +17,7 @@ from maasserver.enum import (
|
|
||||||
PRESEED_TYPE,
|
|
||||||
)
|
|
||||||
from maasserver.models import PackageRepository
|
|
||||||
+from maasserver.config import RegionConfiguration
|
|
||||||
from maasserver.models.config import Config
|
|
||||||
from maasserver.server_address import get_maas_facing_server_host
|
|
||||||
from maasserver.utils import absolute_reverse
|
|
||||||
@@ -43,11 +44,11 @@ def get_apt_proxy(rack_controller=None, default_region_ip=None):
|
|
||||||
else:
|
|
||||||
maas_proxy_port = Config.objects.get_config("maas_proxy_port")
|
|
||||||
if not maas_proxy_port:
|
|
||||||
- maas_proxy_port = 8000
|
|
||||||
+ maas_proxy_port = 31800
|
|
||||||
url = "http://:%d/" % maas_proxy_port
|
|
||||||
- return compose_URL(
|
|
||||||
- url, get_maas_facing_server_host(
|
|
||||||
- rack_controller, default_region_ip=default_region_ip))
|
|
||||||
+ with RegionConfiguration.open() as config:
|
|
||||||
+ maas_url = config.maas_url
|
|
||||||
+ return compose_URL(url, urlparse(maas_url).hostname)
|
|
||||||
else:
|
|
||||||
return None
|
|
|
@ -54,12 +54,10 @@ RUN apt-get download maas-region-controller=$MAAS_VERSION && \
|
||||||
pg_dropcluster --stop 9.5 main
|
pg_dropcluster --stop 9.5 main
|
||||||
|
|
||||||
# 2.3 workarounds
|
# 2.3 workarounds
|
||||||
COPY 2.3_proxy_port.patch /tmp/2.3_proxy_port.patch
|
|
||||||
COPY 2.3_route.patch /tmp/2.3_route.patch
|
COPY 2.3_route.patch /tmp/2.3_route.patch
|
||||||
COPY 2.3_kernel_package.patch /tmp/2.3_kernel_package.patch
|
COPY 2.3_kernel_package.patch /tmp/2.3_kernel_package.patch
|
||||||
COPY 2.3_bios_grub_partition.patch /tmp/2.3_bios_grub_partition.patch
|
COPY 2.3_bios_grub_partition.patch /tmp/2.3_bios_grub_partition.patch
|
||||||
COPY 2.3_bios_grub_preseed.patch /tmp/2.3_bios_grub_preseed.patch
|
COPY 2.3_bios_grub_preseed.patch /tmp/2.3_bios_grub_preseed.patch
|
||||||
RUN cd /usr/lib/python3/dist-packages/maasserver && patch compose_preseed.py < /tmp/2.3_proxy_port.patch
|
|
||||||
RUN cd /usr/lib/python3/dist-packages/maasserver && patch preseed_network.py < /tmp/2.3_route.patch
|
RUN cd /usr/lib/python3/dist-packages/maasserver && patch preseed_network.py < /tmp/2.3_route.patch
|
||||||
RUN cd /usr/lib/python3/dist-packages/maasserver && patch preseed.py < /tmp/2.3_kernel_package.patch
|
RUN cd /usr/lib/python3/dist-packages/maasserver && patch preseed.py < /tmp/2.3_kernel_package.patch
|
||||||
RUN cd /usr/lib/python3/dist-packages/maasserver/models && patch partition.py < /tmp/2.3_bios_grub_partition.patch
|
RUN cd /usr/lib/python3/dist-packages/maasserver/models && patch partition.py < /tmp/2.3_bios_grub_partition.patch
|
||||||
|
|
Loading…
Reference in New Issue