1. 09 Oct, 2019 2 commits
    • Guillaume Abrioux's avatar
      dashboard: if no host is available, let's just skip these plays. · ebfe7f31
      Guillaume Abrioux authored
      If there is no host available, let's just skip these plays.
      
      Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1759917
      
      Signed-off-by: default avatarGuillaume Abrioux <gabrioux@redhat.com>
      (cherry picked from commit 0b245bd0)
      ebfe7f31
    • Dimitri Savineau's avatar
      dashboard: update layouts before the restart · eb51cc1b
      Dimitri Savineau authored
      
      
      If the mgr dashboard doesn't restart fast enough then the inject
      dashboard task will fail with a HTTP error 400.
      
      Error EINVAL: Traceback (most recent call last):
        File "/usr/share/ceph/mgr/mgr_module.py", line 914, in _handle_command
          return self.handle_command(inbuf, cmd)
        File "/usr/share/ceph/mgr/dashboard/module.py", line 450, in handle_command
          push_local_dashboards()
        File "/usr/share/ceph/mgr/dashboard/grafana.py", line 132, in push_local_dashboards
          retry()
        File "/usr/share/ceph/mgr/dashboard/grafana.py", line 89, in call
          result = self.func(*self.args, **self.kwargs)
        File "/usr/share/ceph/mgr/dashboard/grafana.py", line 127, in push
          grafana.push_dashboard(body)
        File "/usr/share/ceph/mgr/dashboard/grafana.py", line 54, in push_dashboard
          response.raise_for_status()
        File "/usr/lib/python2.7/site-packages/requests/models.py", line 834, in raise_for_status
          raise HTTPError(http_error_msg, response=self)
      HTTPError: 400 Client Error: Bad Request
      
      Instead we can trigger this task before the module restart.
      
      Closes: #4565
      Signed-off-by: default avatarDimitri Savineau <dsavinea@redhat.com>
      (cherry picked from commit 3f6ff240)
      eb51cc1b
  2. 08 Oct, 2019 2 commits
  3. 07 Oct, 2019 11 commits
  4. 04 Oct, 2019 5 commits
    • Dimitri Savineau's avatar
      tests: fix rgw multisite vagrant variables · 067aa3aa
      Dimitri Savineau authored
      The secondary vagrant variables didn't have the grafana vm variable
      set which create an vagrant error.
      
      There was an error loading a Vagrantfile. The file being loaded
      and the error message are shown below. This is usually caused by
      an invalid or undefined variable.
      
      This patch also changes the ssh-extra-args parameter to ssh-common-args
      to get the same values for ssh/sftp/scp. Otherwise we can see warnings
      from ansible and some tasks are failing.
      
      [WARNING]: sftp transfer mechanism failed on [mon0]. Use ANSIBLE_DEBUG=1
      to see detailed information
      
      It also updates the ssh-common-args value for the rgw-multisite scenario
      to reflect the ANSIBLE_SSH_ARGS environment variable value.
      
      Finally changing the IP addresses due to the Vagrant refact done in the
      commit 778c51a0
      
      Signed-off-by: default avatarDimitri Savineau <dsavinea@redhat.com>
      (cherry picked from commit 010158ff)
      067aa3aa
    • Dimitri Savineau's avatar
      ceph-dashboard: add cluster parameter to ceph cmd · 5bbd825a
      Dimitri Savineau authored
      
      
      The ceph dashboard tasks didn't use the cluster option if the cluster
      name isn't the default value.
      
      Closes: #4529
      Signed-off-by: default avatarDimitri Savineau <dsavinea@redhat.com>
      (cherry picked from commit dd526cfe)
      5bbd825a
    • Dimitri Savineau's avatar
      dashboard: remove useless block section · ec1c57f6
      Dimitri Savineau authored
      
      
      The block section were used with the dashboard_enabled condition when
      the code was included in the main playbooks.
      Because this condition isn't present in the dashboard playbook anymore
      we can remove the block section.
      Signed-off-by: default avatarDimitri Savineau <dsavinea@redhat.com>
      (cherry picked from commit cf47594b)
      ec1c57f6
    • Guillaume Abrioux's avatar
      Vagrantfile: support more than 9 nodes per daemon type · afd0670a
      Guillaume Abrioux authored
      
      
      because of the current ip address assignation, it's not possible to
      deploy more than 9 nodes per daemon type.
      This commit refact a bit and allows us to get around this limitation.
      Signed-off-by: default avatarGuillaume Abrioux <gabrioux@redhat.com>
      (cherry picked from commit 778c51a0)
      afd0670a
    • Dimitri Savineau's avatar
      ceph-handler: don't restart all OSDs with limit · 8ec632c4
      Dimitri Savineau authored
      
      
      When using the ansible --limit option on one or few OSD nodes and if the
      handler is triggered then we will restart the OSD service on all OSDs
      nodes instead of the hosts limited by the limit value.
      Even if the play is limited by the --limit value we are using all OSD
      nodes from the OSD group.
      
        with_items: '{{ groups[osd_group_name] }}'
      
      Instead we should iterate only on the nodes present in both OSD group and
      limit list.
      Signed-off-by: default avatarDimitri Savineau <dsavinea@redhat.com>
      (cherry picked from commit 0346871f)
      8ec632c4
  5. 03 Oct, 2019 1 commit
  6. 02 Oct, 2019 2 commits
    • Guillaume Abrioux's avatar
      common: improve keyrings generation · 13ca0531
      Guillaume Abrioux authored
      
      
      There is no need to get n * number of nodes the different keyrings.
      Adding a `run_once: true` here avoid running a ceph command too many
      times which could be impacting large cluster deployment.
      Signed-off-by: default avatarGuillaume Abrioux <gabrioux@redhat.com>
      (cherry picked from commit 9bad239d)
      13ca0531
    • Dimitri Savineau's avatar
      ceph-facts: use --admin-daemon to get fsid · 5b24c66f
      Dimitri Savineau authored
      
      
      During the rolling_update scenario, the fsid value is retrieve from the
      current ceph cluster configuration via the ceph daemon config command.
      This command tries first to resolve the admin socket path via the
      ceph-conf command.
      Unfortunately this command won't work if you have a duplicate key in the
      ceph configuration even if it only produces a warning. As a result the
      task will fail.
      
      Can't get admin socket path: unable to get conf option admin_socket for
      mon.xxx: warning: line 13: 'osd_memory_target' in section 'osd' redefined
      
      Instead of using ceph daemon we can use the --admin-daemon option
      because we already know what the socket admin path value based on the
      ceph cluster and mon hostname values.
      
      Closes: #4492
      Signed-off-by: default avatarDimitri Savineau <dsavinea@redhat.com>
      (cherry picked from commit ec3b687d)
      5b24c66f
  7. 01 Oct, 2019 8 commits
  8. 30 Sep, 2019 3 commits
  9. 29 Sep, 2019 1 commit
  10. 28 Sep, 2019 1 commit
    • Guillaume Abrioux's avatar
      update: reset mon_host after mons upgrade · 4afe1b74
      Guillaume Abrioux authored
      
      
      after all mon are upgraded, let's reset mon_host which is used in the
      rest of the playbook for setting `container_exec_cmd` so we are sure to
      use the right value.
      
      Typical error:
      
      ```
      failed: [mds0 -> mon0] (item={u'path': u'/var/lib/ceph/bootstrap-mds/ceph.keyring', u'name': u'client.bootstrap-mds', u'copy_key': True}) => changed=true
        ansible_loop_var: item
        cmd:
        - docker
        - exec
        - ceph-mon-mon2
        - ceph
        - --cluster
        - ceph
        - auth
        - get
        - client.bootstrap-mds
        delta: '0:00:00.016294'
        end: '2019-09-27 13:54:58.828835'
        item:
          copy_key: true
          name: client.bootstrap-mds
          path: /var/lib/ceph/bootstrap-mds/ceph.keyring
        msg: non-zero return code
        rc: 1
        start: '2019-09-27 13:54:58.812541'
        stderr: 'Error response from daemon: No such container: ceph-mon-mon2'
        stderr_lines: <omitted>
        stdout: ''
        stdout_lines: <omitted>
      ```
      Signed-off-by: default avatarGuillaume Abrioux <gabrioux@redhat.com>
      (cherry picked from commit d84160a1)
      4afe1b74
  11. 27 Sep, 2019 4 commits
    • Johannes Kastl's avatar
      install python-xml on SUSE/openSUSE only if python2 is installed · 2463c8ec
      Johannes Kastl authored
      
      
      raw_install_python.yml: on SUSE/openSUSE, install python-xml package only
      if python2 is installed already
      
      Background:
      On SLES 15.x / openSUSE Leap 15.x, the python2 package `python-base` provides
      /usr/bin/python, while python3 only provides /usr/bin/python3.
      Signed-off-by: default avatarJohannes Kastl <kastl@b1-systems.de>
      (cherry picked from commit a1811ca0)
      2463c8ec
    • Johannes Kastl's avatar
      move python-xml to raw_install_python.yml · 146f2e8d
      Johannes Kastl authored
      
      
      The package python-xml is needed for ansible's zypper module to interact with
      the zypper package management tool.
      
      roles/ceph-defaults/defaults/main.yml:
      Remove python-xml from variable suse_package_dependencies to only
      install python-xml on SUSE/openSUSE if python is not found.
      raw_install_python.yml already contains all the logic needed to check
      if there is a valid python installation, so this is better suited there.
      
      openSUSE Leap 15.x / SLES 15.x do no longer have /usr/bin/python,
      only /usr/bin/python3, which already contains the xml module, so
      nothing needs to be installed in that case.
      Signed-off-by: default avatarJohannes Kastl <kastl@b1-systems.de>
      (cherry picked from commit 5cf22e9b)
      146f2e8d
    • Harald Jensås's avatar
      Replace ipaddr() with ips_in_ranges() · 5fea8304
      Harald Jensås authored
      This change implements a filter_plugin that is used in the
      ceph-facts, ceph-validate roles and infrastucture-playbooks.
      The new filter plugin will return a list of all IP address
      that reside in any one of the given IP ranges. The new filter
      replaces the use of the ipaddr filter.
      
      ceph.conf already support a comma separated list of CIDRs
      for the public_network and cluster_network options.
      
      Changes: [1] and [2] introduced a regression in ceph-ansible
      where public_network can no longer be a comma separated list
      of cidrs.
      
      With this change a comma separated list of subnet CIDRs can
      also be used for monitor_address_block and radosgw_address_block.
      
      [1] commit: d67230b2
      [2] commit: 20e48528
      
      Related-To: https://bugs.launchpad.net/tripleo/+bug/1840030
      Related-To: https://bugzilla.redhat.com/show_bug.cgi?id=1740283
      
      
      
      Closes: #4333
      Please backport to stable-4.0
      Signed-off-by: default avatarHarald Jensås <hjensas@redhat.com>
      (cherry picked from commit e695efca)
      5fea8304
    • Dimitri Savineau's avatar
      ceph-nfs: Allow to configure SecType value · 2d1372fe
      Dimitri Savineau authored
      
      
      Depending on the infrastruture (w/o kerberos auth) then the SecType
      value could be different.
      Currently this value is hardcoded in the NFS Ganesha template. Instead
      we can use a variable.
      The default value is still the same to avoid breaking the backward
      compatibility.
      
      Closes: #4459
      Signed-off-by: default avatarDimitri Savineau <dsavinea@redhat.com>
      (cherry picked from commit ca77d7bd)
      2d1372fe