Skip to content

volume_size being ignored and runner starts with minimum storage #1954

@gusfune

Description

@gusfune
Contributor

I am running a setup with 0.40.0 which uses ephemeral runners but in this setup it seems the variable volume_size is being ignored. I have set it up for a value of 40, but it only deploys instances with 8Gb. Also running ARM instances in this setup.

Screenshot 2022-04-18 at 18 36 41

I don't have any custom block configuration or any heavy customisation. Pasting my config from main.tf file below:

module "runners" {
  source                          = "philips-labs/github-runner/aws"
  version                         = "0.40.0"
  create_service_linked_role_spot = true
  aws_region                      = local.aws_region
  vpc_id                          = module.vpc.vpc_id
  subnet_ids                      = module.vpc.private_subnets

  environment = local.environment

  github_app = {
    key_base64     = nonsensitive(OMITTED)
    id             = nonsensitive(OMITTED)
    webhook_secret = nonsensitive(OMITTED)
  }

  # Grab zip files via lambda_download
  runner_binaries_syncer_lambda_zip = "lambdas-download/runner-binaries-syncer.zip"
  runners_lambda_zip                = "lambdas-download/runners.zip"
  webhook_lambda_zip                = "lambdas-download/webhook.zip"

  # Runner setup
  enable_organization_runners = true
  enable_ssm_on_runners       = true
  instance_types              = ["t4g.large", "c6g.large"]
  runner_architecture         = "arm64"
  runner_extra_labels         = "default,aws"
  runner_os                   = "linux"
  runners_maximum_count       = 8
  volume_size                 = 40

  # ephermeral instance rules
  delay_webhook_event             = 0
  enable_job_queued_check         = true
  fifo_build_queue                = false
  job_queue_retention_in_seconds  = 300
  minimum_running_time_in_minutes = 1
  redrive_build_queue = {
    enabled         = true
    maxReceiveCount = 3
  }

  # override scaling down
  scale_down_schedule_expression = "cron(* * * * ? *)"

  tags = {
    Project = "GitHubAction"
  }
}

resource "aws_iam_service_linked_role" "spot" {
  aws_service_name = "spot.amazonaws.com"
}

# Other parts omitted as they are unrelated.

Activity

npalm

npalm commented on Apr 19, 2022

@npalm
Member

Are you using ubuntu or amazon linux? For ubuntu you have to configure the right mount point.

gusfune

gusfune commented on Apr 19, 2022

@gusfune
ContributorAuthor

Are you using ubuntu or amazon linux? For ubuntu you have to configure the right mount point.

Amazon Linux

npalm

npalm commented on Apr 19, 2022

@npalm
Member

Maybe it is related to ARM64, we use the same config (volume_size) for our fleet of x64 runners.

gusfune

gusfune commented on Apr 20, 2022

@gusfune
ContributorAuthor

Another finding: If I try to set the block mappings manually the same way a default instance shows, no blocks will be mapped and the instance is "volumeless".

npalm

npalm commented on May 4, 2022

@npalm
Member

Actually we have the same issu

added a commit that references this issue on May 4, 2022
4e803b2
self-assigned this
on May 4, 2022
npalm

npalm commented on May 5, 2022

@npalm
Member

We planning to depcrecated the variable volume_size. You can set the volume size by provide a block_device_mappings, see example below for amazon linux. In the PR #2014 we revert the default behavior to create an EBS with 30GB.

  block_device_mappings = [{
    device_name           = "/dev/xvd"
    delete_on_termination = true
    volume_type           = "gp3"
    volume_size           = 30
    encrypted             = true
    iops                  = null
  }]
added a commit that references this issue on May 5, 2022
b733248
forest-releaser

forest-releaser commented on May 5, 2022

@forest-releaser
Contributor

🎉 This issue has been resolved in version 0.40.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

reopened this on May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @gusfune@npalm

    Issue actions

      `volume_size` being ignored and runner starts with minimum storage · Issue #1954 · github-aws-runners/terraform-aws-github-runner