Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Moving the file descriptors to different places at the start of user-data is potentially unwanted, can it be made optional? #1959

@Makeshift

Description

@Makeshift

Hi,

Specifically, this line right at the start of user-data: https://github.com/philips-labs/terraform-aws-github-runner/blob/58bfec0f1a3ee7a55054f1e7ebd77e0ee156c04a/modules/runners/templates/user-data.sh#L2
interferes quite significantly with the normal expected output of /var/log/cloud-init-output.log, and also makes cloudinit think that userdata is finishing much faster than it actually is, as it uses stdout as an indicator of when a script has finished running. With that line in place, userdata finishes in ~6 seconds, even though the rest of my userdata takes a further 90 or so seconds to complete.

This means we're getting not-fully-provisioned hosts starting github actions jobs, which is causing some undesired behaviour.

As part of #1956 I made the user_data gzipped, I could add to this PR to make the file descriptor changes optional or remove it entirely if cloud-init-output.log is good enough for most debugging tasks? (the output of cloudinit is streamed to the console anyway, so right clicking ec2 -> view logs will still show the output even if you don't have this exec in place)

Cheers

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions