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

Uninstall playbook for Glusterfs #6918

Conversation

SaravanaStorageNetwork
Copy link
Contributor

Uninstall playbook for Glusterfs

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 29, 2018
@papr-bot
Copy link

Can one of the admins verify this patch?
I understand the following commands:

  • bot, add author to whitelist
  • bot, test pull request
  • bot, test pull request once

@SaravanaStorageNetwork SaravanaStorageNetwork changed the title [WIP] Uninstall playbook for Glusterfs Uninstall playbook for Glusterfs Jan 30, 2018
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 30, 2018
@SaravanaStorageNetwork
Copy link
Contributor Author

@jarrpa Please review

@jarrpa jarrpa self-requested a review January 30, 2018 16:09
@jarrpa jarrpa self-assigned this Jan 30, 2018
Copy link
Contributor

@jarrpa jarrpa left a comment

Choose a reason for hiding this comment

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

  1. The desired solution is to just do a standalone uninstall playbook, not a conditional variable, so get rid of the openshift_storage_glusterfs_state variable.
  2. With this implementation we don't need the wipe variable anymore. Remove that as a separate commit in this PR, and make sure to keep all of the functionality it enables.
  3. There's no need to have | default after every use of glusterfs_name, that's already done.

@SaravanaStorageNetwork
Copy link
Contributor Author

  1. The desired solution is to just do a standalone uninstall playbook, not a conditional variable, so get rid of the openshift_storage_glusterfs_state variable.

So, you mean to call uninstall playbook directly like:
ansible-playbook -i /path/to/glusterfs_uninstall.yml
will address this.

  1. With this implementation we don't need the wipe variable anymore. Remove that as a separate commit in this PR, and make sure to keep all of the functionality it enables.

Sure, duplicate code needs to be removed.
I will address as part of separate PR as it comes as part of install path.

  1. There's no need to have | default after every use of glusterfs_name, that's already done.

Sure. will remove it.

@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 1, 2018
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 1, 2018
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 1, 2018
Copy link
Contributor

@jarrpa jarrpa left a comment

Choose a reason for hiding this comment

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

A few things:

  • Rename the glusterfs_uninstall.yml files to just uninstall.yml.
  • Don't forget to update registry.yml to use the new facts file.

@@ -0,0 +1,96 @@
---

- include_tasks: glusterfs_config_facts.yml
Copy link
Contributor

Choose a reason for hiding this comment

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

- block:
  - include_tasks: glusterfs_config_facts.yml
  - include_tasks: glusterfs_uninstall.yml
  when: 'glusterfs' in groups and groups['glusterfs'] | length > 0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

- kind: "svc"
name: "heketi-storage-endpoints"
- kind: "secret"
name: "heketi-{{ glusterfs_name }}-topology-secret"
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be good if we could have an optional section to wipe pv, vg, lv. So development would be easier when reusing same nodes... as now we would need to go and delete residual disk configuration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mjudeikis Sure - doing it..

- block:
- include_tasks: glusterfs_config_facts.yml
- include_tasks: glusterfs_uninstall.yml
when: groups.glusterfs | length > 0
Copy link
Contributor

Choose a reason for hiding this comment

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

The group may not always be defined, so check that with 'glusterfs_registry' in groups and groups['glusterfs_registry'] | length > 0.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have updated it - please check

- kind: daemonset
name: "glusterfs-{{ glusterfs_name }}"
- kind: storageclass
name: "glusterfs-{{ glusterfs_name }}"
Copy link
Contributor

Choose a reason for hiding this comment

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

We should also delete the glusterblock-provisioner pod. I believe that's part of a DeploymentConfig.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I dont' see glusterblock provisioner starting up as part of default CNS setup. Also, all the resources in glusterfs namespace gets deleted.

Copy link
Contributor

Choose a reason for hiding this comment

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

It should be deploying by default, because you have to specify --no-block to not deploy it. Regardless, since we COULD deploy it it should be covered by the uninstall.

Copy link
Contributor

Choose a reason for hiding this comment

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

Note that we'll need to cover the uninstall of gluster-s3, but I say we can do that later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure - will check about the block part

- name: Run glusterfs uninstall role
include_role:
name: openshift_storage_glusterfs
tasks_from: uninstall.yml
Copy link
Contributor

Choose a reason for hiding this comment

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

You've changed the file name here but not the actual file's name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now, we have two files at roles/openshift_storage_glusterfs/tasks/ 1. uninstall.yml 2. glusterfs_uninstall.yml

Copy link
Contributor Author

Choose a reason for hiding this comment

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

uninstall.yml is the top level file there.

Copy link
Contributor

Choose a reason for hiding this comment

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

...OH RIGHT! I forget my own words sometimes, sorry. :)

@openshift-merge-robot openshift-merge-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Feb 5, 2018
@openshift-ci-robot openshift-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 7, 2018
Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com>
@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 7, 2018
- name: Run glusterfs uninstall role
include_role:
name: openshift_storage_glusterfs
tasks_from: uninstall.yml
Copy link
Contributor

Choose a reason for hiding this comment

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

...OH RIGHT! I forget my own words sometimes, sorry. :)

- kind: daemonset
name: "glusterfs-{{ glusterfs_name }}"
- kind: storageclass
name: "glusterfs-{{ glusterfs_name }}"
Copy link
Contributor

Choose a reason for hiding this comment

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

It should be deploying by default, because you have to specify --no-block to not deploy it. Regardless, since we COULD deploy it it should be covered by the uninstall.

register: devices_info
delegate_to: "{{ item }}"
with_items: "{{ glusterfs_nodes | default([]) }}"
failed_when: False
Copy link
Contributor

Choose a reason for hiding this comment

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

You should use a variable to allow for specifying whether this gets done or not. I saw appropriate the wipe variable for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

- block:
- include_tasks: glusterfs_config_facts.yml
- include_tasks: glusterfs_uninstall.yml
when: "'glusterfs' in groups and groups['glusterfs'] | length > 0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Move the indentation two spaces to the left. This applies it to the whole block, not the last task.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

- block:
- include_tasks: glusterfs_registry_facts.yml
- include_tasks: glusterfs_uninstall.yml
when: "'glusterfs_registry' in groups and groups['glusterfs_registry'] | length > 0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Move the indentation two spaces to the left. This applies it to the whole block, not the last task.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

- kind: daemonset
name: "glusterfs-{{ glusterfs_name }}"
- kind: storageclass
name: "glusterfs-{{ glusterfs_name }}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Note that we'll need to cover the uninstall of gluster-s3, but I say we can do that later.

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 12, 2018
@jarrpa
Copy link
Contributor

jarrpa commented Feb 12, 2018

/ok-to-test

@openshift-ci-robot openshift-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 12, 2018
@openshift-merge-robot
Copy link
Contributor

/test all [submit-queue is verifying that this PR is safe to merge]

@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue.

@openshift-merge-robot openshift-merge-robot merged commit b1cca03 into openshift:master Feb 13, 2018
@openshift-ci-robot
Copy link

@SaravanaStorageNetwork: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/openshift-jenkins/extended_conformance_install_crio 2861f28 link /test crio

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

jarrpa added a commit to jarrpa/openshift-ansible that referenced this pull request Feb 14, 2018
This reimpliments openshift#6402 which was missed by openshift#6918.

Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
openshift-merge-robot added a commit that referenced this pull request Feb 20, 2018
Automatic merge from submit-queue.

GlusterFS: Fix uninstall regression

This reimpliments #6402 which was missed by #6918.

Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
mjudeikis pushed a commit to mjudeikis/openshift-ansible that referenced this pull request Mar 9, 2018
This reimpliments openshift#6402 which was missed by openshift#6918.

Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
mjudeikis pushed a commit to mjudeikis/openshift-ansible that referenced this pull request Mar 13, 2018
…ll_playbook

Automatic merge from submit-queue.

Uninstall playbook for Glusterfs

Uninstall playbook for Glusterfs
mjudeikis pushed a commit to mjudeikis/openshift-ansible that referenced this pull request Mar 13, 2018
Automatic merge from submit-queue.

GlusterFS: Fix uninstall regression

This reimpliments openshift#6402 which was missed by openshift#6918.

Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
mjudeikis pushed a commit to mjudeikis/openshift-ansible that referenced this pull request Mar 14, 2018
…ll_playbook

Automatic merge from submit-queue.

Uninstall playbook for Glusterfs

Uninstall playbook for Glusterfs
mjudeikis pushed a commit to mjudeikis/openshift-ansible that referenced this pull request Mar 14, 2018
Automatic merge from submit-queue.

GlusterFS: Fix uninstall regression

This reimpliments openshift#6402 which was missed by openshift#6918.

Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
mjudeikis pushed a commit to mjudeikis/openshift-ansible that referenced this pull request Mar 14, 2018
…ll_playbook

Automatic merge from submit-queue.

Uninstall playbook for Glusterfs

Uninstall playbook for Glusterfs
mjudeikis pushed a commit to mjudeikis/openshift-ansible that referenced this pull request Mar 14, 2018
Automatic merge from submit-queue.

GlusterFS: Fix uninstall regression

This reimpliments openshift#6402 which was missed by openshift#6918.

Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
mjudeikis pushed a commit to mjudeikis/openshift-ansible that referenced this pull request Mar 14, 2018
…ll_playbook

Automatic merge from submit-queue.

Uninstall playbook for Glusterfs

Uninstall playbook for Glusterfs
mjudeikis pushed a commit to mjudeikis/openshift-ansible that referenced this pull request Mar 14, 2018
Automatic merge from submit-queue.

GlusterFS: Fix uninstall regression

This reimpliments openshift#6402 which was missed by openshift#6918.

Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
mjudeikis pushed a commit to mjudeikis/openshift-ansible that referenced this pull request Mar 19, 2018
…ll_playbook

Automatic merge from submit-queue.

Uninstall playbook for Glusterfs

Uninstall playbook for Glusterfs
mjudeikis pushed a commit to mjudeikis/openshift-ansible that referenced this pull request Mar 19, 2018
Automatic merge from submit-queue.

GlusterFS: Fix uninstall regression

This reimpliments openshift#6402 which was missed by openshift#6918.

Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
mjudeikis pushed a commit to mjudeikis/openshift-ansible that referenced this pull request Apr 4, 2018
…ll_playbook

Automatic merge from submit-queue.

Uninstall playbook for Glusterfs

Uninstall playbook for Glusterfs
mjudeikis pushed a commit to mjudeikis/openshift-ansible that referenced this pull request Apr 4, 2018
Automatic merge from submit-queue.

GlusterFS: Fix uninstall regression

This reimpliments openshift#6402 which was missed by openshift#6918.

Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
mjudeikis pushed a commit to mjudeikis/openshift-ansible that referenced this pull request Apr 5, 2018
…ll_playbook

Automatic merge from submit-queue.

Uninstall playbook for Glusterfs

Uninstall playbook for Glusterfs
mjudeikis pushed a commit to mjudeikis/openshift-ansible that referenced this pull request Apr 5, 2018
Automatic merge from submit-queue.

GlusterFS: Fix uninstall regression

This reimpliments openshift#6402 which was missed by openshift#6918.

Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
mjudeikis pushed a commit to mjudeikis/openshift-ansible that referenced this pull request Apr 5, 2018
…ll_playbook

Automatic merge from submit-queue.

Uninstall playbook for Glusterfs

Uninstall playbook for Glusterfs
mjudeikis pushed a commit to mjudeikis/openshift-ansible that referenced this pull request Apr 5, 2018
Automatic merge from submit-queue.

GlusterFS: Fix uninstall regression

This reimpliments openshift#6402 which was missed by openshift#6918.

Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
mjudeikis pushed a commit to mjudeikis/openshift-ansible that referenced this pull request Apr 5, 2018
Automatic merge from submit-queue.

GlusterFS: Fix uninstall regression

This reimpliments openshift#6402 which was missed by openshift#6918.

Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
leseb pushed a commit to leseb/openshift-ansible that referenced this pull request Dec 14, 2018
This reimpliments openshift#6402 which was missed by openshift#6918.

Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants