Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECS Services does not sync taskDefinition with the Spec and Actual on ReconcileProcess #1841

Closed
mhoshi-vm opened this issue Aug 10, 2023 · 3 comments
Labels
bug Something isn't working stale

Comments

@mhoshi-vm
Copy link

mhoshi-vm commented Aug 10, 2023

What happened?

Here is my current Manifest with both Spec and Status.
The problem is my spec.forProvider. taskDefinition is pointing to arn:aws:ecs:ZZZZ:YYYYY:task-definition/test-ecs-ns1:1
However my status.atProvider.deployments[0].taskDefinition is pointing to arn:aws:ecs:ZZZZ:YYYYY:task-definition/test:92 which is my old task definition.
I have been waiting for several hours, but this is not syncing.

apiVersion: ecs.aws.crossplane.io/v1alpha1
kind: Service
metadata:
  annotations:
    crossplane.io/external-name: test-ecs-ns1
  creationTimestamp: "2023-08-09T07:25:07Z"
  finalizers:
  - finalizer.managedresource.crossplane.io
  generation: 220
  name: test-ecs-ns1
  resourceVersion: "1917094"
  uid: c8b4d3a7-8f09-412b-a09d-f48f5c9a22b0
spec:
  deletionPolicy: Delete
  forProvider:
    cluster: hoge
    desiredCount: 1
    forceDeletion: true
    launchType: FARGATE
    networkConfiguration:
      awsvpcConfiguration:
        assignPublicIP: DISABLED
        subnets:
        - subnet-XXXX
    region: ZZZZ
    taskDefinition: arn:aws:ecs:ZZZZ:YYYYY:task-definition/test-ecs-ns1:1
    taskDefinitionRef:
      name: test-ecs-ns1
  providerConfigRef:
    name: aws-provider
status:
  atProvider:
    clusterARN: arn:aws:ecs:ZZZZ:YYYYY:cluster/hoge
    createdAt: "2023-08-09T07:50:51Z"
    createdBy: arn:aws:iam::YYYYY:role/tap-ecs
    deployments:
    - createdAt: "2023-08-09T08:56:42Z"
      desiredCount: 1
      failedTasks: 0
      id: ecs-svc/ZZZZZZZZ
      launchType: FARGATE
      networkConfiguration:
        awsVPCConfiguration:
          assignPublicIP: DISABLED
          subnets:
          - subnet-XXXX
      pendingCount: 0
      platformFamily: Linux
      platformVersion: 1.4.0
      rolloutState: COMPLETED
      rolloutStateReason: ECS deployment ecs-svc/ZZZZZZZZ completed.
      runningCount: 1
      status: PRIMARY
      taskDefinition: arn:aws:ecs:ZZZZ:YYYYY:task-definition/test:92
      updatedAt: "2023-08-09T08:59:56Z"
    events:
    - createdAt: "2023-08-09T21:00:19Z"
      id: c70acb76-5cfa-44d1-99de-8a9f1df46b5a
      message: (service test-ecs-ns1) has reached a steady state.
    - createdAt: "2023-08-09T15:00:18Z"
      id: df0a995c-8967-4ad0-9c3b-835fa11d01c8
      message: (service test-ecs-ns1) has reached a steady state.
    - createdAt: "2023-08-09T08:59:56Z"
      id: 670c9169-25a0-474c-8d2a-8bb2515b9393
      message: (service test-ecs-ns1) has reached a steady state.
    - createdAt: "2023-08-09T08:59:56Z"
      id: 42e61c12-7f5c-489d-9cd5-f2d0283b8db9
      message: (service test-ecs-ns1) (deployment ecs-svc/ZZZZZZZZ) deployment
        completed.
    - createdAt: "2023-08-09T08:58:46Z"
      id: 6e1892c3-bc27-4090-82f2-00c311eb652c
      message: '(service test-ecs-ns1) has stopped 1 running tasks: (task b7fc019228fb4c978c7abbf16e1436b8).'
    - createdAt: "2023-08-09T08:57:13Z"
      id: a0234310-62de-4cb3-a8b7-bda62963610d
      message: '(service test-ecs-ns1) has started 1 tasks: (task 08b93fda120d4600b61397c51b858de1).'
    - createdAt: "2023-08-09T07:51:25Z"
      id: a2fe1a05-878f-4b1c-80b5-1b27dd5ca06c
      message: (service test-ecs-ns1) has reached a steady state.
    - createdAt: "2023-08-09T07:51:25Z"
      id: 08769260-292a-402f-b329-f190ae306fb1
      message: (service test-ecs-ns1) (deployment ecs-svc/9559118765229063865) deployment
        completed.
    - createdAt: "2023-08-09T07:50:56Z"
      id: 1ddb2381-4529-436c-a850-ef80b80d4278
      message: '(service test-ecs-ns1) has started 1 tasks: (task b7fc019228fb4c978c7abbf16e1436b8).'
    networkConfiguration:
      awsVPCConfiguration:
        assignPublicIP: DISABLED
        subnets:
        - subnet-XXXX
    pendingCount: 0
    platformFamily: Linux
    roleARN: arn:aws:iam::YYYYY:role/aws-service-role/ecs.amazonaws.com/AWSServiceRoleForECS
    runningCount: 1
    serviceARN: arn:aws:ecs:ZZZZ:YYYYY:service/hoge/test-ecs-ns1
    serviceName: test-ecs-ns1
    status: ACTIVE
    taskDefinition: arn:aws:ecs:ZZZZ:YYYYY:task-definition/test:92
  conditions:
  - lastTransitionTime: "2023-08-09T08:58:24Z"
    reason: ReconcileSuccess
    status: "True"
    type: Synced
  - lastTransitionTime: "2023-08-09T07:50:51Z"
    reason: Available
    status: "True"
    type: Ready

How can we reproduce it?

Update a taskDefinition after initial deployment

What environment did it happen in?

Crossplane version: 1.12.1-up.2
Provider AWS: v0.42.0
Kubernetes: v1.26 (EKS)

@mhoshi-vm mhoshi-vm added the bug Something isn't working label Aug 10, 2023
@MisterMX
Copy link
Collaborator

MisterMX commented Sep 5, 2023

The controller for Service.ecs only implements basic create / delete functionality and is missing the isUpToDate and preUpdate methods that are necessary for an update to work.

There are currently not enough developers to work on this. @mhoshi-vm if you do have the time you are welcome to start working on it!

Copy link

github-actions bot commented Dec 5, 2023

Crossplane does not currently have enough maintainers to address every issue and pull request. This issue has been automatically marked as stale because it has had no activity in the last 90 days. It will be closed in 14 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.

@github-actions github-actions bot added the stale label Dec 5, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 20, 2023
@jmunoz19
Copy link

/fresh We are seeing this issue as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

3 participants