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

ft: ZENKO-583 get CRR status #331

Merged
merged 2 commits into from
Jun 30, 2018

Conversation

philipyoo
Copy link
Contributor

Check if CRR is enabled for a given destination replication location via the API.
Save CRR status state within zookeeper. If pod goes down, read and resume from previous state

@philipyoo philipyoo force-pushed the feature/ZENKO-583-getCRRStatus branch from 0da2585 to 61c09d3 Compare June 25, 2018 21:22
@ironman-machine
Copy link
Contributor

PR has been updated. Reviewers, please be cautious.

@philipyoo philipyoo force-pushed the feature/ZENKO-583-getCRRStatus branch from 61c09d3 to 8d14038 Compare June 26, 2018 01:35
@ironman-machine
Copy link
Contributor

PR has been updated. Reviewers, please be cautious.

@philipyoo philipyoo force-pushed the feature/ZENKO-235-manualCRRPauseResume branch from 9dc16cf to cd8ca97 Compare June 26, 2018 23:31
@philipyoo philipyoo force-pushed the feature/ZENKO-583-getCRRStatus branch from 8d14038 to ccb0c63 Compare June 26, 2018 23:32
@ironman-machine
Copy link
Contributor

PR has been updated. Reviewers, please be cautious.

@philipyoo philipyoo force-pushed the feature/ZENKO-235-manualCRRPauseResume branch 2 times, most recently from 5a75051 to b8502e2 Compare June 27, 2018 00:14
@philipyoo philipyoo force-pushed the feature/ZENKO-583-getCRRStatus branch from ccb0c63 to c817a92 Compare June 27, 2018 00:25
@ironman-machine
Copy link
Contributor

PR has been updated. Reviewers, please be cautious.

@philipyoo philipyoo force-pushed the feature/ZENKO-235-manualCRRPauseResume branch 2 times, most recently from 58fbbe4 to f288387 Compare June 27, 2018 00:51
When the paused Consumer is resumed, it will again resume consuming entries
from its last offset.
QueueProcessors will subscribe to this channel, and on receiving a request
to pause or resume CRR, will notify all of its BackbeatConsumers to perform the
Copy link
Contributor

Choose a reason for hiding this comment

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

all of their BackbeatConsumers

all sites configured as destination replication endpoints.

Response:
```sh
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you should use json not sh.

all locations configured as destination replication endpoints.

Response:
```sh
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you should use json not sh.

Response:
```sh
{
location1: "disabled",
Copy link
Contributor

Choose a reason for hiding this comment

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

Since the output shall be JSON, let's add double-quotes to the keys like "location1"

Response:
```sh
{
location: "enabled",
Copy link
Contributor

Choose a reason for hiding this comment

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

May be better to stick with the name that appears in the syntax line: "<location-name>": "enabled"

if (err && err.name === 'NODE_EXISTS') {
zkClient.getData(path, (err, data) => {
if (err) {
log.fatal('could not check check site status in zookeeper',
Copy link
Contributor

Choose a reason for hiding this comment

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

double check check

zkClient.connect();
zkClient.once('error', err => {
log.fatal('error connecting to zookeeper', {
error: err,
Copy link
Contributor

Choose a reason for hiding this comment

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

error: err.message

log.fatal('could not create path in zookeeper', {
method: 'QueueProcessor:task',
zookeeperPath: path,
error: err,
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

if (!disableConsumer) {
this._consumer.subscribe([this._topic]);
} else {
this._log.info(`consumer not subcribed to topic ${this._topic}`);
Copy link
Contributor

Choose a reason for hiding this comment

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

At this level I would rather log in debug mode, as the message is likely obscure for a normal user. Such message would better fit at the service level (stating that it's paused, for example).

@@ -236,7 +239,9 @@ class BackbeatAPI {
getHealthcheck(details, cb) {
return this._healthcheck.getHealthcheck((err, data) => {
if (err) {
this._logger.error('error getting healthcheck', err);
this._logger.error('error getting healthcheck', {
error: err,
Copy link
Contributor

Choose a reason for hiding this comment

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

error: err.message

Copy link
Contributor Author

@philipyoo philipyoo Jun 27, 2018

Choose a reason for hiding this comment

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

oops, this is my mistake, I want to pass err here as is because its a unique object returned from the Healthcheck class. I'll look into figuring out a better way of implementing this in a future refactor.
Change is reverted

@philipyoo philipyoo force-pushed the feature/ZENKO-583-getCRRStatus branch from c817a92 to cdcc885 Compare June 27, 2018 00:55
@ironman-machine
Copy link
Contributor

PR has been updated. Reviewers, please be cautious.

1 similar comment
@ironman-machine
Copy link
Contributor

PR has been updated. Reviewers, please be cautious.

@ironman-machine
Copy link
Contributor

CONFLICT (add/add): Merge conflict in docs/crr-pause-resume.md

@ironman-machine
Copy link
Contributor

PR has been updated. Reviewers, please be cautious.

@philipyoo philipyoo force-pushed the feature/ZENKO-583-getCRRStatus branch from ee01f6d to 0bb1482 Compare June 27, 2018 15:52
@ironman-machine
Copy link
Contributor

PR has been updated. Reviewers, please be cautious.

@philipyoo philipyoo force-pushed the feature/ZENKO-583-getCRRStatus branch from 0bb1482 to 51155a7 Compare June 27, 2018 15:58
@ironman-machine
Copy link
Contributor

PR has been updated. Reviewers, please be cautious.

1 similar comment
@ironman-machine
Copy link
Contributor

PR has been updated. Reviewers, please be cautious.

@ironman-machine
Copy link
Contributor

CONFLICT (add/add): Merge conflict in docs/crr-pause-resume.md

@philipyoo philipyoo force-pushed the feature/ZENKO-583-getCRRStatus branch from c3f8525 to 6896d6b Compare June 27, 2018 16:19
@ironman-machine
Copy link
Contributor

PR has been updated. Reviewers, please be cautious.

@philipyoo philipyoo changed the base branch from feature/ZENKO-235-manualCRRPauseResume to development/8.0 June 27, 2018 18:27
@bert-e
Copy link
Contributor

bert-e commented Jun 27, 2018

Hello philipyoo,

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

Status report is not available.

@bert-e
Copy link
Contributor

bert-e commented Jun 27, 2018

Conflict

There is a conflict between your branch feature/ZENKO-583-getCRRStatus and the
destination branch development/8.0.

Please resolve the conflict on the feature branch (feature/ZENKO-583-getCRRStatus).

#!bash
 $ git fetch
 $ git checkout origin/feature/ZENKO-583-getCRRStatus
 $ git merge origin/development/8.0
 $ # <intense conflict resolution>
 $ git push origin HEAD:feature/ZENKO-583-getCRRStatus

@philipyoo philipyoo force-pushed the feature/ZENKO-583-getCRRStatus branch from d381aa7 to 5a3349e Compare June 28, 2018 00:24
@ironman-machine
Copy link
Contributor

PR has been updated. Reviewers, please be cautious.

@philipyoo philipyoo force-pushed the feature/ZENKO-583-getCRRStatus branch from 5a3349e to 2155857 Compare June 28, 2018 00:30
@ironman-machine
Copy link
Contributor

PR has been updated. Reviewers, please be cautious.

@philipyoo philipyoo force-pushed the feature/ZENKO-583-getCRRStatus branch from 2155857 to 2d3a30f Compare June 28, 2018 17:50
@ironman-machine
Copy link
Contributor

PR has been updated. Reviewers, please be cautious.

@philipyoo philipyoo force-pushed the feature/ZENKO-583-getCRRStatus branch from 2d3a30f to 74d91ae Compare June 28, 2018 22:12
@ironman-machine
Copy link
Contributor

PR has been updated. Reviewers, please be cautious.

@bert-e
Copy link
Contributor

bert-e commented Jun 29, 2018

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/8.0

The following branches will NOT be impacted:

  • development/7.4

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 Release Engineering 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 Release Engineering now.

@philipyoo
Copy link
Contributor Author

bert-e help

@philipyoo
Copy link
Contributor Author

@bert-e help

@bert-e
Copy link
Contributor

bert-e commented Jun 30, 2018

Help page

The following options and commands are available at this time.

Options

name description privileged
➡️ bypass_jira_check Bypass the Jira issue check
➡️ after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
➡️ bypass_author_approval Bypass the pull request author's approval
➡️ no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
➡️ unanimity Change review acceptance criteria from one reviewer at least to all reviewers
➡️ bypass_tester_approval Bypass the pull request testers' approval
➡️ bypass_peer_approval Bypass the pull request peers' approval
➡️ bypass_commit_size Bypass the check on the size of the changeset TBA
➡️ bypass_build_status Bypass the build and test status
➡️ bypass_incompatible_branch Bypass the check on the source branch prefix
➡️ create_pull_requests Allow the creation of integration pull requests.
➡️ wait Instruct Bert-E not to run until further notice.

Commands

name description privileged
➡️ help Print Bert-E's manual in the pull request.
➡️ build Re-start a fresh build TBA
➡️ retry Re-start a fresh build TBA
➡️ clear Remove all comments from Bert-E from the history TBA
➡️ reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.
➡️ status Print Bert-E's current status in the pull request TBA
➡️ force_reset Delete integration branches & pull requests, and restart merge process from the beginning.

@ironman-machine ironman-machine dismissed stale reviews from alexanderchan-scality and jonathan-gramain June 30, 2018 02:19

Do it again human slave!:point_right: :runner: (Oh and the pull request has been updated, by the way.)

@ironman-machine
Copy link
Contributor

PR has been updated. Reviewers, please be cautious.

@ironman-machine
Copy link
Contributor

CONFLICT (add/add): Merge conflict in extensions/lifecycle/management.js
CONFLICT (add/add): Merge conflict in docs/crr-pause-resume.md

@philipyoo philipyoo force-pushed the feature/ZENKO-583-getCRRStatus branch from d007e52 to dcd1b14 Compare June 30, 2018 02:27
@ironman-machine
Copy link
Contributor

PR has been updated. Reviewers, please be cautious.

@jonathan-gramain jonathan-gramain merged commit 0b2cc21 into development/8.0 Jun 30, 2018
@rahulreddy rahulreddy deleted the feature/ZENKO-583-getCRRStatus branch June 30, 2018 08:36
@rahulreddy rahulreddy restored the feature/ZENKO-583-getCRRStatus branch June 30, 2018 08:36
@rahulreddy
Copy link
Collaborator

@bert-e reset

@rahulreddy rahulreddy deleted the feature/ZENKO-583-getCRRStatus branch June 30, 2018 08:39
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.

6 participants