Skip to content

Check if hosts file contains non ASCII characters #480

@wtmpx

Description

@wtmpx

If the /etc/hosts contains ä , Ö , ü or similar , the migration will fail.

Apr 10 09:39:31 localhost.localdomain suse-migration-prepare[1875]: File "/usr/lib/python3.13/site-packages/suse_migration_services/units/prepare.py", line 145, in perform
Apr 10 09:39:31 localhost.localdomain suse-migration-prepare[1875]: contents = fp.read()
Apr 10 09:39:31 localhost.localdomain suse-migration-prepare[1875]: File "", line 325, in decode
Apr 10 09:39:31 localhost.localdomain suse-migration-prepare[1875]: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 8032: invalid continuation byte

https://forums.suse.com/t/upgrading-from-sles15-sp7-to-sles-16-0-failed/46208/40?u=aalzayed

the suse-migration-pre-checks should warn the user. Simply check will show the broken lines:
grep -axv '.*' /etc/hosts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions