-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[Ambari-22986] branch 2.6 - Not able to add Livy2 after doing rolling upgrade to M21 #355
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
Conversation
ncole
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any unit tests covering this?
| s_upgradeHelper.updateDesiredRepositoriesAndConfigs(upgradeContext); | ||
| if (direction == Direction.DOWNGRADE) { | ||
| StackId targetStack = upgradeContext.getCluster().getCurrentStackVersion(); | ||
| cluster.setDesiredStackVersion( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: you already have a StackId, no need to make a new one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, did you happen to test an EU?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested EU, works well
jonathan-hurley
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've made the changes here only for rolling and host ordered. Why does express not have this problem? Where is express setting the desired stack ID?
| StackId currentStack = cluster.getCurrentStackVersion(); | ||
| if (desiredStack.compareTo(currentStack) < 0) { | ||
| cluster.setDesiredStackVersion(currentStack); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If desired stack is > current stack, that's also a problem. Can you change this to a !equals() call instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that user is not expected to perform Ambari upgrade with a paused stack upgrade? Ok, will change the logic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonathan-hurley , regarding
Why does express not have this problem?
EU updates cluster desired version during upgrade and downgrade at UpdateDesiredRepositoryAction. This action is called only from EU upgrade packs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's what I expected. However, I didn't see it in there. Can you identify where exactly it's set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
org/apache/ambari/server/serveraction/upgrades/UpdateDesiredRepositoryAction.java:149
at updateDesiredRepositoryVersion()
// move the cluster's desired stack as well
StackId targetStackId = targetRepositoryVersion.getStackId();
cluster.setDesiredStackVersion(targetStackId);
}
and below at the same file for downgrade.
EU was not broken, this code is already at 2.6 branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was looking in trunk :)
Thanks!
…1 - fixed review comments (dlysnichenko)
…1 - add tests (dlysnichenko)
|
added few tests |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
ci failure not related to changes, AMBARI-22918 broke it. |
What changes were proposed in this pull request?
Fix the issue that the desired version of a cluster is not updated (only during cross-stack rolling upgrade).
How was this patch tested?
Running maven tests
Checked RU/EU and Ambari upgrade