question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Gyro executes workflow step incorrectly

See original GitHub issue

We have a multi-step deployment workflow configured in Gyro. The result of which is the replacement of an AWS Launch Configuration and AWS autoscale group through a blue-green deployment. One a specific step, our configuration states to update the old autoscale group. Gyro interprets this step as a replace instead of an update, but skips it. The workflow stages are as follows (existing resources are defined outside workflow, and new resources are created within workflow):

  1. verify
  • Create new ELB for new autoscale group
  • Create new Route53 record that points to new ELB
  • Create new Launch Configuration
  • Create new autoscale group and associate with new ELB
  • Wait for all instances in new ELB to pass ELB health checks
  1. push
  • Update new autoscale group to be associated with existing ELB’s
  • Wait for all instances in existing ELB to pass ELB health checks
  1. push-finish
  • Update existing autoscale group to be associated with no ELB’s
  1. finished
  • Replace existing Launch Configuration with new Launch Configuration
  • Replace existing Autoscale Group with new Autoscale Group
  • Delete new Route53 Entry
  • Delete new ELB

The problem occurs at the push-finish step where our configs state that the existing autoscale group should be associated with no ELBs.

        @workflow::update $(aws::autoscaling-group frontend)
            classic-load-balancers: [ ]
        @end

Instead, Gyro tries to execute a replace

    ⇅ Replacing aws::autoscaling-group frontend (ops-test-gyro frontend prod v1 ami-016734320d897e0ea builds/deploy/master 2 fecf06351572fbc59fc869e15f43700d)
    · classic-load-balancers:  - aws::load-balancer cms, - aws::load-balancer frontend
    · name:  'ops-test-gyro frontend prod v1 ami-016734320d897e0ea builds/deploy/master 2 fecf06351572fbc59fc869e15f43700d' → 'ops-test-gyro frontend prod v1 ami-016734320d897e0ea builds/deploy/master 1 7090a1cdf6a0dfc32b447185bff20dbe'
    · tags:  ⟳ { Name: 'ops-test-gyro frontend prod v1 ami-016734320d897e0ea builds/deploy/master 2 fecf06351572fbc59fc869e15f43700d' → 'ops-test-gyro frontend prod v1 ami-016734320d897e0ea builds/deploy/master 1 7090a1cdf6a0dfc32b447185bff20dbe' }
    SKIPPED

This leaves both the existing and new autoscale groups associated with the existing ELB. We expect only the new autoscale group to be associated with the existing ELB.

Gyro should execute the update command instead of the replace at this point.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
sshyubcommented, Jun 11, 2020

@deepanjan90 Please ignore #300 for now.

0reactions
tloisel1commented, Jun 19, 2020

Fix in https://github.com/perfectsense/gyro/pull/303 worked with some adjustments to my workflow configuration

Read more comments on GitHub >

github_iconTop Results From Across the Web

gyro/CHANGELOG.md at master · perfectsense/gyro - GitHub
Gyro is a command-line tool for creating, updating, and maintaining cloud infrastructure. ... workflow: Fix incorrect execution of workflow step. (297) ...
Read more >
THE DEFINITIVE GYROFLOW TUTORIAL - YouTube
Since I posted my original video covering gyroflow, I've had tons of requests for a full length, in depth tutorial on how to...
Read more >
Cannot execute step because the prior workflow step is not ...
We have Workflow A, and Workflow B. We get an error when the loadCube step in workflow B, when Workflow A is in...
Read more >
Gyro's Logical Approach to Infrastructure-as-Code
Gyro configurations are executed using "gyro up" command, which computes and displays the exact changes that will be made to bring the cloud ......
Read more >
US8688498B2 - Workflow system and method with skip function ...
Delay in a workflow is avoided by introducing a skip operation upon execution of the workflow. Additionally, a person in charge of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found