summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* #980 do not report busy client if probing is pendingOpenGnSys Support Team2020-08-211-1/+6
| | | | og_client_status() should not report busy when probing is going on.
* #980 Add 'ip' field in GET /scopes requestRoberto Hueso Gómez2020-08-141-4/+4
| | | | | The 'ip' field is added to the json for scopes that have an IP (i.e. computers).
* #980 Select POST /mode clients by ip instead of scope nameRoberto Hueso Gómez2020-08-141-14/+18
| | | | | | This patch selects clients whose modes need to be changed in the current request. This patch makes POST /mode consistent with the rest of the REST API where clients are selected and filtered by ip.
* #998 disable incremental image APIOpenGnSys Support Team2020-08-146-566/+0
| | | | This API is not supported by ogClient yet and it uses the obsolete socket hydra API.
* #990 add wol_socket_open()OpenGnSys Support Team2020-08-063-20/+25
| | | | Add wol_socket_open() to initialize the WoL socket
* #980 fix compile warning in og_set_client_modeOpenGnSys Support Team2020-08-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | CC src/rest.o src/rest.c: In function ‘og_cmd_post_modes.isra.27’: src/rest.c:966:4: warning: ‘%s’ directive output may be truncated writing up to 4096 bytes into a region of size between 3018 and 4041 -Wformat-truncation=] "MODE_FILE='%s'\nMAC='%s'\nDATA='%s'\n" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/rest.c:1085:7: template_name, scope_name); ~~~~~~~~~~~~~ src/rest.c:967:33: note: format string is defined here "MODE='PERM'\nTEMPLATE_NAME='%s'", ^~ src/rest.c:965:2: note: ‘snprintf’ output 57 or more bytes (assuming 5176) into a destination of size 4096 snprintf(cmd_params, sizeof(cmd_params), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "MODE_FILE='%s'\nMAC='%s'\nDATA='%s'\n" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "MODE='PERM'\nTEMPLATE_NAME='%s'", ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mode, mac, params, template_name); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* #980 error reporting in setclientmodeOpenGnSys Support Team2020-08-061-1/+3
| | | | Add syslog and use exit()
* #986 Fixs error in 'Advanced Netboot' caused by loss information from ↵Irina Gómez2020-08-051-7/+12
| | | | ogserver process owner (author Roberto Hueso Gómez).
* #980 Change GET and POST /modes URI to /modeRoberto Hueso Gómez2020-08-031-2/+2
| | | | | This patch changes the URI since it is semantically more correct to use the singular.
* #980 Fix POST /modes to use 'setclientmode' scriptRoberto Hueso Gómez2020-07-291-35/+140
| | | | | | | | | | | Now POST /modes does not only write to the database, it also uses the external bash script 'setclientmode' to generate configured PXE templates for each machine. NOTE: This fix requires that room and computer names are unique in the OpenGnsys DB. This behaviour is inherited from the previous 'setclientmode' script but, eventually, it should be replaced for an actual scope selector.
* #988 Check DB port size is in [0, UINT16_MAX]Roberto Hueso Gómez2020-07-151-1/+2
| | | | | Max port number is UINT16_MAX, so this checks whether this config parameter is in the correct range.
* #988 Add DB port option to ogserver.json config fileRoberto Hueso Gómez2020-07-106-0/+13
| | | | | This patch provides functionality to select a database port. It also adds a default IP for the database.
* Add GET /hardware REST requestRoberto Hueso Gómez2020-07-081-2/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements HTTP GET /hardware request which returns a list of the hardware associated with a particular computer. Request: GET /hardware { "scope": { "id": 6, "type": "computer" } } Response: 200 OK { "hardware": [ { "type": "Microprocesadores", "description": "CPU arch:x86 target:x86_64 cores:4" }, { "type": "Memorias", "description": "QEMU 4096MiB" }, { "type": "Tarjetas gráficas", "description": "Red Hat, Inc Virtio GPU" }, { "type": "Tarjetas de Red", "description": "Intel Corporation 82540EM Gigabit Ethernet Controller QEMU Virtual Machine" }, { "type": "Controladores IDE", "description": "Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II] Qemu virtual machine" } ] }
* Add POST /modes REST requestRoberto Hueso Gómez2020-07-063-2/+136
| | | | | | | | | | | | | This patch implements HTTP POST /modes request which can change the mode of any particular scope. Request: POST /modes { "scope": {"id": 1, "type": "computer"}, "mode": "pxe" } Response: 200 OK
* #971 split wake on lan codeOpenGnSys Support Team2020-07-063-68/+91
| | | | Add wol.c and wol.h that implements WakeOnLan.
* #990 Use client broadcast address on WoLJavier Sánchez Parra2020-07-034-12/+35
| | | | | | | | | | | | | | | | Some universities have computers in a different subnet where the ogServer is, but ogServer WoL functionality only supported to send packet to its own subnets. This commit solves this. Now ogServer sends two WoL packets per client, one with the broadcast address of the interface indicated in the config file, the other with the broadcast address calculated with the address and netmask of the client. To ensure that the second WoL works correctly you must configure correctly the IP and netmask of the clients. Also, you have to configure the network of your organization to route WoL packet to the correct subnet.
* #971 linkage error after splitOpenGnSys Support Team2020-07-025-26/+27
| | | | | | | | | /usr/bin/ld: src/cfg.o:/home/opengnsys/ogServer/src/ogAdmServer.h:25: multiple definition of `servidoradm'; src/ogAdmServer.o:/home/javi/trabajo/soleta/opengnsys/ogServer/src/ogAdmServer.h:25: first defined here /usr/bin/ld: src/cfg.o:/home/opengnsys/ogServer/src/ogAdmServer.h:26: multiple definition of `puerto'; src/ogAdmServer.o:/home/javi/trabajo/soleta/opengnsys/ogServer/src/ogAdmServer.h:26: first defined here /usr/bin/ld: src/cfg.o:/home/opengnsys/ogServer/src/ogAdmServer.h:35: multiple definition of `tbsockets'; src/ogAdmServer.o:/home/javi/trabajo/soleta/opengnsys/ogServer/src/ogAdmServer.h:35: first defined here /usr/bin/ld: src/cfg.o:/home/opengnsys/ogServer/src/ogAdmLib.h:81: multiple definition of `ndebug'; src/ogAdmServer.o:/home/javi/trabajo/soleta/opengnsys/ogServer/src/ogAdmLib.h:81: first defined here /usr/bin/ld: src/cfg.o:/home/opengnsys/ogServer/src/ogAdmLib.h:80: multiple definition of `szPathFileLog'; src/ogAdmServer.o:/home/javi/trabajo/soleta/opengnsys/ogServer/src/ogAdmLib.h:80: first defined here /usr/bin/ld: src/cfg.o:/home/opengnsys/ogServer/src/ogAdmLib.h:80: multiple definition of `szPathFileCfg'; src/ogAdmServer.o:/home/javi/trabajo/soleta/opengnsys/ogServer/src/ogAdmLib.h:80: first defined here
* #980 Refactor GET /scopes backendRoberto Hueso Gómez2020-07-021-64/+68
| | | | | | This improves style and fixes some memleaks. Co-authored-by: OpenGnSys Support Team <soporte-og@soleta.eu>
* #980 Fix memleak in og_cmd_get_modes()OpenGnSys Support Team2020-06-301-0/+1
| | | | Missing closedir() call.
* #980 Fix memleak in og_cmd_scope_getRoberto Hueso Gómez2020-06-301-1/+6
| | | | | If either root or children_root fail to be created but the other one does not, then reserved memory for the successful one would not be freed.
* #980 Add GET /modes REST requestRoberto Hueso Gómez2020-06-301-0/+54
| | | | | | | | | | | | | | | | | | | This patch implements HTTP GET /modes request which returns all modes available for clients: Request: GET /modes HTTP/1.0 Response: 200 OK { "modes": [ "pxe", "10", "13", "00unknown", "11", "19pxeADMIN", "12" ] }
* #971 rename sources folder to srcOpenGnSys Support Team2020-06-2622-0/+7638
Use the same folder as in ogClient.