Commit Graph

18 Commits

Author SHA1 Message Date
Ken Moore
6924dad755 When making changes to the update manager repo/url - clear out the last check for updates so the next ping will re-check using the new settings.
Also remove some old comments from the service manager.
2016-09-19 09:50:43 -04:00
Ken Moore
0408f61f4c API CHANGE
Add the "is_running" output field to the sysadm/services "list_services" output.
This also cleans up the is_enabled detection routine so it should be more reliable.
2016-08-30 13:32:53 -04:00
Ken Moore
200a7de9e0 API CHANGE
Add a new output field to the sysadm/updates "check for updates".

args:{
  "details":"<details about updates>"
}
2016-08-30 10:04:30 -04:00
Ken Moore
ee1627b505 Fix up the fast/full update check backend. It looks like the QDateTime.addSecs() function is not working properly on Qt 5.5.1 - switch to the .secsTo() function instead when looking for the amount of time between the file modification and current time. 2016-08-10 12:48:43 -04:00
Ken Moore
12ba560fd6 API CHANGE
Add a new field in the output args for the sysadm/updates check for updates:
"last_check":"<ISO date/time stamp>"

This returns the timestamp the last time a "full" check was performed (since some checks are flagged as quick/automatic and just re-use the previous check unless a significant amount of time has passed first - 12 hours is what it is set to right now).
2016-08-10 11:45:52 -04:00
Ken Moore
a2bba87315 API CHANGE
Add a new API call to the sysadm/update class:
"action":"changesettings"
This allows for changing the various updatemanager settings (maxbe, package_set, package_url, auto_update)

REST Request (example):
-------------------------------
PUT /sysadm/update
{
   "action" : "changesettings",
   "maxbe" : "6"
}

WebSocket Request:
-------------------------------
{
   "id" : "fooid",
   "name" : "update",
   "namespace" : "sysadm",
   "args" : {
      "maxbe" : "6",
      "action" : "changesettings"
   }
}

Response:
-------------------------------
{
  "args": {
    "changesettings": {
      "result": "success"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-08-09 13:22:46 -04:00
Ken Moore
4457397733 API CHANGE
Add a new API call to the sysadm/update class for reading all the current settings.

REST Request (example):
-------------------------------
PUT /sysadm/update
{
   "action" : "listsettings"
}

WebSocket Request:
-------------------------------
{
   "args" : {
      "action" : "listsettings"
   },
   "id" : "fooid",
   "namespace" : "sysadm",
   "name" : "update"
}

Response:
-------------------------------
{
  "args": {
    "listsettings": {
      "maxbe": " 5",
      "package_set": " EDGE"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-08-09 12:45:27 -04:00
Ken Moore
06c71afa4a API CHANGE: Add a new "stopupdate" action for the sysadm/update class. (no additional inputs required).
This will look for any currently-running pc-updatemanager processes and kill/stop them as needed.

Example:
{
 "id":"dummy",
 "namespace":"sysadm",
 "name":"update",
 "args": {
    "action":"stopupdate"
 }
}

Output arguments:
"args":{
  "stopupdate":{
    "result":"success" or "error:<error text>"
  }
}
2016-08-09 11:27:08 -04:00
Ken Moore
d430de0fce API CHANGE:
Remove the "fbsdupdate" and "fbsdupdatepkgs" options within the sysadm-update API call for starting an update. These options are no longer available with base pkgs (everything is run through the "pkgupdate" option instead).
2016-08-09 10:51:14 -04:00
Ken Moore
b7273f7e19 Make sure that when starting updates via sysadm - it will remove the temporary/last update log file so the next check is forced to re-run. 2016-04-05 10:22:37 -04:00
Ken Moore
36b30e6c9c Finish cleaning up the new "pending" state for dispatcher processes. 2016-04-05 10:19:05 -04:00
Ken Moore
7566f1396e Add a new "fast" mode to the sysadm-update check for updates (re-use previous update info), and setup the regular health check to report update information using this fast mode. 2016-03-24 08:58:29 -04:00
Ken Moore
0bf67bbe06 Fix the update process detection command - needs a return code of 0 to tell if there is a process running. 2016-03-23 14:34:21 -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
62465ad03e Add the 'startupdate' API call which allows you to queue a
system update

Valid args:

target : "chbranch/pkgupdate/fbsdupdate/fbsdupdatepkgs/standalone"
branch: "newbranch" - (Only used with chbranch target)
tag: "pkgng-1.6.9" - (Only used with standalone target)

REST Request:
-------------------------------
PUT /sysadm/update
{
   "action" : "startupdate",
   "target" : "pkgupdate"
}

REST Response:
-------------------------------
{
    "args": {
      "startupdate": {
        "queueid": "611c89ae-c43c-11e5-9602-54ee75595566",
        "command": "pc-updatemanager pkgupdate",
        "comment": "Task Queued"
        }
    }
}

WebSocket Request:
-------------------------------
{
   "args" : {
      "action" : "startupdate",
      "target" : "pkgupdate"
   },
   "name" : "update",
   "id" : "fooid",
   "namespace" : "sysadm"
}

WebSocket Response:
-------------------------------
{
  "args": {
    "startupdate": {
      "queueid": "611c89ae-c43c-11e5-9602-54ee75595566",
      "command": "pc-updatemanager pkgupdate",
      "comment": "Task Queued"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-02-01 13:21:17 -05:00
Ken Moore
1146b14917 Cleanup the library/server interactions for sysadm: Now the "library" directory is just an internal collection of classes/files, rather than an actual library of system calls. This allows for in-server globals usage (such as the dispatcher/events systems) within the library files as needed. 2016-02-01 12:29:25 -05:00