Compare commits

..

7 Commits

Author SHA1 Message Date
Nicolas Arenas 4d5dd98f7d Merge pull request 'refs #2575 changes bind-address to 0.0.0.0 in mariadb configuration' (#46) from grafana-user into main
testing/ogcore-api/pipeline/head There was a failure building this commit Details
ogcore-debian-package/pipeline/head This commit looks good Details
Reviewed-on: #46
2025-08-07 12:53:06 +02:00
Luis Gerardo Romero Garcia d8469d59dc refs #2575 adds backup to mariadb 50-server.cnf
testing/ogcore-api/pipeline/pr-main Build started... Details
2025-08-07 12:52:21 +02:00
Luis Gerardo Romero Garcia 3b19e62ba6 refs #2575 changes bind-address to 0.0.0.0 in mariadb configuration
testing/ogcore-api/pipeline/head There was a failure building this commit Details
testing/ogcore-api/pipeline/pr-main There was a failure building this commit Details
2025-08-07 12:43:34 +02:00
Nicolas Arenas 1d366bd7ff Merge pull request 'refs #2575 adds grafana user for datasource in postinstall' (#45) from grafana-user into main
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
Reviewed-on: #45
2025-08-07 12:06:06 +02:00
Luis Gerardo Romero Garcia d63bc2d798 refs #2575 updates CHANGELOG
testing/ogcore-api/pipeline/pr-main Build started... Details
2025-08-07 12:05:05 +02:00
Luis Gerardo Romero Garcia 9d6ef41f02 refs #2575 adds grafana user for datasource in postinstall
testing/ogcore-api/pipeline/head There was a failure building this commit Details
testing/ogcore-api/pipeline/pr-main There was a failure building this commit Details
2025-08-07 11:56:28 +02:00
Manuel Aranda Rosales 7fa432568e Merge pull request 'develop' (#44) from develop into main
testing/ogcore-api/pipeline/head There was a failure building this commit Details
ogcore-debian-package/pipeline/head This commit looks good Details
Reviewed-on: #44
2025-08-06 16:43:14 +02:00
7 changed files with 16 additions and 28 deletions

View File

@ -1,7 +1,8 @@
# Changelog
## [0.19.0] - 2025-08-06
## [0.19.0] - 2025-08-07
### Added
- Se ha añadido un nuevo estado "enviado" para cuando se ejecuten acciones a equipos en estado Windows o Linux
- Añade nuevo usuario "grafana" con permisos de solo lectura a la base de datos ogcore.
---
## [0.18.1] - 2025-08-06

View File

@ -66,6 +66,14 @@ if [ "$1" = "configure" ] && [ -z "$2" ]; then
php bin/console app:load-default-commands
php bin/console opengnsys:load-default-menu
echo ">>> Configurando usuario de base de datos para Grafana"
cp -a /etc/mysql/mariadb.conf.d/50-server.cnf /etc/mysql/mariadb.conf.d/50-server.cnf.bak
sed -i 's/^bind-address\s*=.*/bind-address = 0.0.0.0/' /etc/mysql/mariadb.conf.d/50-server.cnf
mariadb -e "
CREATE USER IF NOT EXISTS 'grafana'@'%' IDENTIFIED BY 'grafana';
GRANT SELECT ON ogcore.* TO 'grafana'@'%';
FLUSH PRIVILEGES;"
echo ">>> Configurando servidor web y servicios"
ln -s /opt/opengnsys/ogcore/etc/nginx/sites-available/ogcore.conf /etc/nginx/sites-enabled/ogcore.conf
ln -s /opt/opengnsys/ogcore/etc/nginx/sites-available/mercure.conf /etc/nginx/sites-enabled/mercure.conf
@ -77,6 +85,7 @@ if [ "$1" = "configure" ] && [ -z "$2" ]; then
chown -R opengnsys:www-data /opt/opengnsys/ogcore
systemctl daemon-reload
systemctl enable og-mercure
systemctl restart mariadb.service
systemctl restart og-mercure
systemctl restart nginx
systemctl restart php8.3-fpm

View File

@ -67,19 +67,6 @@ abstract class AbstractOgAgentController extends AbstractController
$response = $this->httpClient->request($method, $url, $params);
return json_decode($response->getContent(), true);
} catch (ClientExceptionInterface | ServerExceptionInterface $e) {
if ($e->getResponse() && $e->getResponse()->getStatusCode() === 409) {
$this->logger->info('Client is busy (409 Conflict)', [
'url' => $url,
'status_code' => 409
]);
return [
'code' => 409,
'message' => 'Client is busy',
'details' => $e->getMessage(),
];
}
$this->logger->error(sprintf('Client/Server error in request to %s: %s', $url, $e->getMessage()));
return [

View File

@ -39,7 +39,7 @@ class StatusController extends AbstractController
{
const string CREATE_IMAGE = 'RESPUESTA_CrearImagen';
const string CREATE_IMAGE_GIT = 'RESPUESTA_CrearImagenGit';
const string UPDATE_IMAGE_GIT = 'RESPUESTA_ModificarImagenGit';
const string UPDATE_IMAGE_GIT = 'RESPUESTA_ActualizarImagenGit';
const string RESTORE_IMAGE = 'RESPUESTA_RestaurarImagen';
const string RESTORE_IMAGE_GIT = 'RESPUESTA_RestaurarImagenGit';
const string CONFIGURE_IMAGE = 'RESPUESTA_Configurar';

View File

@ -10,7 +10,6 @@ final class TraceStatus
public const string FAILED = 'failed';
public const string CANCELLED = 'cancelled';
public const string SENT = 'sent';
public const string BUSY = 'busy';
private const array STATUS = [
self::PENDING => 'Pendiente',
@ -19,7 +18,6 @@ final class TraceStatus
self::FAILED => 'Fallido',
self::CANCELLED => 'Cancelado',
self::SENT => 'Enviado',
self::BUSY => 'Ocupado',
];
public static function getStatus(): array

View File

@ -15,7 +15,7 @@ readonly class CreateService
{
}
public function __invoke(?Client $client = null, ?string $command, string $status, ?string $jobId = '', ?array $input = [], ?string $output = null): Trace
public function __invoke(?Client $client = null, ?string $command, string $status, ?string $jobId = '', ?array $input = []): Trace
{
$trace = new Trace();
$trace->setClient($client);
@ -24,7 +24,6 @@ readonly class CreateService
$trace->setJobId($jobId);
$trace->setExecutedAt(new \DateTime());
$trace->setInput($input);
$trace->setOutput($output);
$this->entityManager->persist($trace);
$this->entityManager->flush();

View File

@ -73,20 +73,14 @@ readonly class ImageProcessor implements ProcessorInterface
if ($data->selectedImage) {
$response = $this->createImageActionController->__invoke($data->queue, $data->selectedImage->getEntity(), $data->partition->getEntity(), $data->client->getEntity(), $data->gitRepository);
} else {
$image = $data->createOrUpdateEntity($entity);
if ($data->type === 'monolithic') {
$this->validator->validate($image);
}
$this->validator->validate($image);
if ($this->kernel->getEnvironment() !== 'test') {
$response = $this->createImageActionController->__invoke($data->queue, $image, null, null, $data->gitRepository);
}
if ($data->type === 'monolithic') {
$this->imageRepository->save($image);
}
$this->imageRepository->save($image);
}
if ($response instanceof JsonResponse && $response->getStatusCode() >= 400) {