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

allow adding a monitor to a deployed cluster #3547

Merged
merged 3 commits into from Apr 15, 2019
Merged

Conversation

rishabh-d-dave
Copy link
Contributor

@rishabh-d-dave rishabh-d-dave commented Jan 28, 2019

This (early) PR aims to add a playbook, add-mon.yml, to infrastructure-playbooks for adding a monitor to already deployed Ceph cluster.

@rishabh-d-dave rishabh-d-dave changed the title allow adding a monitor to a deployed cluster [skip ci] allow adding a monitor to a deployed cluster Jan 28, 2019
@rishabh-d-dave rishabh-d-dave added DNM Do NOT merge feature labels Jan 28, 2019
@rishabh-d-dave
Copy link
Contributor Author

Changelog:

  • importing ceph-facts role before ceph-common (otherwise add-mon.yml would fail at this task[1], since monitor_keyring_conf[2] would be undefined for it; ceph-facts defines monitor_keyring_conf)
  • removed the commit containing tasks added for debugging

@rishabh-d-dave
Copy link
Contributor Author

  • removed the changes concerning gather_facts to true helped
  • made improvements suggested by yamllint

tests/functional/add-mons/container/vagrant_variables.yml Outdated Show resolved Hide resolved
tox.ini Outdated Show resolved Hide resolved
@rishabh-d-dave
Copy link
Contributor Author

  • made the changes Guillaume mentioned

tox.ini Outdated Show resolved Hide resolved
tox.ini Outdated Show resolved Hide resolved
leseb
leseb previously requested changes Jan 30, 2019
Copy link
Member

@leseb leseb left a comment

Choose a reason for hiding this comment

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

What about the containerized equivalent?

@@ -1,4 +1,12 @@
---
- name: check if monitor initial keyring already exists
command: ceph auth get-key mon.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
command: ceph auth get-key mon.
command: ceph --cluster {{ cluster }} auth get-key mon.

Copy link
Contributor

Choose a reason for hiding this comment

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

@leseb is ceph-ansible still supporting custom cluster names? (why?)

Copy link
Member

Choose a reason for hiding this comment

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

Yes, it is, for OSP and for existing clusters too.

@leseb leseb added this to the v4.0 milestone Jan 30, 2019
@rishabh-d-dave
Copy link
Contributor Author

What about the containerized equivalent?

Once I get this done for non-containers, I'll focus on containerized equivalent as well.

@rishabh-d-dave
Copy link
Contributor Author

  • running ceph-config and other roles required for it on osd to update ceph.conf
  • rearranged the playbook to be more succinct.

@rishabh-d-dave
Copy link
Contributor Author

@guits @dsavineau
The jobs corresponding to the tox scenarios added by this PR have passed invariably for last 4-5 times. IMO, this PR is review-ready.

@guits guits dismissed leseb’s stale review April 10, 2019 08:35

requested changes have been addressed

@guits guits changed the title [skip ci]allow adding a monitor to a deployed cluster allow adding a monitor to a deployed cluster Apr 10, 2019
@guits
Copy link
Collaborator

guits commented Apr 10, 2019

jenkins test dev-centos-container-add_mons

@guits
Copy link
Collaborator

guits commented Apr 10, 2019

jenkins test dev-centos-non_container-add_mons

@guits guits changed the title allow adding a monitor to a deployed cluster [skip ci] allow adding a monitor to a deployed cluster Apr 10, 2019
@guits guits changed the title [skip ci] allow adding a monitor to a deployed cluster allow adding a monitor to a deployed cluster Apr 10, 2019
@guits
Copy link
Collaborator

guits commented Apr 10, 2019

jenkins test dev-centos-non_container-add_mons

@guits
Copy link
Collaborator

guits commented Apr 10, 2019

jenkins test dev-centos-container-add_mons

@guits
Copy link
Collaborator

guits commented Apr 10, 2019

jenkins test dev-centos-container-all_daemons

@guits
Copy link
Collaborator

guits commented Apr 10, 2019

jenkins test dev-centos-non_container-all_daemons

- initial_mon_key.skipped is defined
- ceph_current_status.fsid is undefined

- name: debugtask
Copy link
Collaborator

Choose a reason for hiding this comment

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

leftover ?


# add code to read the key or/and try to find it on other nodes
- name: debugtask
Copy link
Collaborator

Choose a reason for hiding this comment

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

ditto


# add code to read the key or/and try to find it on other nodes
- name: debugtask
debug:
Copy link
Collaborator

Choose a reason for hiding this comment

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

ditto

@guits guits changed the title allow adding a monitor to a deployed cluster [skip ci] allow adding a monitor to a deployed cluster Apr 10, 2019
guits and others added 3 commits April 10, 2019 17:13
When adding a new monitor, we must reuse the existing initial monitor
keyring. Otherwise, the new monitor will issue its 'mkfs' with a new
monitor keyring and it will result with a mismatch between them. The
new monitor will be unable to join the quorum in the end.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
Co-authored-by: Rishabh Dave <ridave@redhat.com>
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Add a playbook that deploys a new monitor on a new node, adds that node
to the Ceph cluster and the monitor to the quorum and updates the ceph
configuration file on OSD nodes.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
@guits guits changed the title [skip ci] allow adding a monitor to a deployed cluster allow adding a monitor to a deployed cluster Apr 10, 2019
@guits
Copy link
Collaborator

guits commented Apr 10, 2019

jenkins test dev-centos-non_container-all_daemons

@guits
Copy link
Collaborator

guits commented Apr 10, 2019

jenkins test dev-centos-container-all_daemons

@guits
Copy link
Collaborator

guits commented Apr 10, 2019

jenkins test dev-centos-non_container-add_mons

@guits
Copy link
Collaborator

guits commented Apr 10, 2019

jenkins test dev-centos-container-add_mons

@guits guits merged commit d5967af into ceph:master Apr 15, 2019
@rishabh-d-dave rishabh-d-dave deleted the add-mon branch April 15, 2019 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants