Skip to content

migrate_to_persistent doesn't apply user and group paramters #40

Description

@akremenetsky

The command migrate_to_persistent /var/lib/postgresql /persist/var/lib/postgresql postgres postgres doesn't assign the user and group actually.

Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + migrate_to_persistent_stop_start /var/lib/postgresql /persist/var/lib/postgresql postgresql@18-main postgres postgres
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + local old_data_dir=/var/lib/postgresql
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + local persistent_dir=/persist/var/lib/postgresql
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + local services=postgresql@18-main
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + local override_user=postgres
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + local override_group=postgres
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + [[ -n postgresql@18-main ]]
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + echo 'Stopping services: postgresql@18-main'
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: Stopping services: postgresql@18-main
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + for service in $services
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + echo 'Stopping postgresql@18-main...'
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: Stopping postgresql@18-main...
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + systemctl stop postgresql@18-main
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + [[ -n postgresql@18-main ]]
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + for service in $services
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + systemctl is-active --quiet postgresql@18-main
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + migrate_to_persistent /var/lib/postgresql /persist/var/lib/postgresql postgres postgres
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + local old_data_dir=/var/lib/postgresql
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + local persistent_dir=/persist/var/lib/postgresql
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + local override_user=postgres
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + local override_group=postgres
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + [[ -z /var/lib/postgresql ]]
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + [[ -z /persist/var/lib/postgresql ]]
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + local tmp_dir=/persist/var/lib/postgresql.tmp
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + [[ -d /persist/var/lib/postgresql.tmp ]]
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + '[' -d /persist/var/lib/postgresql ']'
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + echo 'Skipping data migration, /persist/var/lib/postgresql dir already exists'
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: Skipping data migration, /persist/var/lib/postgresql dir already exists
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + grep -q /var/lib/postgresql /etc/fstab
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + echo '/persist/var/lib/postgresql /var/lib/postgresql none bind 0 0'
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + echo 'Added bind mount to /etc/fstab'
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: Added bind mount to /etc/fstab
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + mount --bind /persist/var/lib/postgresql /var/lib/postgresql
Jun 17 20:22:34 ubuntu bootstrap.sh[1521]: ++ stat -L -c %d:%i /persist/var/lib/postgresql
Jun 17 20:22:34 ubuntu bootstrap.sh[1522]: ++ stat -L -c %d:%i /var/lib/postgresql
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + [[ 64785:784899 != 64785:784899 ]]
Jun 17 20:22:34 ubuntu bootstrap.sh[1523]: ++ pwd
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + [[ /var/lib/exordos/bootstrap == /var/lib/postgresql* ]]
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + [[ -n postgresql@18-main ]]
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + echo 'Starting services: postgresql@18-main'
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: Starting services: postgresql@18-main
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + for service in $services
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + echo 'Starting postgresql@18-main...'
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: Starting postgresql@18-main...
Jun 17 20:22:34 ubuntu bootstrap.sh[1259]: + systemctl start postgresql@18-main
Jun 17 20:22:34 ubuntu systemctl[1524]: Job for postgresql@18-main.service failed because the service did not take the steps required by its unit configuration.
Jun 17 20:22:34 ubuntu systemctl[1524]: See "systemctl status postgresql@18-main.service" and "journalctl -xeu postgresql@18-main.service" for details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions