Commit Graph

472 Commits

Author SHA1 Message Date
Ken Moore
3acadf13d0 Minor update to the .gitignore file - make sure *all* compiled (.o, moc_*) files are ignored. 2016-03-22 11:51:17 -04:00
Ken Moore
427eb7ec25 Turn off some minor debugging, and ensure that the system health check gets saved into temporary storage for later use as needed. 2016-03-22 10:21:46 -04:00
Ken Moore
a64fd734c9 Merge branch 'master' of github.com:pcbsd/sysadm 2016-03-22 10:04:07 -04:00
Ken Moore
7edfaa2321 Oops - fix a typo in the new zfs list_pools output to preserve the "%" symbols in the outputs. That symbol only needs to get trimmed out during the system health checks - not globally. 2016-03-22 10:02:35 -04:00
Ken Moore
9934a17450 Update zfs.rst
This accounts for the change to the JSON output of a sysadm/zfs "list_pools" action.
2016-03-22 09:47:28 -04:00
Ken Moore
b074a611ee Move the "zpool list" parsing function over to a new library class (sysadm::ZFS). This adjusts the sysadm/zfs "list_pools" action return message a bit - it just moves the list of pools one level down - within a "list_pools" object. 2016-03-22 09:39:39 -04:00
Ken Moore
055f6e3be8 Fix another bug in the system health checker - ensure that multiple pools are all listed and not overwriting one another. 2016-03-21 15:47:51 -04:00
Ken Moore
992bdd1f2e Fix the parsing of zpool list used for the health check. 2016-03-21 15:36:39 -04:00
Ken Moore
3060c9906d Finish fixing up the sysadm/update server backend. Now updates can properly be started and the other update flags are detected/used as needed. 2016-03-21 14:14:51 -04:00
Ken Moore
cf8cf0d429 Add a "updaterunning" status to the sysadm/update check for updates, and also setup sysadm/update to emit dispatcher events about the update process. 2016-03-21 13:08:13 -04:00
Ken Moore
638f0eb390 Fix a couple bugs in the sysadm/update check routine. Now it will report "rebootneeded" when the system is waiting to reboot to apply updates, and it allows for multiple "patch" entries now. 2016-03-18 15:16:02 -04:00
Kris Moore
4b160e2982 Cleanup pid files 2016-03-18 09:39:59 -04:00
Kris Moore
7fe1412b4e Use -f to remove iohyve disks / vms 2016-03-16 19:17:11 -04:00
Kris Moore
64366f535c Cleanup usage of RunCommand for iohyve API class 2016-03-12 06:06:21 -05:00
Kris Moore
7ca64172ab Add link to Qt doc 2016-03-12 05:27:55 -05:00
Ken Moore
29a51bf61e Switch the WebSocket message send mechanism over to a signal/slot combination so that we don't get threads trampling each other on high-latency connections. 2016-03-11 18:55:27 -05:00
Kris Moore
1878d25d46 Merge branch 'master' of https://github.com/pcbsd/sysadm 2016-03-11 08:10:07 -05:00
Kris Moore
cb4c4eb544 Change how we parse incoming WebSocket TCP/SSL data. Its possible
that data coming in will be mixed with several messages at once,
lets parse those properly, and also implement some sanity checking
to make sure we aren't being flooded with a potential buffer overflow
2016-03-11 08:08:51 -05:00
Kris Moore
9a8d509798 Fix seg fault getting ipv6 addr 2016-03-10 23:44:44 -05:00
Ken Moore
9f99d4c5a7 Clean up the iohyve fetch parsing a bit more, and turn off some of the debugging (leave the iohyve fetch-specific debugs on though). 2016-03-04 13:16:12 -05:00
Ken Moore
4ba9edabbe Oops - forgot to include this last change to the parsing routine to the iohyve fetch parsing. 2016-03-04 11:11:28 -05:00
Ken Moore
857919958a Update the iohyve fetch event structure, and make the whole process log structure available under the "process_details" variable in the event. 2016-03-04 11:05:39 -05:00
Kris Moore
b761863341 Merge branch 'master' of https://github.com/pcbsd/sysadm 2016-03-03 16:05:52 -05:00
Kris Moore
87e40a8467 Rename DispatcherParsing.h -> DispatcherParsing.cpp
Add first parsing function for iohyve fetch, will continue
with it tomorrow
2016-03-03 16:05:18 -05:00
dlavigne
9ae2bac697 Clarify resize limitation. 2016-03-03 15:32:53 -05:00
dlavigne
32a662c47d Doc version command. 2016-03-03 15:23:00 -05:00
Ken Moore
1b1ee8bb22 Merge branch 'master' of github.com:pcbsd/sysadm 2016-03-03 15:19:54 -05:00
Ken Moore
9396d7ae1a Merge branch 'master' of github.com:pcbsd/sysadm 2016-03-03 15:19:47 -05:00
dlavigne
31a4424b26 Doc resizedisk action. 2016-03-03 15:17:28 -05:00
Ken Moore
d2ef14a0d1 Large update to the dispatcher/events systems. Now there is a new DispatcherParsing.h file where any subsystem-specific dispatcher calls may be detected/parsed/handled as needed, and the iohyve fetch routine was updated to use this routine (for a proof of concept - could probably still use a bit more log output). 2016-03-03 15:16:55 -05:00
Kris Moore
91a2c700cb Add API call to show iohyve version
REST Request:
-------------------------------
PUT /sysadm/iohyve
{
   "action" : "version"
}

WebSocket Request:
-------------------------------
{
   "namespace" : "sysadm",
   "args" : {
      "action" : "version"
   },
   "id" : "fooid",
   "name" : "iohyve"
}

Response:
-------------------------------
{
  "args": {
    "version": {
      "version": "iohyve v0.7.3 2016/01/08 Bear in a Datacenter Edition"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-03-03 14:22:53 -05:00
Kris Moore
213e8191c9 Merge branch 'master' of https://github.com/pcbsd/sysadm 2016-03-03 13:57:35 -05:00
Kris Moore
9b03d42d87 Add API call to resize a VM disk
REST Request:
-------------------------------
PUT /sysadm/iohyve
{
   "disk" : "disk0",
   "name" : "bsdguest",
   "action" : "resizedisk",
   "size" : "20G"
}

WebSocket Request:
-------------------------------
{
   "name" : "iohyve",
   "id" : "fooid",
   "args" : {
      "size" : "20G",
      "action" : "resizedisk",
      "disk" : "disk0",
      "name" : "bsdguest"
   },
   "namespace" : "sysadm"
}

Response:
-------------------------------
{
  "args": {
    "resizedisk": {
      "disk": "disk0",
      "name": "bsdguest",
      "size": "20G"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-03-03 13:57:16 -05:00
dlavigne
1edaf3ff6e Doc deletedisk action. 2016-03-03 13:49:57 -05:00
Kris Moore
1b46761032 Merge branch 'master' of https://github.com/pcbsd/sysadm 2016-03-03 13:38:12 -05:00
Kris Moore
f91651d342 Add API call to remove a disk from a VM
REST Request:
-------------------------------
PUT /sysadm/iohyve
{
   "disk" : "disk1",
   "name" : "bsdguest",
   "action" : "deletedisk"
}

WebSocket Request:
-------------------------------
{
   "namespace" : "sysadm",
   "id" : "fooid",
   "name" : "iohyve",
   "args" : {
      "name" : "bsdguest",
      "action" : "deletedisk",
      "disk" : "disk1"
   }
}

Response:
-------------------------------
{
  "args": {
    "deletedisk": {
      "disk": "disk1",
      "name": "bsdguest"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-03-03 13:37:57 -05:00
dlavigne
31dce38318 Doc listdisks action. 2016-03-03 13:33:23 -05:00
dlavigne
f180b2ee05 Doc adddisk action. 2016-03-03 13:28:11 -05:00
Kris Moore
04ee45494f Add new API call to add/create a disk for a VM
REST Request:
-------------------------------
PUT /sysadm/iohyve
{
   "name" : "bsdguest",
   "action" : "adddisk",
   "size" : "10G"
}

WebSocket Request:
-------------------------------
{
   "args" : {
      "size" : "10G",
      "name" : "bsdguest",
      "action" : "adddisk"
   },
   "id" : "fooid",
   "namespace" : "sysadm",
   "name" : "iohyve"
}

Response:
-------------------------------
{
  "args": {
    "adddisk": {
      "bsdguest": {
        "size": "10G"
      }
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-03-03 13:24:02 -05:00
Kris Moore
f5fbb30ebb Merge branch 'master' of https://github.com/pcbsd/sysadm 2016-03-03 13:11:48 -05:00
Kris Moore
30cb48e926 Add API call to list disks connected to a VM
REST Request:
-------------------------------
PUT /sysadm/iohyve
{
   "name" : "bsdguest",
   "action" : "listdisks"
}

WebSocket Request:
-------------------------------
{
   "args" : {
      "action" : "listdisks",
      "name" : "bsdguest"
   },
   "id" : "fooid",
   "namespace" : "sysadm",
   "name" : "iohyve"
}

Response:
-------------------------------
{
  "args": {
    "listdisks": {
      "disk0": "10G"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-03-03 13:11:13 -05:00
dlavigne
124172ed8a Doc delete action. 2016-03-03 12:59:54 -05:00
Kris Moore
caf6bd1e06 Add new API call to delete an iohyve guest
REST Request:
-------------------------------
PUT /sysadm/iohyve
{
   "action" : "delete",
   "name" : "bsdguest"
}

WebSocket Request:
-------------------------------
{
   "namespace" : "sysadm",
   "id" : "fooid",
   "args" : {
      "action" : "delete",
      "name" : "bsdguest"
   },
   "name" : "iohyve"
}

Response:
-------------------------------
{
  "args": {
    "delete": {
      "name": "bsdguest"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-03-03 12:46:03 -05:00
Ken Moore
2312271340 Merge branch 'master' of github.com:pcbsd/sysadm 2016-03-03 11:59:22 -05:00
Ken Moore
1fc3b3fbb4 Couple changes:
1) Fix the event registration detection (string/array for args, not object/array)
2) Add a 30 second connection timeout for the client to successfully authorize before the server will close the connection.
2016-03-03 11:57:45 -05:00
dlavigne
a83bae9f6c Start docs for dispatcher subsystem. 2016-03-03 11:19:32 -05:00
Ken Moore
4fa264ea4f Merge branch 'master' of github.com:pcbsd/sysadm 2016-03-03 10:53:58 -05:00
Ken Moore
21fbf8643a A couple fixes to try and track down a seg fault when a distpatch finishes. 2016-03-03 10:53:27 -05:00
Kris Moore
cf5390676e Merge branch 'master' of https://github.com/pcbsd/sysadm 2016-03-03 10:46:41 -05:00
Kris Moore
b886a597f9 Remove >/dev/nulls 2016-03-03 10:46:24 -05:00