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

Display VM state in GET /vm/:hostname route #100

Merged
merged 2 commits into from
May 6, 2015

Conversation

sschneid
Copy link
Contributor

@sschneid sschneid commented May 1, 2015

eg. 'pending', 'ready', 'running', or 'destroyed'.

{
  "ok": true,
  "fdte9kozfk780y1": {
    "template": "debian-7-x86_64",
    "lifetime": 1,
    "running": 0.05,
    "state": "running",
    "domain": "delivery.puppetlabs.net"
  }
}

This is in favor of #99.

@sschneid sschneid force-pushed the display_vm_state branch from 28e510a to 64bbd7c Compare May 1, 2015 02:38
@colinPL
Copy link
Contributor

colinPL commented May 6, 2015

Are there any durations associated with ready or pending? Similar to how destroyed and running states both set a running key?

@sschneid
Copy link
Contributor Author

sschneid commented May 6, 2015

clone_time is set in the vmpooler__vm__ Redis hash after the clone task completes:

> hgetall vmpooler__vm__we6f5cndfdn1wov
1) "clone"
2) "2015-05-06 09:46:22 -0700"
3) "template"
4) "centos-5-x86_64"
5) "clone_time"
6) "9.70"
7) "check"
8) "2015-05-06 09:48:54 -0700"

The clone and boot phases are also recorded in daily vmpooler__clone__ and vmpooler__boot__ keys:

> hgetall vmpooler__clone__2015-05-06
1) "redhat-7-x86_64:dp980bus8dbwfda"
2) "8.44"
3) "redhat-7-x86_64:qz8n7qa9d23gd4h"
4) "4.71"
...
> hgetall vmpooler__boot__2015-05-06
1) "ubuntu-1204-x86_64:euxqxgoco9awy3i"
2) "65.60"
3) "sles-11-x86_64:soqpzciiz1wx4pk"
4) "121.58"
...

Hopefully that answers your question?

@colinPL
Copy link
Contributor

colinPL commented May 6, 2015

The spec tests are passing. 👍

colinPL added a commit that referenced this pull request May 6, 2015
Display VM state in GET /vm/:hostname route
@colinPL colinPL merged commit cf20c41 into puppetlabs:master May 6, 2015
@sschneid sschneid deleted the display_vm_state branch May 6, 2015 20:31
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.

2 participants