amazon-ecs-agent: os-type change breaks backward compatibility

Summary

We run mixed-mode instances in our ECS clusters with windows (2016,2019 and 20H2) and Linux Prior to Agent 1.51.1, the os-type for windows instances was windows, and on deployment, the task with a placement constraint worked perfectly The new names, WINDOWS_SERVER_XXXX_FULL|CORE break backward compatibility e.g. WINDOWS_SERVER_2004_CORE or WINDOWS_SERVER_20H2_CORE

 "placementConstraints": [
    {
      "type": "memberOf",
      "expression": "attribute:ecs.os-type == windows"
    }
  ]

We also use custom attributes code to determine placement

 "placementConstraints": [
    {
      "type": "memberOf",
      "expression": "attribute:ecs.os-type == windows and attribute:winver exists and attribute:winver == win20H2"
    }
  ]

The changes in 1.15.1 breaks compatibility

Description

Expected Behavior

Observed Behavior

Environment Details

Supporting Log Snippets

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 17 (7 by maintainers)

Most upvoted comments

I was able to reproduce this issue, working on the fix.

@HaroonSaid thanks for reporting this issue, looking into it.