Merge ~andreserl/maas:lp1787381_2.3_maas_proxy_port into maas:2.3

Proposed by Andres Rodriguez
Status: Merged
Approved by: Andres Rodriguez
Approved revision: 6eeefbbfa66f6af51efcf4f616a2c6cde875b2c3
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~andreserl/maas:lp1787381_2.3_maas_proxy_port
Merge into: maas:2.3
Diff against target: 35 lines (+12/-1)
2 files modified
src/maasserver/compose_preseed.py (+2/-0)
src/maasserver/forms/__init__.py (+10/-1)
Reviewer Review Type Date Requested Status
MAAS Lander Approve
Andres Rodriguez (community) Approve
Review via email: mp+353271@code.launchpad.net

Commit message

Backport 3d9ace9 - LP: #1787381 - Prevent the UI from re-setting proxy config settings.

To post a comment you must log in.
Revision history for this message
Andres Rodriguez (andreserl) wrote :

selfie!

review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b lp1787381_2.3_maas_proxy_port lp:~andreserl/maas/+git/maas into -b 2.3 lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: 6eeefbbfa66f6af51efcf4f616a2c6cde875b2c3

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/maasserver/compose_preseed.py b/src/maasserver/compose_preseed.py
2index 8e5897d..f24b10f 100644
3--- a/src/maasserver/compose_preseed.py
4+++ b/src/maasserver/compose_preseed.py
5@@ -42,6 +42,8 @@ def get_apt_proxy(rack_controller=None, default_region_ip=None):
6 return http_proxy
7 else:
8 maas_proxy_port = Config.objects.get_config("maas_proxy_port")
9+ if not maas_proxy_port:
10+ maas_proxy_port = 8000
11 url = "http://:%d/" % maas_proxy_port
12 return compose_URL(
13 url, get_maas_facing_server_host(
14diff --git a/src/maasserver/forms/__init__.py b/src/maasserver/forms/__init__.py
15index c24186b..322aa6a 100644
16--- a/src/maasserver/forms/__init__.py
17+++ b/src/maasserver/forms/__init__.py
18@@ -1432,7 +1432,16 @@ class ProxyForm(ConfigForm):
19 enable_http_proxy = get_config_field('enable_http_proxy')
20 use_peer_proxy = get_config_field('use_peer_proxy')
21 http_proxy = get_config_field('http_proxy')
22- maas_proxy_port = get_config_field('maas_proxy_port')
23+ # LP: #1787381 - Fix an issue where the UI is overriding config fields
24+ # that are *only* exposed over the API.
25+ #
26+ # XXX - since the UI for these options has been converted to Angular,
27+ # MAAS no longer automatically creates fields for these based on the
28+ # settings forms. As such, this form doesn't validate against the
29+ # settings form (as the DNSForm would do, for example). As such
30+ # .
31+ # These fields need to be added back once LP: #1787467 is fixed.
32+ # maas_proxy_port = get_config_field('maas_proxy_port')
33
34
35 class DNSForm(ConfigForm):

Subscribers

People subscribed via source and target branches