Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backport][SES5] OSD Migration for changed disk slots #1311

Merged
merged 5 commits into from
Aug 27, 2018
Merged

Conversation

agraul
Copy link
Member

@agraul agraul commented Aug 24, 2018

Backport of #1302


Checklist:

  • Added unittests and or functional tests
  • Adapted documentation
  • Referenced issues or internal bugtracker
  • Ran integration tests successfully ( trigger with @susebot run teuthology )

@agraul agraul requested a review from jschmid1 August 24, 2018 13:44
for osd_id in osds:
host = _find_host(osd_id, host_osds)
if host:
grains = local.cmd(host, 'grains.get', ['ceph'], tgt_type='compound')
Copy link
Contributor

@jschmid1 jschmid1 Aug 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apparently tgt_type needs to be expr_form

@agraul agraul force-pushed the backport-1302 branch 2 times, most recently from 6b1bb4b to 5cfc829 Compare August 27, 2018 08:51
@jschmid1 jschmid1 added this to the 0.8.6 milestone Aug 27, 2018
@jschmid1
Copy link
Contributor

@agraul agraul force-pushed the backport-1302 branch 2 times, most recently from f274d7d to b88334f Compare August 27, 2018 14:53
If no /dev/disk/by-id symlink is found, e.g. because that path does not
exist (as it is a case in VMs), the devicename that was provided in the
first place is returned.

Signed-off-by: Alexander Graul <[email protected]>
(cherry picked from commit 3c26439)
Signed-off-by: Alexander Graul <[email protected]>
agraul and others added 4 commits August 27, 2018 17:12
OSD Migration currently only works if the same slot is used. This works
because the generation of proposals is deterministic, so if all disks
are in the same position we end up with the same proposal.

This commit changes that behaviour: instead of creating a new proposal,
the old one is used and adapted. This happens in the following steps:

1) When `salt-run replace.osd X` is used and a proposal file (e.g.
    "data1.ceph.yml" in /srv/pillar/proposals/...) gets the "-replace"
    suffix, a new attribute is written for the disks that get replaced
2) When `salt-run proposals.populate` is used (e.g. in stage.1), all
    proposal files that have the "-replace" suffix get parsed and the
    disks in the proposal are compared to the currently installed disks
    on the node.
3) Disks in the old proposal that have the attribute inserted in 1) and
    are still present (i.e. replaced in place) plus new disks (disks
    that are not in the old proposal but present) are considered free.
4) The disks in the old proposal get interated over and if they are
    labeled for replacement they are swapped with one of the free disks.
5) This modified proposal gets saved in the place of the original one
    and can be used by later stages

Once the replacement in the proposal went through, new proposals are
generated on all other nodes in case replacements and node additions
happen at once.

Signed-off-by: Alexander Graul <[email protected]>
(cherry picked from commit a0196dc)
Signed-off-by: Alexander Graul <[email protected]>
Signed-off-by: Alexander Graul <[email protected]>
(cherry picked from commit b27e1b9)
Signed-off-by: Alexander Graul <[email protected]>
This branch uses different mechanism to gather deepsea minion targets,
so a mock of the salt call is needed.

Signed-off-by: Alexander Graul <[email protected]>
Signed-off-by: Joshua Schmid <[email protected]>
(cherry picked from commit fbe85ff)
Signed-off-by: Alexander Graul <[email protected]>
@jschmid1
Copy link
Contributor

@susebot run teuthology

@susebot
Copy link
Collaborator

susebot commented Aug 27, 2018

Commit d9da2a5 is NOT OK for suite suse:tier1.
Check tests results in the Jenkins job: http://158.69.90.90:8080/job/deepsea-pr/99/

@jschmid1
Copy link
Contributor

9 passed 6 failed(6 dead)

@jschmid1 jschmid1 merged commit 2a99c16 into SES5 Aug 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants