Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

bprashanth
Copy link
Contributor

We currently let the expectations of an rc expire naturally. This PR deletes them explicitly when the rc is deleted. Also adds a unittest for rc deletion, which I apparently didn't have :\

@bprashanth
Copy link
Contributor Author

@lavalamp

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for delay reviewing; when an rc gets deleted, the proper behavior is for it to sync to the last requested state (if known) before RC manager forgets about it.

Copy link
Contributor

Choose a reason for hiding this comment

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

hm. That gets complicated with expectations. Maybe this is better behavior. Ideally I'd like it to make one last attempt to sync; so if you set replicas=0 and then delete the rc, it would in fact delete all the replicas. But if you set replicas=5, delete the RC & add it again with a new name and replicas=17, RC Manager should not keep the old one around to fight with the new one...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doing that last sync is a little hard, though I'm sure I can figure out a way if that's needed. It's hard because we insert the key of the rc into the work queue, and by the time we pull it out the other side, the rc has been deleted from the store. I'd have to sidestep the work queue alltogether for deletes.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK I thought about it and I think that since we require the client to wait anyway, it's OK if RC manager doesn't do this for the moment.

@lavalamp
Copy link
Contributor

LGTM; Can you rebase?

@bprashanth
Copy link
Contributor Author

Rebased

@lavalamp lavalamp added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 19, 2015
dchen1107 added a commit that referenced this pull request May 22, 2015
Delete expectations of a deleted rc instead of letting them expire
@dchen1107 dchen1107 merged commit ddbf851 into kubernetes:master May 22, 2015
@bprashanth bprashanth deleted the rc_ttl_cleanup branch October 26, 2015 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants