occ command to update an existing deploy daemon (app_api:daemon:update)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 53/100
Línea de trabajo
Read lib/Command/Daemon/RegisterDaemon.php first, then inspect DaemonConfigService::updateDaemonConfig() and DaemonConfigController.php to understand the existing update path. Compare the registration checks and deploy config handling with the proposed app_api:daemon:update arguments, including preservation of registry mappings and --set-default. Done means an existing daemon can be updated in place through occ while deployed ExApps remain attached.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe why it is important and where it will be useful
There is no occ command to change the settings of a deploy daemon that is already registered, such as its HaRP address, FRP address, shared key, Docker network, Nextcloud URL or compute device. Neither of the existing commands can be used for it:
- Running
app_api:daemon:registeragain with the new settings does nothing. It skips a name that already exists ("Registration skipped, as the daemon config…already exists.") and returns 0. - Running
app_api:daemon:unregisterfirst, to register it again, fails once ExApps are deployed on the daemon ("Error: … daemon contains N ExApps, please remove them first to proceed.").
So once ExApps are deployed, the only way to change a daemon is the admin settings UI. Anything that manages Nextcloud with occ (provisioning scripts, configuration management, container startup hooks) cannot keep a daemon's settings up to date.
Unregister + register also drops anything else stored on the daemon, for example the Docker registry mappings added with app_api:daemon:registry:add.
The ability already exists in AppAPI: DaemonConfigService::updateDaemonConfig() updates a daemon in place, and the admin settings use it through DaemonConfigController::updateDaemonConfig. It is just not reachable from occ.
Describe your proposed solution
A new command, app_api:daemon:update, taking the same arguments and options as app_api:daemon:register:
occ app_api:daemon:update harp_proxy_docker "Harp Proxy (Docker)" "docker-install" "http" "appapi-harp:8780" "http://nextcloud.local" \
--net nextcloud --harp --harp_frp_address "appapi-harp:8782" --harp_shared_key "<key>" --compute_device=cuda
It would:
- Fail if the daemon does not exist.
- Validate the input and build the deploy config exactly like
registerdoes (the same checks,buildComputeDevice,validateNewSecret, encrypting the shared key). - Update the existing row in place with
updateDaemonConfig(), keeping the id and the name, so deployed ExApps stay attached. - Keep deploy config keys that the command does not manage, such as
registries. - Honour
--set-defaultlikeregisterdoes.
The option handling could be shared between the two commands, so they cannot drift apart.
An alternative with the same effect would be an --update (or --force) flag on app_api:daemon:register that updates the daemon instead of skipping when the name already exists. That would also make register usable as a single idempotent command.
Describe alternatives you've considered, if relevant
- Unregister + register: not possible while ExApps are deployed, and it loses the registry mappings.
- Editing
oc_ex_apps_daemonsdirectly with SQL: the shared key must be encrypted with Nextcloud's crypto, the deploy config layout is internal, and it has to work on every supported database. - The admin settings HTTP endpoint: needs admin credentials and password confirmation, so it does not fit non-interactive use.
- A PHP script calling
DaemonConfigService::updateDaemonConfig(): works, but depends on AppAPI internals that are not a public interface.
Additional context
Code references (current main):
lib/Command/Daemon/RegisterDaemon.php: skips an existing name.lib/Command/Daemon/UnregisterDaemon.php: refuses when ExApps are deployed.lib/Service/DaemonConfigService.php:updateDaemonConfig().lib/Controller/DaemonConfigController.php:updateDaemonConfig(), used by the admin settings.
- Lenguaje dominante
- PHP
- Estrellas
- 202
- Forks
- 30
- Merge medio
- 3 d 20 h
- PR fusionados (30 d)
- 24
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nextcloud/app_api
-
bug docker
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Daemon delete dialog: "Remove all ExApps" checkbox and `removeExApps` parameter have no effectAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Meta ex-app updates issueAbiertodeploy discussion
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
nextcloud/app_api#1236 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
deploy docker enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
-
bug deploy docker
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
Los mantenedores suelen responder en 1 día
Todos los issues de nextcloud/app_api
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Adyen/adyen-magento2#3453 ·
Los mantenedores suelen responder en 8 días
-
component/media domain/discovery
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 1 día
-
enhancement priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
magicsunday/webtrees-statistics#664 ·
Los mantenedores suelen responder en 1 día