Skip to content

How to "keep-alive" by lease_id? #2409

Description

@petrasl1976

Hi,

I am trying to find a way how can i extend TTL for lease by having its id only (not a whole object)? Lets say i have a script which will create lease:

import etcd3
etcd = etcd3.client()
etcd.lease(50, lease_id=123)

And i have another script which i like to refresh the leases only, without [re]creating it:

import etcd3
etcd = etcd3.client()
etcd.refresh_lease(lease_id=123) # or smth

Similar functionality like etcdctl has, so i can run keep-alive independently from another script:

# etcdctl lease grant 60
lease 42d78d9df80a26ab granted with TTL(60s)
# etcdctl lease keep-alive 42d78d9df80a26ab --once
lease 42d78d9df80a26ab keepalived with TTL(60)

Is there a way with etcd3 module extend lease when it is already created by another process or script ?

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions