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

Add state to cleanup old PrometheusRule CRs post upgrade/downgrade #2594

Merged
merged 1 commit into from
Jun 5, 2020

Conversation

Ebaneck
Copy link
Contributor

@Ebaneck Ebaneck commented Jun 4, 2020

Component:

'salt', 'prometheus-operator'

Context:

See: #2585

Summary:

  • Ensures we are able to clean up remnants of old PrometheusRule CR's post upgrade/downgrade
  • Tested upgrade locally from 2.4.4-dev to 2.5.1-dev (output below 👇)
bootstrap_master:
----------
          ID: Delete old prometheus-operator-objects prometheus-operator-kubernetes-absent
    Function: metalk8s_kubernetes.object_absent
        Name: prometheus-operator-kubernetes-absent
      Result: True
     Comment: The object was deleted and not present after 4 check attempts
     Started: 06:50:30.580050
    Duration: 32276.439 ms
     Changes:   
              ----------
              new:
                  absent
              old:
                  present
----------
          ID: Delete old prometheus-operator-objects prometheus-operator-node-time
    Function: metalk8s_kubernetes.object_absent
        Name: prometheus-operator-node-time
      Result: True
     Comment: The object was deleted and not present after 2 check attempts
     Started: 06:51:02.864299
    Duration: 10454.147 ms
     Changes:   
              ----------
              new:
                  absent
              old:
                  present

Summary for bootstrap_master
------------
Succeeded: 2 (changed=2)
Failed:    0
------------
Total states run:     2
Total run time:  42.731 s

Acceptance criteria:

  • Monitoring tests in post-merge should pass!!

Closes: #2585

@bert-e
Copy link
Contributor

bert-e commented Jun 4, 2020

Hello ebaneck,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Status report is not available.

@Ebaneck Ebaneck requested review from TeddyAndrieux and a team June 4, 2020 07:41
scripts/upgrade.sh.in Outdated Show resolved Hide resolved
@Ebaneck Ebaneck force-pushed the bugfix/2585-fix-prometheus-rules-tests branch from ee3626f to f507195 Compare June 4, 2020 09:41
@Ebaneck Ebaneck force-pushed the bugfix/2585-fix-prometheus-rules-tests branch from f507195 to b573dbb Compare June 4, 2020 12:21
Copy link
Contributor

@gdemonet gdemonet left a comment

Choose a reason for hiding this comment

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

Behaviour is good 👌

salt/metalk8s/addons/prometheus-operator/post-cleanup.sls Outdated Show resolved Hide resolved
salt/metalk8s/addons/prometheus-operator/post-cleanup.sls Outdated Show resolved Hide resolved
@Ebaneck Ebaneck force-pushed the bugfix/2585-fix-prometheus-rules-tests branch from a575f5c to 7a1b2ea Compare June 4, 2020 20:09
@Ebaneck
Copy link
Contributor Author

Ebaneck commented Jun 4, 2020

/reset

@bert-e
Copy link
Contributor

bert-e commented Jun 4, 2020

Reset complete

I have successfully deleted this pull request's integration branches.

@bert-e
Copy link
Contributor

bert-e commented Jun 4, 2020

Conflict

A conflict has been raised during the creation of
integration branch w/2.5/bugfix/2585-fix-prometheus-rules-tests with contents from bugfix/2585-fix-prometheus-rules-tests
and development/2.5.

I have not created the integration branch.

Here are the steps to resolve this conflict:

 $ git fetch
 $ git checkout -B w/2.5/bugfix/2585-fix-prometheus-rules-tests origin/development/2.5
 $ git merge origin/bugfix/2585-fix-prometheus-rules-tests
 $ # <intense conflict resolution>
 $ git commit
 $ git push -u origin w/2.5/bugfix/2585-fix-prometheus-rules-tests

@scality scality deleted a comment from bert-e Jun 4, 2020
@bert-e
Copy link
Contributor

bert-e commented Jun 4, 2020

Integration data created

I have created the integration data for the additional destination branches.

The following branches will NOT be impacted:

  • development/1.0
  • development/1.1
  • development/1.2
  • development/1.3
  • development/2.0
  • development/2.1
  • development/2.2
  • development/2.3

You can set option create_pull_requests if you need me to create
integration pull requests in addition to integration branches, with:

@bert-e create_pull_requests

@bert-e
Copy link
Contributor

bert-e commented Jun 4, 2020

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

@Ebaneck Ebaneck marked this pull request as ready for review June 5, 2020 07:12
@Ebaneck
Copy link
Contributor Author

Ebaneck commented Jun 5, 2020

/approve

@bert-e
Copy link
Contributor

bert-e commented Jun 5, 2020

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

The following options are set: approve

salt/metalk8s/addons/prometheus-operator/post-cleanup.sls Outdated Show resolved Hide resolved
salt/metalk8s/addons/prometheus-operator/post-cleanup.sls Outdated Show resolved Hide resolved
scripts/downgrade.sh.in Outdated Show resolved Hide resolved
scripts/upgrade.sh.in Outdated Show resolved Hide resolved
salt/metalk8s/addons/prometheus-operator/post-cleanup.sls Outdated Show resolved Hide resolved
salt/metalk8s/addons/prometheus-operator/post-cleanup.sls Outdated Show resolved Hide resolved
@Ebaneck Ebaneck force-pushed the bugfix/2585-fix-prometheus-rules-tests branch from 7a1b2ea to d5271b9 Compare June 5, 2020 09:06
…Rule CRs

During upgrade/downgrade, remnant PrometheusRule CR's of the previous
installation might remain.

This commit adds a salt-state to perform cleanup post upgrade/downgrade.

This also ensures that our CI tests for deployed Prometheus rules always
pass.

Closes: #2585
@bert-e
Copy link
Contributor

bert-e commented Jun 5, 2020

History mismatch

Merge commit #7a1b2ea2f2afe7bc70651c95d0184a97783354cd on the integration branch
w/2.5/bugfix/2585-fix-prometheus-rules-tests is merging a branch which is neither the current
branch bugfix/2585-fix-prometheus-rules-tests nor the development branch
development/2.5.

It is likely due to a rebase of the branch bugfix/2585-fix-prometheus-rules-tests and the
merge is not possible until all related w/* branches are deleted or updated.

Please use the reset command to have me reinitialize these branches.

The following options are set: approve

@Ebaneck Ebaneck requested a review from alexandre-allard June 5, 2020 09:07
@Ebaneck
Copy link
Contributor Author

Ebaneck commented Jun 5, 2020

/reset

@bert-e
Copy link
Contributor

bert-e commented Jun 5, 2020

Reset complete

I have successfully deleted this pull request's integration branches.

The following options are set: approve

@bert-e
Copy link
Contributor

bert-e commented Jun 5, 2020

Conflict

A conflict has been raised during the creation of
integration branch w/2.5/bugfix/2585-fix-prometheus-rules-tests with contents from bugfix/2585-fix-prometheus-rules-tests
and development/2.5.

I have not created the integration branch.

Here are the steps to resolve this conflict:

 $ git fetch
 $ git checkout -B w/2.5/bugfix/2585-fix-prometheus-rules-tests origin/development/2.5
 $ git merge origin/bugfix/2585-fix-prometheus-rules-tests
 $ # <intense conflict resolution>
 $ git commit
 $ git push -u origin w/2.5/bugfix/2585-fix-prometheus-rules-tests

The following options are set: approve

@bert-e
Copy link
Contributor

bert-e commented Jun 5, 2020

Integration data created

I have created the integration data for the additional destination branches.

The following branches will NOT be impacted:

  • development/1.0
  • development/1.1
  • development/1.2
  • development/1.3
  • development/2.0
  • development/2.1
  • development/2.2
  • development/2.3

You can set option create_pull_requests if you need me to create
integration pull requests in addition to integration branches, with:

@bert-e create_pull_requests

The following options are set: approve

@bert-e
Copy link
Contributor

bert-e commented Jun 5, 2020

In the queue

The changeset has received all authorizations and has been added to the
relevant queue(s). The queue(s) will be merged in the target development
branch(es) as soon as builds have passed.

The changeset will be merged in:

  • ✔️ development/2.4

  • ✔️ development/2.5

  • ✔️ development/2.6

The following branches will NOT be impacted:

  • development/1.0
  • development/1.1
  • development/1.2
  • development/1.3
  • development/2.0
  • development/2.1
  • development/2.2
  • development/2.3

There is no action required on your side. You will be notified here once
the changeset has been merged. In the unlikely event that the changeset
fails permanently on the queue, a member of the admin team will
contact you to help resolve the matter.

IMPORTANT

Please do not attempt to modify this pull request.

  • Any commit you add on the source branch will trigger a new cycle after the
    current queue is merged.
  • Any commit you add on one of the integration branches will be lost.

If you need this pull request to be removed from the queue, please contact a
member of the admin team now.

The following options are set: approve

@bert-e
Copy link
Contributor

bert-e commented Jun 5, 2020

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/2.4

  • ✔️ development/2.5

  • ✔️ development/2.6

The following branches have NOT changed:

  • development/1.0
  • development/1.1
  • development/1.2
  • development/1.3
  • development/2.0
  • development/2.1
  • development/2.2
  • development/2.3

Please check the status of the associated issue None.

Goodbye ebaneck.

@bert-e bert-e merged commit d836f44 into development/2.4 Jun 5, 2020
@bert-e bert-e deleted the bugfix/2585-fix-prometheus-rules-tests branch June 5, 2020 11:12
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.

5 participants