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

(POOLER-31) Expire redis vm key when clone fails #266

Merged
merged 1 commit into from
Jun 29, 2018

Conversation

mattkirby
Copy link
Contributor

This commit updates pool_manager to expire a redis VM key when a clone fails. Without this change VMs that fail to clone have their metadata left forever.

This commit updates pool_manager to expire a redis VM key when a clone fails. Without this change VMs that fail to clone have their metadata left forever.
@@ -245,7 +245,9 @@ def _clone_vm(pool, provider)

$metrics.timing("clone.#{pool_name}", finish)
rescue => _err
$redis.srem('vmpooler__pending__' + pool_name, new_vmname)
$redis.srem("vmpooler__pending__#{pool_name}", new_vmname)
expiration_ttl = $config[:redis]['data_ttl'].to_i * 60 * 60
Copy link

Choose a reason for hiding this comment

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

It looks like redis is taking seconds for this value, so data_ttl is in units of hours? Can this be documented somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looks like there is a mention of this in the example configuration file https://github.com/puppetlabs/vmpooler/blob/master/vmpooler.yaml.example#L180 .

Copy link

Choose a reason for hiding this comment

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

👍

@mchllweeks mchllweeks merged commit 0ce66eb into puppetlabs:master Jun 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants