| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Detect user login and logout for Linux and Windows.
Report an active interactive session through the /refresh response
so a new ogserver instance can update the session status.
Poll the session change in 5 second intervals in a thread. Use the
same event socket previously used by the old session detection
mechanism to notify a session change.
Use the method check_interactive_session_change in each
ogOperations.py to report the session status.
Return values:
None: no session changes are found
True: login
False: logout
Windows
check_interactive_session_change uses the WMI API to obtain session
information. Obtain the list of sessions associated to interactive
sessions and then filter the sessions with a valid user.
Linux
Check if any user has the DISPLAY or WAYLAND_DISPLAY environment
variable defined as that means there is an interactive session
in execution.
|
|
|
|
|
| |
Add missing ogClient mode functions and show an error in every
unimplemented function.
|
|
|
|
| |
unused since ogserver's commit 87be2ce08 #980 Change initial probe to refresh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add "used_size" and "free_size" to the partition data and the
cache data.
Old response from ogClient for /cache/delete, /cache/fetch
and /image/restore:
{
'cache': [
{'name': 'windows.img', 'size': 2432370213, checksum: '5d4dcc677bc19f40a647d0002f4ade90'},
{'name': 'linux.img', 'size': 243234534213, checksum: '3eb22f888f88a55ad954f55644e1192e'}
]
}
New response:
{
'cache': {
'used_size': 4520232322423,
'free_size': 48273465287452945,
'images': [
{'name': 'windows.img', 'size': 2432370213, checksum: '5d4dcc677bc19f40a647d0002f4ade90'},
{'name': 'linux.img', 'size': 243234534213, checksum: '3eb22f888f88a55ad954f55644e1192e'}
]
}
}
|
|
|
|
|
|
| |
Don't log a backtrace when a not implemented function is called
in ogClient.
Log a "Function not implemented" message.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add API REST method to fetch an image.
Consolidate image fetch loging for cache/fetch and image/restore.
Resquest payload structure:
{
'image': 'linux.img'
'type': 'TIPTORRENT'
'repository': '12.141.10.2'
}
The client will try to fetch'image' from 'repository' into cache.
Resquest response structure:
{
'cache': [
{'name': 'windows.img', 'size': 2432370213, checksum: '5d4dcc677bc19f40a647d0002f4ade90'},
{'name': 'linux.img', 'size': 243234534213, checksum: '3eb22f888f88a55ad954f55644e1192e'}
]
}
|
|
|
|
|
| |
echo command that has been run for storage in ogserver, until GET /shell/output
is invoked.
|
|
|
|
|
|
|
|
| |
provide return code as result to ogserver.
Update virtual mode driver to return dummy value, although this command
is unimplemented, this seems to be broken due to possible TypeError when
accessing result from caller.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a 'cache' field into the json payload the client sends to
the server after a restore operation so the server can update
the new cache contents.
Resquest response structure:
{
...
'cache': [
{'name': 'windows.img', 'size': 2432370213, checksum: '5d4dcc677bc19f40a647d0002f4ade90'},
{'name': 'linux.img', 'size': 243234534213, checksum: '3eb22f888f88a55ad954f55644e1192e'}
]
...
}
|
|
|
|
|
| |
Add a proper error report for the shutil.copy operation in
image_restore() instead of silently returning.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add API REST method to delete cache contents.
Resquest payload structure:
{
'images': ['windows.img', 'linux.img']
}
The client will try to delete as many images in cache as available
with names matching the list of filenames in the 'images' field.
Resquest response structure:
{
'cache': [
{'name': 'windows.img', 'size': 2432370213, checksum: '5d4dcc677bc19f40a647d0002f4ade90'},
{'name': 'linux.img', 'size': 243234534213, checksum: '3eb22f888f88a55ad954f55644e1192e'}
]
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Log an error message in known error cases and log a backtrace
otherwise.
Define a new error type OgError to be used in all the 'raise'
blocks to define the error message to log. The exception
propagates until it reaches send_internal_server_error() where
the exception type is checked. If the type is OgError we log
the exception message. Logs the backtrace for other types.
The initial error implementation printed a backtrace everytime
an error ocurred. The next iteration changed it to only print
a backtrace in a very particular case but ended up omiting too
much information such as syntax errors or unknown error context.
The actual implementation only logs the cases we already cover in
the codebase and logs a bracktrace in the others, enabling a
better debugging experience.
|
|
|
|
| |
Replace incorrect copyright header in qmp.py file.
|
|
|
|
|
|
|
|
| |
Replace exception types to be more explicit about the nature of
the error.
Improve the exception raising semantics by using the 'from' keyword,
this wraps an older exception into a new one so it is still considered
the same object.
|
|
|
|
|
| |
Raise exception from subprocess.run() calls as previous code is
trying to capture these exceptions to handle de errors.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds new logging handler redirecting messages to the log file
located in the Samba shared directory (applies to live mode
clients, i.e: ogLive)
Parses log level configuration from ogclient.json. See:
{
"opengnsys": {
...
"log": "INFO",
...
}
...
}
Adds --debug option to set root logger level to DEBUG when starting
ogClient. Overrides log level from config file.
In addition:
- Replaces any occurence of print with a corresponding logging function.
- Unsets log level for handlers, use root logger level instead.
- Default level for root logger is INFO.
- Replaces level from response log messages to debug (ogRest)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Polling for a qmp port availability is undesirable, as QEMU only handles
one connection to the qmp port at a time, ogClient may interfere with
cloneer-manager.
Check vm thread now connects to a separate qmp tcp socket, listening for
a shutdown guest event.
When ogClient is run just after ogVDI installation (before guest
installation) it will try to connect until it's possible, ie: after an
iso is specified and a qemu vm is started that exposes the appropiate
qmp tcp port.
|
|
|
|
| |
Update license header in files.
|
|
|
|
|
|
|
|
| |
Separates probe method into separate ogclient modes (virtual, vdi) so
future supported OS can easily have a tailored probe responses.
Link speed is retrieved using a minimal ethtool command sent using fcntl
module from python.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previous commits updates ogClient and ogServer to support several disks
in Linux (ogLive) mode. This changes disk setup JSON format from an
object to an array. ogClient in virtual mode also need to satisfy this
new format, although it not support several disks.
Adapt ogClient virtual mode to satisfy new disk setup JSON format.
Old format:
"disk_setup": {
"disk": 1,
"partition": 0,
"code": "0",
"filesystem": "",
"os": "",
"size": 32685957,
"used_size": 6
},
New format:
"disk_setup": [
{
"disk": 1,
"partition": 0,
"code": "0",
"filesystem": "",
"os": "",
"size": 32685957,
"used_size": 6
}
],
|
|
|
|
|
| |
This is necessary for cloneer-manager to start the guest OS after the next
reboot.
|
|
|
|
|
|
| |
Improves code encapsulation by moving check_vm_state_loop method into
OgVirtualOperations class. This also fixes import error when running ogclient in
'linux' mode.
|
|
|
|
|
|
|
| |
Ths patch handles different cases when a /refresh request can be made. More
specifically this handles the situation in which the VM is stopped when /refresh
is called but it starts during the processing of /refresh, in this case we just
send the last recorded setup.
|
|
|
|
|
|
|
|
|
|
|
| |
This patch:
- Fixes logic errors in the communication with QMP (the order of handshake
messages was not right).
- Rewrite parts of OgQMP class.
- Enforces better coding practices by using Python's "context managers" to avoid
forgeting an open socket in case exceptions occur.
- Adapt virtual operations to the use of "context managers" using the "with"
statement.
|
|
|
|
| |
This updates partitions.json filesystems.
|
|
|
|
|
|
| |
This is the device that has the best empirical performance right now and it
seems like it is where most of the qemu development is directed towards for the
future.
|
|
|
|
| |
This patch also ignores calls to shellrun when virtual mode is activated.
|
|
|
|
|
| |
Write permission is not needed to get information about each virtual drive so
this patch changes permissions to 'only read'. This can prevent race conditions.
|
|
|
|
|
| |
This patch makes possible to interact with guest OS from a remote machine using
VNC.
|
|
|
|
|
| |
This is a refactor to consolidate the use of this single variable across all
virtual operations.
|
|
|
|
|
|
| |
This patch calls poweroff in virtual mode when no VM is running and no jobs are
being executed. This is useful when the guest OS shutdowns so that the host OS
does not continue to run.
|
|
|
|
|
| |
This patch implements OgVM class. OgVM abstracts VM emulator from its
operations.
|
|
|
|
|
|
| |
This patch includes changes to:
- Poweroff VM before running operations that require access to virtual disks.
- Poweroff VM before host system poweroff.
|
|
|
|
|
| |
When virtual mode is activated, send the last stored partitions setup because
it is not possible to access a running virtual drive to get its information.
|
|
|
|
|
|
| |
recv method is useful for receiving information that was not previously
requested (such as "events"). This patch also implements automatic handshake
on OgQMP by sending an "qmp_capabilities" request.
|
|
|
|
|
| |
This patch calculates correctly the percentage of disk used. This could cause
an overflow on the ogAdmSever DB.
|
|
|
|
|
| |
This patch handles possible communication errors between ogclient and Qemu when
making QMP requests.
|
| |
|
|
|
|
| |
This requires to configure user and password for samba repositories.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|