Hi,
ich würde gerne wissen, was hier die "best practise" ist, wenn man das NAS neustarten will und verschiedene Dienste in Portainer laufen hat.
Vermutlich wäre es besser, die erstmal manuell alle zu stoppen vorher, oder?
VG
Hi,
ich würde gerne wissen, was hier die "best practise" ist, wenn man das NAS neustarten will und verschiedene Dienste in Portainer laufen hat.
Vermutlich wäre es besser, die erstmal manuell alle zu stoppen vorher, oder?
VG
Das stoppen der Container organisiert das NAS von selbst, einfach die reguläre Funktion "Neu starten" nutzen
.
Please log in or register for free to view graphics and attachments.
Ja ich frag mich nur ob das nicht ein etwas zu harter "cut" ist. Wenn da Datenbanken laufen kenn ich das eigentlich so, dass man so etwas wie einen soft shutdown mit grace period hat.
Eigentlich nicht, ich habe 2 Synology und 2 UGREEN NAS. (siehe meine Signatur)
Auf allen 4 läuft Docker und bei keiner habe ich beim reboot, oder aus / ein Schalten darauf geachtet. Da gab es deshalb bisher noch nie Probleme.
Da wird ja auch kein harter shutdown ausgeführt. Das System beendet den Docker Dienst, dabei werden alle Docker Container vorher normal beendet und erst dann geht das NAS aus.
Nun gut, das ist gut zu hören, jedoch nur weil in deinem Fall noch keine Probleme aufgetreten sind, heißt es für mich jetzt ehrlich gesagt nicht, dass das tatsächlich die sicherste Methode oder best practice ist.
Hier gibts z.B. bei ner Oracle Datenbank Parameter, die man für nen Shutdown übergeben kann.
The mode is normal, immediate, or abort.
In a normal shutdown, Oracle Database waits for all currently connected users to disconnect and disallows any new connections before shutting down. This is the default mode.
In an immediate shutdown, Oracle Database terminates and rolls back active transactions, disconnects clients, and shuts down.
In an abort shutdown, Oracle Database terminates active transactions and disconnects users; it does not roll back transactions. The database performs automatic recovery and rollback the next time it is started. Use this mode only in emergencies.
MySQL, Postgres usw haben sicher auch ähnliche Methoden. Wenn die Datenbanken dann über Portainer laufen, welcher Befehl wird da gesendet, das frage ich mich halt.
Nur um Risiken auszuschließen und nicht mit ner kaputten Datenbank oder korrupten Daten aufzuwachen.
Wenn ein Docker Container normal gestoppt wird, dann wird ein sigterm gesendet und in der PostgreSQL Doku steht folgendes
QuoteDisplay MoreSIGTERM
This is the Smart Shutdown mode. After receiving SIGTERM, the server disallows new connections, but lets existing sessions end their work normally. It shuts down only after all of the sessions terminate. If the server is in online backup mode, it additionally waits until online backup mode is no longer active. While backup mode is active, new connections will still be allowed, but only to superusers (this exception allows a superuser to connect to terminate online backup mode). If the server is in recovery when a smart shutdown is requested, recovery and streaming replication will be stopped only after all regular sessions have terminated.
SIGINT
This is the Fast Shutdown mode. The server disallows new connections and sends all existing server processes SIGTERM, which will cause them to abort their current transactions and exit promptly. It then waits for all server processes to exit and finally shuts down. If the server is in online backup mode, backup mode will be terminated, rendering the backup useless.
SIGQUIT
This is the Immediate Shutdown mode. The server will send SIGQUIT to all child processes and wait for them to terminate. If any do not terminate within 5 seconds, they will be sent SIGKILL. The master server process exits as soon as all child processes have exited, without doing normal database shutdown processing. This will lead to recovery (by replaying the WAL log) upon next start-up. This is recommended only in emergencies.
Da gibt es also gar keine Probleme mit.
Ok, danke!
Join our community with over 10,000 members!
Register yourself now for free to get full access to all content, graphics, downloads and other exclusive features!