← Back to team overview

launchpad-reviewers team mailing list archive

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

 

Ines Almeida has proposed merging ~ines-almeida/txpkgupload:fix-txpkgupload-charm-config into txpkgupload:master.

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)

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~ines-almeida/txpkgupload/+git/txpkgupload/+merge/454708
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/txpkgupload:fix-txpkgupload-charm-config into txpkgupload:master.
diff --git a/charm/txpkgupload/templates/txpkgupload_config.yaml.j2 b/charm/txpkgupload/templates/txpkgupload_config.yaml.j2
index 4b02352..15f4221 100644
--- a/charm/txpkgupload/templates/txpkgupload_config.yaml.j2
+++ b/charm/txpkgupload/templates/txpkgupload_config.yaml.j2
@@ -17,7 +17,11 @@ fsroot: "{{ fsroot }}"
 
 temp_dir: "{{ base_dir }}/tmp-incoming"
 
+{%- if min_passive_port and max_passive_port %}
 min_passive_port: {{ min_passive_port }}
 max_passive_port: {{ max_passive_port }}
+{%- endif %}
 
+{%- if haproxy_ipv4_address %}
 proxy_ipv4_address: {{ haproxy_ipv4_address }}
+{%- endif %}