]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
mon: ability to change mon listening port on container
authorSébastien Han <seb@redhat.com>
Wed, 9 Jan 2019 12:23:07 +0000 (13:23 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 22 Jan 2019 12:45:38 +0000 (13:45 +0100)
You can now use 'ceph_mon_container_listen_port' to change the port the
monitor will listen on.
Setting the default to 3300 (assigned by IANA) since Nautilus has released the messenger2
transport protocol.

Signed-off-by: Sébastien Han <seb@redhat.com>
group_vars/mons.yml.sample
roles/ceph-mon/defaults/main.yml
roles/ceph-mon/templates/ceph-mon.service.j2

index b6d49a40509713bedd6ff64dd6761949467047f9..89f75fe1bff602da25078e2e7862a80dbe89abac 100644 (file)
@@ -74,6 +74,7 @@ dummy:
 # These options can be passed using the 'ceph_mon_docker_extra_env' variable.
 #ceph_mon_docker_memory_limit: "{{ ansible_memtotal_mb }}m"
 #ceph_mon_docker_cpu_limit: 1
+#ceph_mon_container_listen_port: 3300
 
 # Use this variable to add extra env configuration to run your mon container.
 # If you want to set a custom admin keyring you can set this variable like following:
index 29dcafaff5b45872e4b8f99c5071ba0a9ac8e1c9..47f7d71045db3057c63372fd97c3c869c5d0dee4 100644 (file)
@@ -66,6 +66,7 @@ create_crush_tree: false
 # These options can be passed using the 'ceph_mon_docker_extra_env' variable.
 ceph_mon_docker_memory_limit: "{{ ansible_memtotal_mb }}m"
 ceph_mon_docker_cpu_limit: 1
+ceph_mon_container_listen_port: 3300
 
 # Use this variable to add extra env configuration to run your mon container.
 # If you want to set a custom admin keyring you can set this variable like following:
index 92e4e55ccabaeaab97d7e26ef836d78aa64095b7..79718a15f8ac110106df472de16baef24aa01990 100644 (file)
@@ -27,6 +27,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --name ceph-mon-%i \
   -e MON_IP={{ _current_monitor_address }} \
   -e CLUSTER={{ cluster }} \
   -e FSID={{ fsid }} \
+  -e MON_PORT={{ ceph_mon_container_listen_port }} \
   -e CEPH_PUBLIC_NETWORK={{ public_network | regex_replace(' ', '') }} \
   -e CEPH_DAEMON=MON \
   {{ ceph_mon_docker_extra_env }} \