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

fix(status): update CSPI status when corresponding cStor pool-manager terminated #141

Conversation

mittachaitu
Copy link
Contributor

@mittachaitu mittachaitu commented Jul 28, 2020

This PR updates the CSPI status to OFFLINE whenever
cStor pool-manager container is terminated. Pod deletion, eviction,
scale down are a few scenarios that will cause the container
to terminate.

NOTE: Status will be not updated in case of aburupt
the shutdown of pods/nodes.

This PR fixes: #128

Signed-off-by: mittachaitu [email protected]

… terminated

This PR updates the CSPI status to **OFFLINE** whenever
cStor pool-manager container is terminated.

**NOTE**: Status will be not updated incase of forcibly
shutdown of pods/nodes.

Signed-off-by: mittachaitu <[email protected]>
Copy link
Contributor

@akhilerm akhilerm left a comment

Choose a reason for hiding this comment

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

Given a few comments.

Copy link
Contributor

@akhilerm akhilerm left a comment

Choose a reason for hiding this comment

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

/lgtm

…efore even creating the pool

Signed-off-by: mittachaitu <[email protected]>
// zpool commands will error out and fall into this scenario
c.recorder.Event(cspi, corev1.EventTypeWarning,
string(common.FailedSynced),
fmt.Sprintf("Unable to import a pool may be due to underlying pool disk might be lost or bad disk might be attached to the node"),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sonasingh46 is there any better suggestion on event message?

Copy link
Contributor

Choose a reason for hiding this comment

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

Failed to import the pool as the underlying pool might be lost or the disk has gone bad

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.

Update CSPI status to offline when the pool pod is restarted
4 participants