1. 30 Nov, 2020 1 commit
  2. 27 Nov, 2020 1 commit
  3. 26 Nov, 2020 2 commits
  4. 25 Nov, 2020 1 commit
  5. 24 Nov, 2020 11 commits
  6. 19 Nov, 2020 1 commit
    • Guillaume Abrioux's avatar
      osd: ensure /var/lib/ceph/osd/{cluster}-{id} is present · d86a159a
      Guillaume Abrioux authored
      This commit ensures that the `/var/lib/ceph/osd/{{ cluster }}-{{ osd_id }}` is
      present before starting OSDs.
      
      This is needed specificly when redeploying an OSD in case of OS upgrade
      failure.
      Since ceph data are still present on its devices then the node can be
      redeployed, however those directories aren't present since they are
      initially created by ceph-volume. We could recreate them manually but
      for better user experience we can ask ceph-ansible to recreate them.
      
      NOTE:
      this only works for OSDs that were deployed with ceph-volume.
      ceph-disk deployed OSDs would have to get those directories recreated
      manually.
      
      Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1898486
      
      Signed-off-by: default avatarGuillaume Abrioux <gabrioux@redhat.com>
      (cherry picked from commit 873fc8ec)
      d86a159a
  7. 18 Nov, 2020 3 commits
  8. 17 Nov, 2020 1 commit
    • Guillaume Abrioux's avatar
      containers: modify bindmount option · acdd43c0
      Guillaume Abrioux authored
      This commit changes the bind mount option for the mount point
      `/var/lib/ceph` in the systemd template for mon and mgr containers. This
      is needed in case of collocating mon/mgr with osds using dmcrypt
      scenario.
      Once mon/mgr got converted to containers, the dmcrypt layer sub mount is
      still seen in `/var/lib/ceph`. For some reason it makes the
      corresponding devices busy so any other container can't open/close it.
      As a result, it prevents osds from starting properly.
      
      Since it only happens on the nodes converted before the OSD play, the idea is
      to bind mount `/var/lib/ceph` on mon and mgr with the `rshared` option
      so once the sub mount is unmounted, it is propagated inside the
      container so it doesn't see that mount point.
      
      Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1896392
      
      Signed-off-by: default avatarGuillaume Abrioux <gabrioux@redhat.com>
      (cherry picked from commit f5ba6d9b)
      acdd43c0
  9. 16 Nov, 2020 2 commits
  10. 13 Nov, 2020 2 commits
    • Benoît Knecht's avatar
      ceph-facts: Fix osd_pool_default_crush_rule fact · deaf6031
      Benoît Knecht authored
      
      
      The `osd_pool_default_crush_rule` is set based on `crush_rule_variable`, which
      is the output of a `grep` command.
      
      However, two consecutive tasks can set that variable, and if the second task is
      skipped, it still overwrites the `crush_rule_variable`, leading the
      `osd_pool_default_crush_rule` to be set to `ceph_osd_pool_default_crush_rule`
      instead of the output of the first task.
      
      This commit ensures that the fact is set right after the `crush_rule_variable`
      is assigned, before it can be overwritten.
      
      Closes #5912
      Signed-off-by: default avatarBenoît Knecht <bknecht@protonmail.ch>
      (cherry picked from commit c5f7343a)
      deaf6031
    • Gaudenz Steinlin's avatar
      config: Always use osd_memory_target if set · bb3cfd04
      Gaudenz Steinlin authored
      
      
      The osd_memory_target variable was only used if it was higher than the
      calculated value based on the number of OSDs. This is changed to always
      use the value if it is set in the configuration. This allows this value
      to be intentionally set lower so that it does not have to be changed
      when more OSDs are added later.
      Signed-off-by: default avatarGaudenz Steinlin <gaudenz.steinlin@cloudscale.ch>
      (cherry picked from commit 4d1fdd2b)
      bb3cfd04
  11. 12 Nov, 2020 3 commits
    • Dimitri Savineau's avatar
      switch2container: disable ceph-osd enabled-runtime · ee435551
      Dimitri Savineau authored
      When deploying the ceph OSD via the packages then the ceph-osd@.service
      unit is configured as enabled-runtime.
      This means that each ceph-osd service will inherit from that state.
      The enabled-runtime systemd state doesn't survive after a reboot.
      For non containerized deployment the OSD are still starting after a
      reboot because there's the ceph-volume@.service and/or ceph-osd.target
      units that are doing the job.
      
      $ systemctl list-unit-files|egrep '^ceph-(volume|osd)'|column -t
      ceph-osd@.service     enabled-runtime
      ceph-volume@.service  enabled
      ceph-osd.target       enabled
      
      When switching to containerized deployment we are stopping/disabling
      ceph-osd@XX.servive, ceph-volume and ceph.target and then removing the
      systemd unit files.
      But the new systemd units for containerized ceph-osd service will still
      inherit from ceph-osd@.service unit file.
      
      As a consequence, if an OSD host is rebooting after the playbook execution
      then the ceph-osd service won't come back because they aren't enabled at
      boot.
      
      This patch also adds a reboot and testinfra run after running the switch
      to container playbook.
      
      Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1881288
      
      Signed-off-by: default avatarDimitri Savineau <dsavinea@redhat.com>
      (cherry picked from commit fa2bb3af)
      ee435551
    • Guillaume Abrioux's avatar
      main: followup on pr 6012 · 46e2695c
      Guillaume Abrioux authored
      
      
      This tag can be set at the play level.
      Signed-off-by: default avatarGuillaume Abrioux <gabrioux@redhat.com>
      (cherry picked from commit 2fa17520)
      46e2695c
    • Francesco Pantano's avatar
      Add ceph_client tag to execute or skip the playbook · 65a503be
      Francesco Pantano authored
      
      
      There are some use cases where there's a need to skip the execution
      of the ceph-ansible client role even though the client section of the
      inventory isn't empty.
      This can happen in contexts where the services are colocated or when
      a all-in-one deployment is performed.
      The purpose of this change is adding a 'ceph_client' tag to avoid
      altering the ceph-ansible execution flow but at the same time be able
      to include or exclude a set of tasks using this tag.
      Signed-off-by: default avatarFrancesco Pantano <fpantano@redhat.com>
      (cherry picked from commit fafd5f87)
      65a503be
  12. 04 Nov, 2020 2 commits
  13. 03 Nov, 2020 9 commits
    • Gaudenz Steinlin's avatar
      osd: Fix number of OSD calculation · 44d43a8e
      Gaudenz Steinlin authored
      
      
      If some OSDs are to be created and others already exist the calculation
      only counted the to be created OSDs. This changes the calculation to
      take all OSDs into account.
      Signed-off-by: default avatarGaudenz Steinlin <gaudenz.steinlin@cloudscale.ch>
      (cherry picked from commit 15044da0)
      44d43a8e
    • Dimitri Savineau's avatar
      rolling_update: fix mgr start with mon collocation · 0cb9e179
      Dimitri Savineau authored
      cec994b9
      
       introduced a regression when a mgr is collocated with a mon.
      During the mon upgrade, the mgr service is masked to avoid to be
      restarted on packages update.
      Then the start mgr task is failing because the service is still masked.
      Instead we should unmask it.
      
      Fixes: #5983
      Signed-off-by: default avatarDimitri Savineau <dsavinea@redhat.com>
      (cherry picked from commit 3d3ce263)
      0cb9e179
    • Dimitri Savineau's avatar
      infrastructure: consume ceph_fs module · d2114efa
      Dimitri Savineau authored
      bd611a78
      
       introduced the new ceph_fs module but missed some tasks in
      rolling_update and shrink-mds playbooks.
      Signed-off-by: default avatarDimitri Savineau <dsavinea@redhat.com>
      (cherry picked from commit 16afe908)
      d2114efa
    • Dimitri Savineau's avatar
      rolling_update: use ceph health instead of ceph -s · 1c6bd9a3
      Dimitri Savineau authored
      
      
      The ceph status command returns a lot of information stored in variables
      and/or facts which could consume resources for nothing.
      When checking the cluster health, we're using the health structure in the
      ceph status output.
      To optimize this, we could use the ceph health command which contains
      the same needed information.
      
      $ ceph status -f json | wc -c
      2001
      $ ceph health -f json | wc -c
      46
      Signed-off-by: default avatarDimitri Savineau <dsavinea@redhat.com>
      (cherry picked from commit acddf4fb)
      1c6bd9a3
    • Dimitri Savineau's avatar
      rgw/rbdmirror: use service dump instead of ceph -s · 9c70add6
      Dimitri Savineau authored
      
      
      The ceph status command returns a lot of information stored in variables
      and/or facts which could consume resources for nothing.
      When checking the rgw/rbdmirror services status, we're only using the
      servicmap structure in the ceph status output.
      To optimize this, we could use the ceph service dump command which contains
      the same needed information.
      This command returns less information and is slightly faster than the ceph
      status command.
      
      $ ceph status -f json | wc -c
      2001
      $ ceph service dump -f json | wc -c
      1105
      $ time ceph status -f json > /dev/null
      
      real	0m0.557s
      user	0m0.516s
      sys	0m0.040s
      $ time ceph service dump -f json > /dev/null
      
      real	0m0.454s
      user	0m0.434s
      sys	0m0.020s
      Signed-off-by: default avatarDimitri Savineau <dsavinea@redhat.com>
      (cherry picked from commit 3f908193)
      9c70add6
    • Dimitri Savineau's avatar
      monitor: use quorum_status instead of ceph status · 3bba1fd2
      Dimitri Savineau authored
      
      
      The ceph status command returns a lot of information stored in variables
      and/or facts which could consume resources for nothing.
      When checking the quorum status, we're only using the quorum_names
      structure in the ceph status output.
      To optimize this, we could use the ceph quorum_status command which contains
      the same needed information.
      This command returns less information.
      
      $ ceph status -f json  | wc -c
      2001
      $ ceph quorum_status -f json  | wc -c
      957
      $ time ceph status -f json > /dev/null
      
      real	0m0.577s
      user	0m0.538s
      sys	0m0.029s
      $ time ceph quorum_status -f json > /dev/null
      
      real	0m0.544s
      user	0m0.527s
      sys	0m0.016s
      Signed-off-by: default avatarDimitri Savineau <dsavinea@redhat.com>
      (cherry picked from commit 88f91d8c)
      3bba1fd2
    • Dimitri Savineau's avatar
      osds: use pg stat command instead of ceph status · a8e2bc08
      Dimitri Savineau authored
      
      
      The ceph status command returns a lot of information stored in variables
      and/or facts which could consume resources for nothing.
      When checking the pgs state, we're using the pgmap structure in the ceph
      status output.
      To optimize this, we could use the ceph pg stat command which contains
      the same needed information.
      This command returns less information (only about pgs) and is slightly
      faster than the ceph status command.
      
      $ ceph status -f json | wc -c
      2000
      $ ceph pg stat -f json | wc -c
      240
      $ time ceph status -f json > /dev/null
      
      real	0m0.529s
      user	0m0.503s
      sys	0m0.024s
      $ time ceph pg stat -f json > /dev/null
      
      real	0m0.426s
      user	0m0.409s
      sys	0m0.016s
      
      The data returned by the ceph status is even bigger when using the
      nautilus release.
      
      $ ceph status -f json | wc -c
      35005
      $ ceph pg stat -f json | wc -c
      240
      Signed-off-by: default avatarDimitri Savineau <dsavinea@redhat.com>
      (cherry picked from commit ee505885)
      a8e2bc08
    • wangxiaotong's avatar
      osds: use ceph osd stat instead of ceph status · b4c1f325
      wangxiaotong authored
      
      
      Improve the checked way of the OSD created checking process.
      This replaces the ceph status command by the ceph osd stat command.
      The osdmap structure isn't needed anymore.
      
      $ ceph status -f json | wc -c
      2001
      $ ceph osd stat -f json | wc -c
      132
      $ time ceph status -f json > /dev/null
      
      real    0m0.563s
      user    0m0.526s
      sys     0m0.036s
      $ time ceph osd stat -f json > /dev/null
      
      real	0m0.457s
      user	0m0.411s
      sys	0m0.045s
      Signed-off-by: default avatarwangxiaotong <wangxiaotong@fiberhome.com>
      (cherry picked from commit b9cb0f12)
      b4c1f325
    • Guillaume Abrioux's avatar
      common: follow up on #5948 · 04d47d68
      Guillaume Abrioux authored
      
      
      In addition to f7e2b2c608eef4bbba47586f1e24d6ade1572758
      Signed-off-by: default avatarGuillaume Abrioux <gabrioux@redhat.com>
      (cherry picked from commit 371d854a)
      04d47d68
  14. 02 Nov, 2020 1 commit