From 0c59d7cdcdb5f3154963188df8ca2def4a4d01d0 Mon Sep 17 00:00:00 2001 From: Ivan Font Date: Thu, 26 Jan 2017 15:50:49 -0800 Subject: [PATCH 1/3] Update all docker sample extra environment vars Bring docker sample extra environment variables in sync with the global defaults for each role. Previous definitions were no longer used. --- group_vars/all.docker.yml.sample | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/group_vars/all.docker.yml.sample b/group_vars/all.docker.yml.sample index 6cbc93a58..9752f04ef 100644 --- a/group_vars/all.docker.yml.sample +++ b/group_vars/all.docker.yml.sample @@ -23,7 +23,7 @@ dummy: #ceph_mon_docker_image_tag: latest #ceph_mon_docker_interface: "{{ monitor_interface }}" #ceph_mon_docker_subnet: "{{ public_network }}" # subnet of the ceph_mon_docker_interface -#ceph_mon_extra_envs: "MON_NAME={{ ansible_hostname }}" # comma separated variables +#ceph_mon_docker_extra_env: -e CLUSTER={{ cluster }} -e FSID={{ fsid }} -e MON_NAME={{ ansible_hostname }} ####### # OSD # @@ -35,7 +35,7 @@ dummy: #ceph_osd_docker_username: ceph #ceph_osd_docker_imagename: daemon #ceph_osd_docker_image_tag: latest -#ceph_osd_docker_extra_env: "CEPH_DAEMON=OSD_CEPH_DISK_ACTIVATE" # comma separated variables +#ceph_osd_docker_extra_env: -e CLUSTER={{ cluster }} -e CEPH_DAEMON=OSD_CEPH_DISK_ACTIVATE -e OSD_JOURNAL_SIZE={{ journal_size }} #ceph_osd_docker_prepare_env: "OSD_FORCE_ZAP=1" # comma separated variables #ceph_osd_docker_devices: # - /dev/sdb @@ -54,7 +54,7 @@ dummy: #ceph_mds_docker_username: ceph #ceph_mds_docker_imagename: daemon #ceph_mds_docker_image_tag: latest -#ceph_mds_docker_extra_env: "MDS_NAME={{ ansible_hostname }}" # comma separated variables +#ceph_mds_docker_extra_env: -e CLUSTER={{ cluster }} -e MDS_NAME={{ ansible_hostname }} ####### # RGW # @@ -67,7 +67,7 @@ dummy: #ceph_rgw_docker_imagename: daemon #ceph_rgw_docker_image_tag: latest #ceph_rgw_civetweb_port: 80 -#ceph_rgw_docker_extra_env: "RGW_CIVETWEB_PORT={{ ceph_rgw_civetweb_port }}" # comma separated variables +#ceph_rgw_docker_extra_env: -e CLUSTER={{ cluster }} -e RGW_CIVETWEB_PORT={{ ceph_rgw_civetweb_port }} ########### # RESTAPI # @@ -101,7 +101,7 @@ dummy: #ceph_nfs_docker_username: ceph #ceph_nfs_docker_imagename: daemon #ceph_nfs_docker_image_tag: latest -#ceph_nfs_docker_extra_env: "GANESHA_EPOCH={{ ganesha_epoch }}" # comma separated variables +#ceph_nfs_docker_extra_env: -e GANESHA_EPOCH={{ ganesha_epoch }} #nfs_file_gw: false #nfs_obj_gw: false #ceph_nfs_rgw_access_key: "QFAMEDSJP5DEKJO0DDXY" From 0f7937694919b01ea822201170b279c51bfcf910 Mon Sep 17 00:00:00 2001 From: Ivan Font Date: Thu, 26 Jan 2017 15:53:39 -0800 Subject: [PATCH 2/3] Remove reference to old OSD docker extra env vars This variable is already defined as a global default in the OSD role and was not being kept in sync as we now require the '-e' parameter prefixed to each variable. This was also missing the CLUSTER environment variable that is defined in the global default version of ceph_osd_docker_extra_env. --- Vagrantfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index 43fdb387f..3df65f4b9 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -81,7 +81,6 @@ ansible_provision = proc do |ansible| rbd_mirror_containerized_deployment: 'true', ceph_mon_docker_interface: ETH, ceph_mon_docker_subnet: "#{PUBLIC_SUBNET}.0/24", - ceph_osd_docker_extra_env: "CEPH_DAEMON=OSD_CEPH_DISK_ACTIVATE,OSD_JOURNAL_SIZE=100", ceph_osd_docker_devices: settings['disks'], devices: settings['disks'], ceph_docker_on_openstack: BOX == 'openstack', From 02983541373f3f9d082d7f57bbc21a820b528a2f Mon Sep 17 00:00:00 2001 From: Ivan Font Date: Thu, 26 Jan 2017 15:57:34 -0800 Subject: [PATCH 3/3] Update to use consistent docker extra env vars This playbook was still referencing the old version of the ceph_*_docker_extra_env but only for Ceph MONs and Ceph NFS. This playbook was not kept up-to-date when updating the ceph_*_docker_extra_env variables to add the '-e' option to docker. That's because the addition of '-e' breaks this playbook as it requires a comma separated list of variables for the 'env:' docker module parameter. Therefore this change just makes the playbook consistently broken by referencing the same variable throughout. --- ...h-from-non-containerized-to-containerized-ceph-daemons.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml b/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml index 0bf7bc227..b09ddba6c 100644 --- a/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml +++ b/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml @@ -167,7 +167,7 @@ net: "host" state: "running" privileged: "{{ mon_docker_privileged }}" - env: "MON_IP={{ hostvars[inventory_hostname]['ansible_' + ceph_mon_docker_interface]['ipv4']['address'] }},CEPH_DAEMON=MON,CEPH_PUBLIC_NETWORK={{ ceph_mon_docker_subnet }},CEPH_FSID={{ ceph_fsid.stdout }},{{ ceph_mon_extra_envs }}" + env: "MON_IP={{ hostvars[inventory_hostname]['ansible_' + ceph_mon_docker_interface]['ipv4']['address'] }},CEPH_DAEMON=MON,CEPH_PUBLIC_NETWORK={{ ceph_mon_docker_subnet }},CEPH_FSID={{ ceph_fsid.stdout }},{{ ceph_mon_docker_extra_env }}" volumes: "/var/lib/ceph:/var/lib/ceph,/etc/ceph:/etc/ceph,/etc/localtime:/etc/localtime:ro" - name: waiting for the monitor to join the quorum... @@ -524,5 +524,5 @@ state: "running" privileged: true ports: "{{ ceph_nfs_port }}:{{ ceph_nfs_port }},111:111" - env: "CEPH_DAEMON=NFS,CEPH_PUBLIC_NETWORK={{ ceph_nfs_docker_subnet }},{{ ceph_nfs_extra_envs }}" + env: "CEPH_DAEMON=NFS,CEPH_PUBLIC_NETWORK={{ ceph_nfs_docker_subnet }},{{ ceph_nfs_docker_extra_env }}" volumes: "/etc/ceph:/etc/ceph,/etc/ganesha:/etc/ganesha,/etc/localtime:/etc/localtime:ro"