diff --git a/backend/app/api/proxmox/lxc.py b/backend/app/api/proxmox/lxc.py
index a041b7d..97fd61c 100644
--- a/backend/app/api/proxmox/lxc.py
+++ b/backend/app/api/proxmox/lxc.py
@@ -12,7 +12,7 @@ from typing import List, Optional
from fastapi import APIRouter, Depends, HTTPException, status
from fastapi.responses import JSONResponse
from loguru import logger
-from pydantic import BaseModel
+from pydantic import BaseModel, field_validator
from sqlalchemy.orm import Session
from ...auth import PermissionChecker
@@ -53,6 +53,13 @@ class LXCDeployRequest(BaseModel):
ipam_pool_id: Optional[int] = None
password: Optional[str] = None
ssh_keys: Optional[str] = None
+
+ @field_validator("password")
+ @classmethod
+ def password_min_length(cls, v):
+ if v is not None and len(v) < 5:
+ raise ValueError("Пароль должен содержать не менее 5 символов (требование Proxmox)")
+ return v
ssh_key_ids: Optional[List[int]] = None
owner_id: Optional[int] = None
nameserver: Optional[str] = None
@@ -225,26 +232,31 @@ def _do_lxc_deploy(task_id: int, req: LXCDeployRequest, user_id: int, username:
_update_task(task_id, "running", f"Создание LXC контейнера VMID {new_vmid}...", 35,
vmid=new_vmid, node=deploy_node)
net0_str = f"name=eth0,bridge={req.bridge},{ip_config},firewall=1"
- upid = client.create_lxc_container(
- node=deploy_node,
- vmid=new_vmid,
- ostemplate=req.ostemplate,
- hostname=req.name,
- cores=req.cores,
- memory=req.memory,
- swap=req.swap,
- storage=req.storage,
- rootfs_size=req.disk,
- net0=net0_str,
- nameserver=req.nameserver,
- searchdomain=req.searchdomain,
- password=req.password,
- ssh_public_keys=req.ssh_keys,
- unprivileged=req.unprivileged,
- start_after_create=False, # we start manually after config
- onboot=req.onboot,
- description=f"Created from {req.ostemplate} by {username}",
- )
+ try:
+ upid = client.create_lxc_container(
+ node=deploy_node,
+ vmid=new_vmid,
+ ostemplate=req.ostemplate,
+ hostname=req.name,
+ cores=req.cores,
+ memory=req.memory,
+ swap=req.swap,
+ storage=req.storage,
+ rootfs_size=req.disk,
+ net0=net0_str,
+ nameserver=req.nameserver,
+ searchdomain=req.searchdomain,
+ password=req.password,
+ ssh_public_keys=req.ssh_keys,
+ unprivileged=req.unprivileged,
+ start_after_create=False, # we start manually after config
+ onboot=req.onboot,
+ description=f"Created from {req.ostemplate} by {username}",
+ )
+ except Exception as e:
+ _update_task(task_id, "failed", "Ошибка создания контейнера", 35,
+ error=f"Proxmox: {e}")
+ return
if not upid:
_update_task(task_id, "failed", "Ошибка создания контейнера", 35,
error="Proxmox не вернул UPID задачи создания контейнера")
diff --git a/backend/app/appstore/pipeline.py b/backend/app/appstore/pipeline.py
index 5867af2..aa6fd7b 100644
--- a/backend/app/appstore/pipeline.py
+++ b/backend/app/appstore/pipeline.py
@@ -721,23 +721,26 @@ def poc_install(db: Session, spec: InstallSpec, on_step: StepCb = _noop) -> Inst
on_step(f"Создание LXC VMID {vmid} на ноде {node}...", 20)
ip_cfg = spec.ip_config or "ip=dhcp"
net0 = f"name=eth0,bridge={spec.bridge},{ip_cfg},firewall=1"
- upid = client.create_lxc_container(
- node=node,
- vmid=vmid,
- ostemplate=spec.ostemplate,
- hostname=spec.name,
- cores=spec.cores,
- memory=spec.memory,
- swap=spec.swap,
- storage=spec.storage,
- rootfs_size=spec.disk,
- net0=net0,
- features=spec.features, # nesting=1,keyctl=1 — критично для Docker
- unprivileged=True,
- start_after_create=False,
- description=f"pvemanager-appstore: {spec.name}",
- nameserver=spec.nameserver or settings.APPSTORE_NAMESERVER,
- )
+ try:
+ upid = client.create_lxc_container(
+ node=node,
+ vmid=vmid,
+ ostemplate=spec.ostemplate,
+ hostname=spec.name,
+ cores=spec.cores,
+ memory=spec.memory,
+ swap=spec.swap,
+ storage=spec.storage,
+ rootfs_size=spec.disk,
+ net0=net0,
+ features=spec.features, # nesting=1,keyctl=1 — критично для Docker
+ unprivileged=True,
+ start_after_create=False,
+ description=f"pvemanager-appstore: {spec.name}",
+ nameserver=spec.nameserver or settings.APPSTORE_NAMESERVER,
+ )
+ except Exception as e:
+ raise PocError(f"Ошибка создания контейнера: {e}") from e
if not upid:
raise PocError("Proxmox не вернул UPID создания контейнера")
diff --git a/backend/app/proxmox/client.py b/backend/app/proxmox/client.py
index 1659a93..ef49e67 100644
--- a/backend/app/proxmox/client.py
+++ b/backend/app/proxmox/client.py
@@ -2093,7 +2093,7 @@ class ProxmoxClient(VmMixin, LxcMixin, ClusterMixin, StorageMixin, NetworkMixin,
raise
except Exception as e:
logger.error(f"Ошибка создания LXC контейнера {vmid}: {e}")
- return None
+ raise
def clone_lxc_container(
self,
diff --git a/frontend/src/components/shared/ActiveTasksIndicator.tsx b/frontend/src/components/shared/ActiveTasksIndicator.tsx
new file mode 100644
index 0000000..73f340a
--- /dev/null
+++ b/frontend/src/components/shared/ActiveTasksIndicator.tsx
@@ -0,0 +1,44 @@
+import { useNavigate } from 'react-router';
+import { ListTodo } from 'lucide-react';
+import { Button } from '@/components/ui/button';
+import { Badge } from '@/components/ui/badge';
+import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
+import { useActiveTaskCount } from '@/hooks/use-tasks';
+import { useTranslation } from 'react-i18next';
+
+export default function ActiveTasksIndicator() {
+ const { t } = useTranslation();
+ const navigate = useNavigate();
+ const { data } = useActiveTaskCount();
+ const count = data?.count ?? 0;
+
+ return (
+
+ navigate('/tasks')}
+ />
+ }
+ >
+
+ {count > 0 && (
+
+ {count > 99 ? '99+' : count}
+
+ )}
+
+
+ {count > 0
+ ? t('tasks.active_count', { count })
+ : t('tasks.no_active', 'No active tasks')}
+
+
+ );
+}
diff --git a/frontend/src/features/templates/OsLogo.tsx b/frontend/src/features/templates/OsLogo.tsx
index 8ee9349..3ac0f55 100644
--- a/frontend/src/features/templates/OsLogo.tsx
+++ b/frontend/src/features/templates/OsLogo.tsx
@@ -119,8 +119,16 @@ const OS_MAP: Array<{ keys: string[]; info: OsInfo }> = [
bg: '#294172',
fg: '#fff',
svg: (
-