Skip to content

MINOR: Rolling bounce upgrade fixed broker system test#4690

Merged
mjsax merged 12 commits intoapache:trunkfrom
bbejeck:MINOR_rolling_streams_upgrades_fixed_broker
Mar 22, 2018
Merged

MINOR: Rolling bounce upgrade fixed broker system test#4690
mjsax merged 12 commits intoapache:trunkfrom
bbejeck:MINOR_rolling_streams_upgrades_fixed_broker

Conversation

@bbejeck
Copy link
Copy Markdown
Member

@bbejeck bbejeck commented Mar 12, 2018

This introduces a system test where we do a rolling bounce upgrade of streams application instances against a fixed broker version. Each broker version starting with 0.10.2 up to trunk is tested. Streams applications start at 0.10.2 and do rolling upgrades up to trunk then do rolling downgrades back to 0.10.2.

This PR also includes a new utility class for Streams systems tests StreamsTest which extends KafkaTest and provides some convenience methods for working with VerifiableProducer and VerfiiableConsumer and validating results in log files.

There are other system tests streams_standby_replica_test.py and streams_broker_down_resilience_test.py using common functionality that can be pulled out and extend the StreamsTest class instead. I'll do that in a follow-on PR.

EDIT: Since the base class StreamsTest only exists in this PR so far, I've refactored the other tests as mentioned above.

I tested this by running branch builder https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1430/

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@bbejeck
Copy link
Copy Markdown
Member Author

bbejeck commented Mar 12, 2018

@guozhangwang
Copy link
Copy Markdown
Contributor

@bbejeck you'll need to rebase from trunk, the jenkins failures are related to that.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This line is a bit hard to understand, a prerequisite .. if ... but there is no is what.. to me, or is it concatenated from the previous sentence?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: Maybe rename to StreamsTestDriver to be consistent with other services under streams.py.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Since this extends KafkaTest and isn't a service itself, what do you think about StreamsTestBase or BaseStreamsTest?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good point, BaseStreamsTest is fine.

Comment thread tests/kafkatest/version.py Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe just add LATEST_1_1 here as well, though we are not going to use it yet?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ack

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That causes some problems with the dockerfile, since we'd have to download our test jar from the mirror, but it's not there yet. In fact, 1.0.0 is the latest package in the mirror.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Those files are uploaded manually for the docker setup. I'll take care of it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could we do @matrix(broker_version =["...", ...} as we did in simple benchmark?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ack

@bbejeck bbejeck force-pushed the MINOR_rolling_streams_upgrades_fixed_broker branch from 3d3dcc0 to 75bf4b3 Compare March 13, 2018 14:47
@bbejeck
Copy link
Copy Markdown
Member Author

bbejeck commented Mar 13, 2018

rebased and updated per comments.

Also since we'd have to wait for this PR for merging to refactor the other tests, I've went ahead and updated the other tests mentioned above to remove the common functionality and extend from the base test class StreamsTest

Re-running system tests now.

@bbejeck
Copy link
Copy Markdown
Member Author

bbejeck commented Mar 13, 2018

@vvcephei
Copy link
Copy Markdown
Contributor

LGTM!

FYI: you'll also want to update the Dockerfile, but I have it updated in my PR, so I reckon it doesn't matter (#4689)
Actually, I forgot the vagrantfile, so between the two of us we have covered both ways to run the tests!

@bbejeck
Copy link
Copy Markdown
Member Author

bbejeck commented Mar 14, 2018

retest this please

@mjsax mjsax requested review from guozhangwang and mjsax March 14, 2018 22:04
Copy link
Copy Markdown
Member

@mjsax mjsax left a comment

Choose a reason for hiding this comment

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

Just did a high level review atm.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what about 0.10.1 and 1.1 ?

Copy link
Copy Markdown
Member Author

@bbejeck bbejeck Mar 15, 2018

Choose a reason for hiding this comment

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

Added 0.10.1 I was thinking 0.10.2 was the first version we could do a rolling upgrade from. I've left out 1.1.0 for the moment as I was thinking this PR will be merged before the 1.1 release.

EDIT the package name of StreamsSoakTest is different in 0.10.1 I think @vvcephei ran into the same issue in #4689. The decision there was to leave out 0.10.1 so IMHO we should do the same here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see. That makes sense. I run into the same issue and put a workaround in #4636 -- we should clean this up, after we put proper testing for older versions into place as discussed in #4636.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Don't we need to set version 0.10.1 for those initially? Otherwise, they will have trunk version

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

on line 84 of upgrade_and_verify_start method, we set the version with the first version from the array and start the node, so they all start with earliest specified.

@bbejeck
Copy link
Copy Markdown
Member Author

bbejeck commented Mar 15, 2018

updated this

@bbejeck bbejeck force-pushed the MINOR_rolling_streams_upgrades_fixed_broker branch from 6805b2d to e457564 Compare March 16, 2018 00:30
@bbejeck
Copy link
Copy Markdown
Member Author

bbejeck commented Mar 16, 2018

rebased this

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see. That makes sense. I run into the same issue and put a workaround in #4636 -- we should clean this up, after we put proper testing for older versions into place as discussed in #4636.

self.update_processors_and_verify(self.streams_upgrade_versions)

# with order reversed now we test downgrading, verification run after each downgrade
self.update_processors_and_verify(self.streams_downgrade_versions)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Don't we need to stop all processor at the end?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ack

@bbejeck
Copy link
Copy Markdown
Member Author

bbejeck commented Mar 19, 2018

updated this and kicked off new system test https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1499/.

EDIT: Tests passed

@bbejeck
Copy link
Copy Markdown
Member Author

bbejeck commented Mar 19, 2018

ping @mjsax and @guozhangwang for merging

Copy link
Copy Markdown
Member

@mjsax mjsax left a comment

Choose a reason for hiding this comment

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

LGMT.

@mjsax
Copy link
Copy Markdown
Member

mjsax commented Mar 19, 2018

Retest this please

@bbejeck
Copy link
Copy Markdown
Member Author

bbejeck commented Mar 20, 2018

retest this please

3 similar comments
@bbejeck
Copy link
Copy Markdown
Member Author

bbejeck commented Mar 21, 2018

retest this please

@bbejeck
Copy link
Copy Markdown
Member Author

bbejeck commented Mar 21, 2018

retest this please

@bbejeck
Copy link
Copy Markdown
Member Author

bbejeck commented Mar 21, 2018

retest this please

@bbejeck
Copy link
Copy Markdown
Member Author

bbejeck commented Mar 22, 2018

@guozhangwang @mjsax

All tests pass now, call for final review and merging

Copy link
Copy Markdown
Contributor

@vvcephei vvcephei left a comment

Choose a reason for hiding this comment

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

This lgtm.

Your implementation has got me thinking about refactoring the cross-version upgrade/downgrade test to set up the brokers just once and do a bunch of cross-grades like you've done. I think that test would run much faster that way. Something for when I'm on call, maybe...

@mjsax
Copy link
Copy Markdown
Member

mjsax commented Mar 22, 2018

@vvcephei What you suggest will be part of KIP-268 implementation. Compare #4746 and #4758

@mjsax mjsax merged commit 286216b into apache:trunk Mar 22, 2018
@mjsax
Copy link
Copy Markdown
Member

mjsax commented Mar 22, 2018

Merged to trunk. Thanks for the patch @bbejeck.

hejiefang pushed a commit to hejiefang/kafka that referenced this pull request Mar 26, 2018
Reviewers: Guozhang Wang <guozhang@confluent.io>, John Roesler <john@confluent.io>, Matthias J. Sax <matthias@confluent.io>
@bbejeck bbejeck deleted the MINOR_rolling_streams_upgrades_fixed_broker branch July 10, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants