Skip to content
Snippets Groups Projects
  1. Jan 24, 2019
  2. Dec 01, 2018
  3. Nov 29, 2018
  4. Nov 21, 2018
    • Guillaume Abrioux's avatar
      config: convert _osd_memory_target to int · cb36579e
      Guillaume Abrioux authored
      
      ceph.conf doesn't accept float value.
      
      Typical error seen:
      ```
      $ sudo ceph daemon osd.2 config get osd_memory_target
      Can't get admin socket path: unable to get conf option admin_socket for osd.2:
      parse error setting 'osd_memory_target' to '7823740108,8' (strict_si_cast:
      unit prefix not recognized)
      ```
      
      This commit ensures the value inserted in ceph.conf will be an integer.
      
      Signed-off-by: default avatarGuillaume Abrioux <gabrioux@redhat.com>
      (cherry picked from commit 68dde424f6b254c657d75f1b5c47131dc84d9fc3)
      v3.2.0rc5
      cb36579e
  5. Nov 19, 2018
  6. Oct 09, 2018
  7. Oct 06, 2018
  8. Oct 02, 2018
    • Guillaume Abrioux's avatar
      config: look up for monitor_address_block in hostvars · 47b25184
      Guillaume Abrioux authored
      `monitor_address_block` should be read from hostvars[host] instead of
      current node being played.
      
      eg:
      
      Let's assume we have:
      
      ```
      [mons]
      ceph-mon0 monitor_address=192.168.1.10
      ceph-mon1 monitor_interface=eth1
      ceph-mon2 monitor_address_block=192.168.1.0/24
      ```
      
      the ceph.conf generation task will end up with:
      
      ```
      fatal: [ceph-mon0]: FAILED! => {}
      
      MSG:
      
      'ansible.vars.hostvars.HostVarsVars object' has no attribute u'ansible_interface'
      ```
      
      the reason is that it will assume `monitor_address_block` isn't defined even on
      ceph-mon2 because looking for `monitor_address_block` instead of
      `hostvars[host]['monitor_address_block']`, therefore it enters in the condition as default value:
      
      ```
          {%- else -%}
            {% set interface = 'ansible_' + (monitor_interface | replace('-', '_')) %}
            {% if ip_version == 'ipv4' -%}
              {{ hostvars[host][interface][ip_version]['address'] }}
            {%- elif ip_version == 'ipv6' -%}
              [{{ hostvars[host][interface][ip_version][0]['address'] }}]
            {%- endif %}
          {%- endif %}
      ```
      
      `monitor_interface` is set with default value `'interface'` so the `interface`
      variable is built with 'ansible_' + 'interface'. It makes ansible throwing a
      confusing message about `'ansible_interface'`.
      
      Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1635303
      
      
      
      Signed-off-by: default avatarGuillaume Abrioux <gabrioux@redhat.com>
      47b25184
  9. Sep 28, 2018
    • Sébastien Han's avatar
      add ceph-handler role · 13f80dc0
      Sébastien Han authored
      
      The role contains all the handlers for Ceph services. We decided to
      leave ceph-defaults role with variables and a few facts only. This is
      useful when organizing the site.yml files and also adding the known
      variables to infrastructure-playbooks.
      
      Signed-off-by: default avatarSébastien Han <seb@redhat.com>
      v3.2.0beta3
      13f80dc0
  10. Sep 24, 2018
  11. Sep 20, 2018
  12. Sep 18, 2018
  13. Sep 10, 2018
  14. Aug 13, 2018
  15. Aug 09, 2018
  16. Jul 31, 2018
  17. Jul 05, 2018
  18. Jun 28, 2018
  19. Apr 04, 2018
  20. Mar 15, 2018
    • Andy McCrae's avatar
      Simplify ceph.conf generation · ced3570f
      Andy McCrae authored
      Since the approach to creating a ceph.conf file has changed, and now
      no-longer relies on assembling config file fragments in /etc/ceph/ceph.d
      we can avoid the conf_overrides rendering on the local host and skip out
      the tasks related to that, instead using just the config_template task
      to configure the file directly.
      ced3570f
  21. Mar 06, 2018
  22. Jan 31, 2018
    • Guillaume Abrioux's avatar
      syntax: change local_action syntax · a4abea98
      Guillaume Abrioux authored
      Use a nicer syntax for `local_action` tasks.
      We used to have oneliner like this:
      ```
      local_action: wait_for port=22 host={{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }} state=started delay=10 timeout=500 }}
      ```
      
      The usual syntax:
      ```
          local_action:
            module: wait_for
            port: 22
            host: "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}"
            state: started
            delay: 10
            timeout: 500
      ```
      is nicer and kind of way to keep consistency regarding the whole
      playbook.
      
      This also fix a potential issue about missing quotation :
      
      ```
      Traceback (most recent call last):
        File "/tmp/ansible_wQtWsi/ansible_module_command.py", line 213, in <module>
          main()
        File "/tmp/ansible_wQtWsi/ansible_module_command.py", line 185, in main
          rc, out, err = module.run_command(args, executable=executable, use_unsafe_shell=shell, encoding=None, data=stdin)
        File "/tmp/ansible_wQtWsi/ansible_modlib.zip/ansible/module_utils/basic.py", line 2710, in run_command
        File "/usr/lib64/python2.7/shlex.py", line 279, in split
          return list(lex)                                                                                                                                                                                                                                                                                                            File "/usr/lib64/python2.7/shlex.py", line 269, in next
          token = self.get_token()
        File "/usr/lib64/python2.7/shlex.py", line 96, in get_token
          raw = self.read_token()
        File "/usr/lib64/python2.7/shlex.py", line 172, in read_token
          raise ValueError, "No closing quotation"
      ValueError: No closing quotation
      ```
      
      writing `local_action: shell echo {{ fsid }} | tee {{ fetch_directory }}/ceph_cluster_uuid.conf`
      can cause trouble because it's complaining with missing quotes, this fix solves this issue.
      
      Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1510555
      
      
      
      Signed-off-by: default avatarGuillaume Abrioux <gabrioux@redhat.com>
      v3.1.0beta3
      a4abea98
  23. Jan 30, 2018
  24. Jan 26, 2018
  25. Jan 10, 2018
  26. Dec 12, 2017
    • Major Hayden's avatar
      Convert interface names to underscores for facts · d9046be6
      Major Hayden authored
      If a deployer uses an interface name with a dash/hyphen in it, such
      as 'br-storage' for the monitor_interface group_var, the ceph.conf.j2
      template fails to find the right facts. It looks for
      'ansible_br-storage' but only 'ansible_br_storage' exists.
      
      This patch converts the interface name to underscores when the
      template does the fact lookup.
      3 tags
      d9046be6
  27. Nov 16, 2017
  28. Nov 14, 2017
  29. Nov 09, 2017
  30. Nov 03, 2017
  31. Oct 27, 2017
  32. Oct 25, 2017
  33. Oct 20, 2017
Loading