Skip to content

upgrading a running 1.x controller/router to 2.x fails to create the service user #4149

Description

@dovholuknf

Reported here: https://openziti.discourse.group/t/ziti-controller-update-to-2-breaks-service/5937

Upgrading openziti-controller or openziti-router from 1.x to 2.x while the service is running leaves it unable to start: systemd exits 217/USER because the ziti-controller / ziti-router user the 2.x unit runs as is never created.

1.x runs as DynamicUser=yes, so while the service is active systemd exposes a transient user of that name. The 2.x postinstall checks whether the user exists before creating it, sees the transient one, and skips creation. It then stops the service to migrate state. Once stopped, the transient user disappears, the following chown fails with "invalid user", and no persistent user is ever created.

This only happens when the old service is running during the upgrade, which is the default since the package managers don't stop it. Confirmed on Oracle Linux 9, stable channel, 1.6.15 → 2.0.0. Affects 2.0.0 and main, both controller and router.

Workaround for existing installs: stop the services before upgrading, or reinstall the package afterward.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions