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

Extends collection of shutdown Reasons (e.g. ClusterJoinUnsuccessfulReason) #26570

Conversation

ignasi35
Copy link
Member

Related to lagom/lagom#1806

@akka-ci akka-ci added the validating PR is currently being validated by Jenkins label Mar 19, 2019
/**
* Scala API: The shutdown was initiated by a failure to join a seed node.
*/
object JoiningSeedNodesUnsuccessfulReason extends Reason
Copy link
Member

Choose a reason for hiding this comment

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

That seems extremely specific, should it rather be ClusterJoinUnsuccessful or something like that, or is it important that it was specifically joining to seed nodes that failed?

Copy link
Member

Choose a reason for hiding this comment

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

I agree, could be slightly less specific

Copy link
Member Author

Choose a reason for hiding this comment

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

SGTM

/**
* Java API: The shutdown was initiated by a configuration clash within the existing cluster and the joining node
*/
def incompatibleConfigurationDetectedReason: Reason = IncompatibleConfigurationDetectedReason
Copy link
Member

Choose a reason for hiding this comment

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

Sounds like it makes sense to make it public

@akka-ci akka-ci added needs-attention Indicates a PR validation failure (set by CI infrastructure) and removed validating PR is currently being validated by Jenkins labels Mar 19, 2019
@akka-ci
Copy link

akka-ci commented Mar 19, 2019

Test FAILed.

@akka-ci akka-ci added validating PR is currently being validated by Jenkins needs-attention Indicates a PR validation failure (set by CI infrastructure) and removed needs-attention Indicates a PR validation failure (set by CI infrastructure) validating PR is currently being validated by Jenkins labels Mar 19, 2019
@akka-ci
Copy link

akka-ci commented Mar 19, 2019

Test FAILed.

Copy link
Member

@patriknw patriknw left a comment

Choose a reason for hiding this comment

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

seems good to add those

@ignasi35 ignasi35 changed the title Adds JoiningSeedNodesUnsuccessfulReason Extends collection of shutdown Reasons (e.g. ClusterJoinUnsuccessfulReason) Mar 20, 2019
@@ -501,7 +501,7 @@ private[cluster] class ClusterCoreDaemon(publisher: ActorRef, joinConfigCompatCh
seedNodes.mkString(", "),
ShutdownAfterUnsuccessfulJoinSeedNodes)
joinSeedNodesDeadline = None
CoordinatedShutdown(context.system).run(CoordinatedShutdown.ClusterDowningReason)
CoordinatedShutdown(context.system).run(CoordinatedShutdown.ClusterJoinUnsuccessfulReason)
Copy link
Member

Choose a reason for hiding this comment

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

Currently we have ClusterDowningReason configured to use exit code -1 (abnormal termination). Shouldn't ClusterJoinUnsuccessfulReason also be configured to use -1.

I guess -1 will have the effect that an orchestration platform will start it again, which is probably desired also for unsuccessful join?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmmm, I think the exit status was relevant in ConductR but I don't think it is in Kubernetes. IDK about other orchestrators.

I'll fix this PR but I think we could consider deprecating the feature.

Copy link
Member

Choose a reason for hiding this comment

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

The exit code is useful. k8 isn't the only thing. A bash script can check exit code for decision of restarting process.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmmm, in the case of IncompatibleConfigurationDetectedReason restarting won't help so I don't think a custom exit code is necessary.

Copy link
Member

Choose a reason for hiding this comment

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

I agree, IncompatibleConfigurationDetectedReason

@akka-ci akka-ci added validating PR is currently being validated by Jenkins needs-attention Indicates a PR validation failure (set by CI infrastructure) and removed needs-attention Indicates a PR validation failure (set by CI infrastructure) validating PR is currently being validated by Jenkins labels Mar 20, 2019
@akka-ci
Copy link

akka-ci commented Mar 20, 2019

Test FAILed.

@akka-ci akka-ci added validating PR is currently being validated by Jenkins needs-attention Indicates a PR validation failure (set by CI infrastructure) and removed needs-attention Indicates a PR validation failure (set by CI infrastructure) validating PR is currently being validated by Jenkins labels Mar 20, 2019
@akka-ci
Copy link

akka-ci commented Mar 20, 2019

Test FAILed.

@akka-ci akka-ci added the validating PR is currently being validated by Jenkins label Mar 21, 2019
@akka-ci akka-ci added needs-attention Indicates a PR validation failure (set by CI infrastructure) and removed needs-attention Indicates a PR validation failure (set by CI infrastructure) validating PR is currently being validated by Jenkins labels Mar 21, 2019
@akka-ci
Copy link

akka-ci commented Mar 21, 2019

Test FAILed.

@akka-ci akka-ci added validating PR is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed needs-attention Indicates a PR validation failure (set by CI infrastructure) validating PR is currently being validated by Jenkins labels Mar 21, 2019
@akka-ci
Copy link

akka-ci commented Mar 21, 2019

Test PASSed.

@ignasi35
Copy link
Member Author

The Travis job failed this morning but I think the cause was a failing bintray. Can someone relaunch, please?

@johanandren
Copy link
Member

PLS BUILD

@akka-ci akka-ci added validating PR is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed tested PR that was successfully built and tested by Jenkins validating PR is currently being validated by Jenkins labels Mar 21, 2019
@akka-ci
Copy link

akka-ci commented Mar 21, 2019

Test PASSed.

Copy link
Member

@patriknw patriknw left a comment

Choose a reason for hiding this comment

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

LGTM

@patriknw patriknw merged commit c097e81 into akka:master Mar 26, 2019
@patriknw patriknw added this to the 2.5.22 milestone Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tested PR that was successfully built and tested by Jenkins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants