Skip to content

Invalid host data in /etc/hosts #38

@jowerner

Description

@jowerner

Typically, "user data" containing start-up parameters can be passed to an image. For XLT images, the user data format is JSON. See below for a user data example:

{"acPassword":"abc","hostData":"1.1.1.1 foo\n2.2.2.2 bar"}

The password is then set in the XLT configuration and the host data is appended to /etc/hosts. However, if hostData is empty, the hosts file gets corrupted and looks like this:

# User data entries START
{"acPassword":"abc","hostData":""}
# User data entries END

Note that this happened with an AWS image, but it is likely that all other images are affected similarly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions