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

Remove XML output in VirtualizationInfo and need for hpricot gem #755

Merged
merged 1 commit into from
Mar 9, 2016

Conversation

tas50
Copy link
Contributor

@tas50 tas50 commented Mar 3, 2016

This is an early plugin that hasn't received any work since it's creation. I seriously doubt anyone is using it, but this provides some minor cleanup

  1. remove the hpricot dependency and all the commented out hpricot code. This plugin would fail unless it was installed, but it's not actually used
  2. Stop storing XML data on the node. This is a horrible horrible thing to do. We're storing the exact same data in JSON. Why 2 formats?
  3. Change the debug message to make it clean what plugin fails if the gems aren't there
  4. Add a comment telling anyone reading this what gem to use. The libvirt gem is deprecated and fails to load.

It's a bummer we need this gem to use this because the data is actually pretty useful once it's loaded, but I doubt anyone installs the gem.

This is an early plugin that hasn't received any work since it's creation.  I seriously doubt anyone is using it, but this provides some minor cleanup

1) remove the hpricot dependency and all the commented out hpricot code. This plugin would fail unless it was installed, but it's not actually used
2) Stop storing XML data on the node. This is a horrible horrible thing to do. We're storing the exact same data in JSON. Why 2 formats?
3) Change the debug message to make it clean what plugin fails if the gems aren't there
4) Add a comment telling anyone reading this what gem to use.  The libvirt gem is deprecated and fails to load.

It's a bummer we need this gem to use this because the data is actually pretty useful once it's loaded, but I doubt anyone installs the gem.
@tas50
Copy link
Contributor Author

tas50 commented Mar 3, 2016

 "version": "1.2.2",
  "uri": "xen:///system",
  "nodeinfo": {
    "cores": 1,
    "cpus": 1,
    "memory": 1048056,
    "mhz": 2793,
    "model": "x86_64",
    "nodes": 1,
    "sockets": 1,
    "threads": 1
  },
  "domains": {

  },
  "networks": {
    "default": {
      "bridge_name": "virbr0",
      "uuid": "b034d347-1cca-4d96-ba1b-972f19ca947d"
    }
  },
  "storage": {
    "default": {
      "autostart": true,
      "uuid": "0efedb47-cf7e-205a-ab57-bf8e45f406c2",
      "allocation": 2365468672,
      "available": 17308647424,
      "capacity": 19674116096,
      "state": 2,
      "volumes": {
        "test.img": {
          "key": "/var/lib/libvirt/images/test.img",
          "name": "test.img",
          "path": "/var/lib/libvirt/images/test.img",
          "allocation": 0,
          "capacity": 4294967296,
          "type": 0
        },
        "test2.img": {
          "key": "/var/lib/libvirt/images/test2.img",
          "name": "test2.img",
          "path": "/var/lib/libvirt/images/test2.img",
          "allocation": 0,
          "capacity": 4294967296,
          "type": 0
        }
      }

@tas50
Copy link
Contributor Author

tas50 commented Mar 4, 2016

@chef/client-core this is ready for review

@thommay
Copy link
Contributor

thommay commented Mar 7, 2016

presumably the gem has native code dependencies? Or does it talk to the libvirt daemon?

@tas50 tas50 added the Bug label Mar 7, 2016
@tas50 tas50 changed the title VirtualizationInfo plugin cleanup Remove XML output in VirtualizationInfo and need for hpricot gem Mar 7, 2016
@tas50
Copy link
Contributor Author

tas50 commented Mar 7, 2016

@thommay It's just a nice way to interfact with libvirt daemon. It's not worth bundling and I think the way we're storing the output is wrong. Unfortunately we screwed up the way we store virtualization information when we added systems and missed a great opportunity to properly nest data under the virtualization mash. This data would be really great if we could store it somewhere like this.

  • Virtualization:
    • kvm
      • function: host
    • libvirt
      • function: host
      • version
      • guests
        • guest 1
        • guest 2

@lamont-granquist
Copy link
Contributor

👍

1 similar comment
@smurawski
Copy link
Contributor

👍

tas50 added a commit that referenced this pull request Mar 9, 2016
Remove XML output in VirtualizationInfo and need for hpricot gem
@tas50 tas50 merged commit 7fa49d9 into chef:master Mar 9, 2016
@thommay thommay added Type: Bug Does not work as expected. and removed Bug labels Jan 24, 2017
@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Bug Does not work as expected.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants