Merge ~ines-almeida/txpkgupload:fix-txpkgupload-charm-config into txpkgupload:master

Proposed by Ines Almeida
Status: Merged
Approved by: Ines Almeida
Approved revision: 9c24d11a4297aeca940087ee1e5442f6460a8d35
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~ines-almeida/txpkgupload:fix-txpkgupload-charm-config
Merge into: txpkgupload:master
Diff against target: 16 lines (+4/-0)
1 file modified
charm/txpkgupload/templates/txpkgupload_config.yaml.j2 (+4/-0)
Reviewer Review Type Date Requested Status
Simone Pelosi Approve
Review via email: mp+454708@code.launchpad.net

Commit message

Fix txpkgupload config for units without haproxy

Currently, if these values are 'None' these are set to the string "None" instead of being empty. This can lead to failures in txpkgupload for charms without these values (which is the case for the ftpmaster charm)

To post a comment you must log in.
Revision history for this message
Simone Pelosi (pelpsi) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/charm/txpkgupload/templates/txpkgupload_config.yaml.j2 b/charm/txpkgupload/templates/txpkgupload_config.yaml.j2
2index 4b02352..15f4221 100644
3--- a/charm/txpkgupload/templates/txpkgupload_config.yaml.j2
4+++ b/charm/txpkgupload/templates/txpkgupload_config.yaml.j2
5@@ -17,7 +17,11 @@ fsroot: "{{ fsroot }}"
6
7 temp_dir: "{{ base_dir }}/tmp-incoming"
8
9+{%- if min_passive_port and max_passive_port %}
10 min_passive_port: {{ min_passive_port }}
11 max_passive_port: {{ max_passive_port }}
12+{%- endif %}
13
14+{%- if haproxy_ipv4_address %}
15 proxy_ipv4_address: {{ haproxy_ipv4_address }}
16+{%- endif %}

Subscribers

People subscribed via source and target branches

to all changes: