| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Enable TCP keepalive to detect if the ogServer is gone (hard reset). If no reply
after 120 seconds, then release the connection to the server.
|
|
|
|
|
|
|
|
|
| |
When running image_create operation an underlying script "imageCreate"
is called using the subprocess python module. This script may fail, for
example if the repository in which the image is to be stored has no
sufficent capacity.
Check for non-zero when the imageCreate process has finished.
|
|
|
|
|
|
|
|
|
|
|
| |
ogLive related operations are named inside a 'Linux' folder, also its
python class is named OgLinuxOperations. Rename every 'linux' occurrence
with live to further clarify this folder and operations.
- OgLinuxOperations -> OgLiveOperations
- src/linux/ -> src/live/
Fixes: 1377acee ('Rename 'linux' mode to 'live' mode')
|
|
|
|
|
|
|
| |
ogClient /software gets a representation of the target resource’s state.
GET method is more appropriate than POST.
Change /software method from POST to GET.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this patch the ogRest would hang indifinitely in a BUSY state
when a bad request was received. Fix this by returning ogRest state to
IDLE once the corresponding bad request response has been sent.
This accounts for the following cases:
- Unknown GET action
- Unknown POST action
- Unknown HTTP verb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ogClient /setup in linux mode do not support to indicate which table
type the user want to use. It always supposes that the partition table
is MBR/MSDOS.
Add ogClient support to work with GPT tables. Add new field table type
to /setup linux mode that expects a string with "MSDOS" or "GPT".
Example old JSON:
{
"disk": "1",
"cache": "0",
"cache_size": "0",
"partition_setup": [...]
}
Example new JSON:
{
"type": "GPT",
"disk": "1",
"cache": "0",
"cache_size": "0",
"partition_setup": [...]
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
}
],
|
|
|
|
|
|
|
|
| |
ogClient expect to receive information of 1 disk from the Cloning
Engine's script "getConfiguration". ogAdmClient, the deprecated ogLive
client daemon, supported for several disk.
Add ogClient support for several disk.
|
|
|
|
|
|
|
| |
The file containing the license was being referred as LICENSE when it
was renamed to COPYING.
Fixes: 173fabb ("Rename LICENSE to COPYING")
|
|
|
|
|
|
|
| |
Image datasize is expressed in kibibytes but the existing REST API field
represent data in bytes.
This commit changes ogClient to send datasize in bytes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extend ogClient to include more information about the image that has been
created. This patch modifies ogClient to read an info file created by image
creation script, add this info to the JSON response and then remove the file.
Example of new /image/create response:
{
"disk": "1",
"partition": "1",
"code": "131",
"id": "1",
"name": "ubuntu",
"repository": "192.168.56.10",
"software": "Ubuntu 18.04.5 LTS \naccountsservice 0.6.45\n...",
"clonator": "PARTCLONE",
"compressor": "LZOP",
"filesystem": "EXTFS",
"datasize": 2100000
}
New fields are "clonator", "compressor", "filesystem" and "datasize".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Irina reports that "Partition assistant"/"Asistente de particionado" is
not working. This is happening because ogClient is not reading the full
data ogServer sends when the entire HTTP PDU is larger than 1024.
However, ogClient should read the whole message, reading until read data
length is greater or equal to "Content-Length" header value.
ogClient fails to obtain "Content-Length" value because is looking for
"content-length", be aware of the case sensitivity. It also needs to
take into account the header length because read data length also
includes headers.
This patch updates ogClient to:
1) look for "Content-Length instead of "content-length".
2) compare read date length with content length plus headers
length.
|
|
|
|
|
|
|
|
|
| |
Disconnect gracefully from ogServer after booting OS, the script to start the
OS calls kexec, so everything is gone after it. For Windows, this results in a
reboot.
This commit also improves the disconnect function to make sure the
disconnection is synchronous.
|
|
|
|
|
| |
Since version 1.2.0, OpenGnsys supports ogVDI hypervisor OS. This commit
a new status which indicates that clients are running ogVDI
|
|
|
|
|
|
|
|
|
|
| |
This is useful for debuging and getting information on the processes that are
being executed in ogclient.
syslog outputs are something similar to:
Jun 26 10:36:40 ogAdministrator /ogclient: GET refresh HTTP/1.1
Jun 26 10:36:40 ogAdministrator /ogclient: HTTP/1.0 500 Internal Server Err
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
When restore image command was sent and the restoration failed, you
could see in WebConsole the image as restored and the command completed,
as it if had not failed. This happened because ogClient did not check
the return code of restoration script.
This commit adds return code check on restore image. So, when return
code is a non-zero value ogClient responses with an error 500. When
ogServer receives this error response, it did not set in the database
the image as restored and command as completed without errors.
|
|
|
|
|
|
|
|
|
| |
From https://www.gnu.org/licenses/gpl-howto.en.html:
"You should also include a copy of the license itself somewhere in the
distribution of your program. All programs, whether they are released under the
GPL or LGPL, should include the text version of the GPL. In GNU programs we
conventionally put the license in a file called COPYING."
|
|
|
|
|
|
|
|
|
|
|
| |
This script can be useful to install ogclient on distributions that do not have
an already built ogclient package.
It is necessary to install ogclient in the right path, so the command you have
to use looks similar to:
python3 setup.py install --prefix=/opt/opengnsys/ogclient
--install-lib=/opt/opengnsys/ogclient
--install-script=/opt/opengnsys/ogclient
|
|
|
|
|
| |
This fixes a circular import error produced by the import of ogClient inside of
OgLinuxOperations.
|
|
|
|
| |
'linux' represents ogLive mode that is the reason for the rename.
|
|
|
|
|
| |
This file is only used for its OG_PATH variable, this variable is now in
ogClient.
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This file is an example of the configuration for an ogclient running in virtual
mode.
|
|
|
|
|
|
|
|
|
| |
Commit 621fb7a7 added class initialization with two parameters. These
two parameters were wrongly initialized, "self." was missing. The call
of these params in other functions of the class was also wrong.
This commit fix the initialization of the parameters of
OgLinuxOperations and fix the calls to these params.
|
|
|
|
|
|
|
|
|
| |
ogClient may runs on an OS that do not have all the dependencies needed
to use virtual functions.
This commit change the behaviour to only import virtual functions when
the ogClient has to work with Virtual Machines. This way ogClient works
on environments which do not need virtual functions.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
ogClient changed its config file format to json. This patch adapts
ogLinuxOperation to use new config file.
Co-authored-by: Roberto Hueso <rhueso@soleta.eu>
|
| |
|
|
|
|
|
| |
This patch waits before polling qemu with QMP so that it has time to be ready
for requests. It also increases wait time in case the host machine is slow.
|
| |
|
|
|
|
| |
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 patch makes configuration parsing easier as well as making the full
configuration available in many subclasses.
|
|
|
|
|
| |
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.
|